Previous Thread
Next Thread
Print Thread
Rate Thread
#127264 09/03/2001 1:22 PM
Joined: May 2001
Posts: 15
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 15
this is what im tryin to do.. I have it set on the forum now to show last post and by who in the ultimate.cgi file.. what I wanna do is if the last post was made today.. I want it to say today instead of saying the date there.. so I need a comparison statement.. I have the if else wrote but what do I compare what to what?? can anyone help or lead me in the right direction..

Sponsored Links
#127265 09/03/2001 7:06 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
There are a few ways you could do it, depending upon the way your date it setup in your ubb

something like this will run the nix date command and slap it in a string

$date2 = system("date -u '+%d/%m/%y'");

then compare the two strings.

[ September 03, 2001: Message edited by: BassTeQ ]


I can't afford a good signature editor frown
#127266 09/03/2001 11:39 PM
Joined: May 2001
Posts: 15
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 15
ok so thats the one string to get the current date but whats the varialbe that UBB stores the last post date?? is the $lastjulian or something like that??

#127267 09/04/2001 5:40 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Thats a very good question, id have to look when I get home from work.

Just tppe this somewhere in your code, and see what it prints, if it prints the date then you're in business.

print "This is the date from UBB variable $lastjuliann";


I can't afford a good signature editor frown
#127268 09/04/2001 6:52 PM
Joined: May 2001
Posts: 15
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 15
nope.. that didnt work.. the variable was actually $LastPostJulian but when I call it I get no value.. prolly not declared before i call it.. so not sure.. im bout to give up on this one..its confusing.. another ? real fast incase u know the answer.. any idea where I can get the rate member mod as I cant find that either??

Sponsored Links
#127269 09/05/2001 5:47 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Hmmm.....

I dont think there is a rate member mod sorry.


I can't afford a good signature editor frown
#127270 09/06/2001 1:33 AM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Have you set your date to be in Julian format in the UBB? Because that could be the reason the variable could be blank.

Whats the url to your board?


I can't afford a good signature editor frown
#127271 09/06/2001 1:24 PM
Joined: May 2001
Posts: 15
Junior Member
Junior Member
Offline
Joined: May 2001
Posts: 15
the forum is http://www.newcelica.org/cgi-bin/Ultimate.cgi

i havent played with the date settings so it should be what it comes set at..

#127272 09/06/2001 5:45 PM
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
Moderator / Code Fixer
Offline
Joined: Oct 2000
Posts: 743
Ok, Try printing out that variable again after changing the date settings in your CP a few times.
Also make sure you are printing it out in a spot where it would be used, (ie where it would contain data) just becareful not to put it inside a sub that may never get called, know what I mean?


I can't afford a good signature editor frown

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)