|
|
Joined: May 2001
Posts: 15
Junior Member
|
Junior Member
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..
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
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
|
|
|
|
Joined: May 2001
Posts: 15
Junior Member
|
Junior Member
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??
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
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
|
|
|
|
Joined: May 2001
Posts: 15
Junior Member
|
Junior Member
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??
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
Joined: Oct 2000
Posts: 743 |
Hmmm.....
I dont think there is a rate member mod sorry.
I can't afford a good signature editor
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
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
|
|
|
|
Joined: Oct 2000
Posts: 743
Moderator / Code Fixer
|
Moderator / Code Fixer
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
|
|
|
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.
|
|
Posts: 5,832
Joined: January 2000
|
|
Forums63
Topics37,571
Posts293,923
Members13,848
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|