Author |
Message |
xanadude
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Feb 04, 2006
Posts: 21
|
Posted:
Wed Jan 23, 2008 12:26 pm |
|
Sorry but after a lota seaching i have reverted to asking
I am using the block-ForumsScr block on my site but the timestamp against the last entries is using the system time wich is 5hr behind.
I have set the forums to use GMT and wondered how can I change the block to indicate the same.
Sorry if this is already done but going mad searching and im not that hot with sql
Quote: | <?php
/************************************************************************/
/* Forums Block for phpBB 2.0.0 port to PHP Nuke 5.5 */
/* ================================================= */
/* */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com) */
/* http://phpnuke.org */
/* */
/* Version 1, modified by Sébastien Vaast */
/* http://membres.lycos.fr/projectpluto/ */
/* */
/* */
/* Last Edited - 09 May 2002 */
/* */
/* This Block shows the last 10 topics where a message was posted, */
/* along with the username of the last poster and the day and time */
/* of the post. */
/* It will also show smileys in the topic titles thanks to the */
/* smileys.php file found in Leo Tan Block Forums version */
/* (http://www.cybercomp.d2g.com). */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/************************************************************************/
/* Modified by Gaylen Fraley http://www.ravenphpscripts.com */
/************************************************************************/
if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
include_once ('blocks/smileys.php');
global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 15;
$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Last $amount Forum Messages</b></center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);
$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);
//$topic_title = substr("$topic_title", 0,17);
//$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";
$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\"alt=\"\"><a href=\"forums.html?amp;file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font color=\"#666666\"><i>Last post by <A HREF=\"profile-.html$user_id\"STYLE=\"text-decoration: none\"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href=\"forums.html\"STYLE=\"text-decoration: none\">$sitename ]</center>";
//$content .= "<center><img src=\"images/banners/fatalexception-logo-88x31.gif\" border=\"0\"></center>";
$content .= "</a>";
?>
|
Thanks in advance
Sorry my site is http:://www.v4rc.co.uk |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
Site Admin
![](modules/Forums/images/avatars/502a2d1345d88a86ddb4a.png)
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Wed Jan 23, 2008 2:27 pm |
|
You may also want to check the Forums Timezone under Your Account for that user. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
xanadude
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jan 23, 2008 2:55 pm |
|
Cheers done that all setting are set to GMT
Forums and user settings.
Still searching Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jan 23, 2008 3:01 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
Former Moderator in Good Standing
![](modules/Forums/images/avatars/0cd76dcf45da5de2cf864.jpg)
Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Wed Jan 23, 2008 3:06 pm |
|
It's probably just the block not respecting the timezone settings. The block probably needs to be tweaked. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
xanadude
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jan 23, 2008 3:57 pm |
|
am searching guys it states
Quote: | $result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
|
How can I increment that string to just +5 for the hours?
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jan 23, 2008 4:52 pm |
|
Well, as a quick hack you could try:
Code:
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time + 18000,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
|
When I get some time I'll see if there is a more general solution. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
xanadude
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jan 23, 2008 6:00 pm |
|
as usual you guy's rock..... that does the trick as the forum is for uk site so general timezone not so important for rest of world.................
Many thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|