boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

if you downloaded 0.6 before 01:36 GMT

 
Post new topic   Reply to topic    boardom Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Mon Sep 30, 2002 1:39 am    Post subject: if you downloaded 0.6 before 01:36 GMT Reply with quote

If you downloaded b2 0.6 before 01:36 GMT, you'll see the counts for comments/trackbacks/pingbacks are wrong.
This is because of a last-minute bug in b2template.functions.php Sad

Here's the fix.
Open b2template.functions.php, find these lines:
[php:1:f936180722] while($row = mysql_fetch_object($result)) {
if (stristr($row->comment_text, '<trackback />')) {
$ctp_number['trackbacks']++;
} elseif (stristr($row->comment_text, '<pingback />')) {
$ctp_number['pingbacks']++;
} else {
$ctp_number['comments']++;
}
$ctp_number['ctp']++;
}
$cache_ctp_number[$post_id] = $ctp_number;
} else {
$ctp_number = $cache_ctp_number[$post_id][$mode];
}[/php:1:f936180722]
Replace them with these lines:
[php:1:f936180722] while($row = mysql_fetch_object($result)) {
if (substr($row->comment_content, 0, 13) == '<trackback />') {
$ctp_number['trackbacks']++;
} elseif (substr($row->comment_content, 0, 12) == '<pingback />') {
$ctp_number['pingbacks']++;
} else {
$ctp_number['comments']++;
}
$ctp_number['ctp']++;
}
$cache_ctp_number[$post_id] = $ctp_number;
} else {
$ctp_number = $cache_ctp_number[$post_id];
}[/php:1:f936180722]
And your counts shall be right Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Bugs All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group