| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jul 2003
2 posts
Gave thanks: 0
Thanked 0 times
|
Hi all,
I have a rather frustrating niggle with phpnuke and after searching all round the interweb i can find no straight answer on posting news to the front page of my site using phpnuke it sets the timestamp to that of the server. Does anyone know how this could be changed to GMT? Cheers. Alan. |
|
|
|
|
#2 (permalink) |
|
Registered User
Comfy Contributor
Joined in May 2003
Lives in Florida
118 posts
Gave thanks: 0
Thanked 0 times
|
Hello boaly,
We at Surpass do not support help for third party software, so you can't count on getting an answer from us all the time, although we are more then willing to help on the subject at hand when we can. Other members with phpnuke installed might be able to help you, although you'll probably get a better answer asking at the scripts homepage forum. I don't use phpnuke but if you login to the admin area there should be a setting somewhere around there that will allow you to change the format of the timestamp, as many content management scripts have that option as well as forums and other big scripts.
__________________
Profession: Programmer, Gamer, Web Developer Website: http://www.reanimated.net/ - Server: Quela |
|
|
|
|
#3 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jul 2003
9 posts
Gave thanks: 0
Thanked 0 times
|
Please Note: Backup Your Files And Database Before Changing Anything – You Have Been Warned
You can offset the time that shows up for the News stories in the mainfile.php. Find the following line (about line 567 in 6.0 and about line 740 in 6.5+): Code: $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); Just add a - 3600 (3600 x Number_Hours) or + 3600 (3600 seconds, which is 1 hour) like this: Code: $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]) - 3600); If like us here, there is a 5 hour difference, it will be +18000: Code: $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]) +18000); In the language/lang-english.php (or appropriate language file) find: Code: define("_DATESTRING","%A, %B %d %T %Z"); You can use punctuation (or whatever) along with the different strftime symbols, and only the symbols will get converted to a time parameter. The %A is the weekday, %Z is the time zone, etc ... you can see what the different symbols do here: http://www.php.net/manual/en/function.strftime.php NOTE: If no time is displayed ... some servers do not recognize the %T - you can use %H:%M:%S instead (if you want you can just delete the %Z, and replace it with EST, GMT or whatever) |
|
|
|
|
#4 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jun 2003
27 posts
Gave thanks: 0
Thanked 0 times
|
Melsi, thanks for the tip on changing the date in the Php-Nuke news stories, I was looking for that too.
Here are some more tips for changing the php files in nuke (or any php file). 1. Backup! I have a backup folder that contains only the files I have changed, that helps me remember which files have been updated. Keeping a change log that records the specific code that has been changed is good also. 2. If you use the edit in Cpanel to change the php file, it will sometimes add a line return to the end of the file. The php file will not work with anything after the ?> , so use of the edit is not recommended (but it does work sometimes). Better to use ftp to install the edited file. 3. If you mess up or delete a Nuke file and want to start over with a fresh copy, go to the CVS on Nuke Cops. You can download the individual file that matches the version of Nuke you are running. Panama |
|
|