PDA

View Full Version : [fixed] Ghost Message :)



sKuLLo
Wed 22nd Aug '01, 1:58pm
Hi. as you can see (http://www.addr.com/~skullo/forum/index.php), there are no messages.
I have deleted my message after sending it, but forum still seen it as a not deleted message..

And all you ghostbusters :p Please fix this bug :p

Steve Machol
Wed 22nd Aug '01, 3:06pm
:confused:
I don't see any messages in that forum. Are you sure your browser wasn't just pulling the old page from its cache?

Chen
Wed 22nd Aug '01, 3:20pm
He means that in the last post column for the forum, the post he deleted still appears. This only happens when there's no other post in a forum.

Mike Sullivan
Wed 22nd Aug '01, 3:24pm
I believe this is a known bug.

Steve Machol
Wed 22nd Aug '01, 3:44pm
D'oh! My bad. Now I see what he's talking about.

sKuLLo
Wed 22nd Aug '01, 4:07pm
Want do you fix it :D

Chen
Thu 23rd Aug '01, 4:18am
I just found a way to solve this bug:
In functions.php replace

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}
}

$DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthre ads',lastpost='$lastpost',lastposter='".addslashes($lastposter)."' WHERE forumid='$forumid'");
with

if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'";
}
} else {
$lastpostquery=",lastpost='0',lastposter=''";
}

$DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthre ads' $lastpostquery WHERE forumid='$forumid'");
and that's it! :)

EDIT:
By the way, you can see this in action on my demo forums (http://forum.t-cove.com/demo).

Kier
Thu 23rd Aug '01, 2:55pm
fixed