PDA

View Full Version : Postcount problem


SnowBot
07-21-2004, 04:48 AM
Hi guys, well i have just noticed a strange problem regarding my post counts and as i have just noticed it i have no idea when it went wrong, i mean after what hack i installed.

OK basically the prob is this

OK in the postbit it says i have

Posts: 1,740

This is correct BUT in my profile it says

Total Posts: 1 (4.93 posts per day)

Another admin has 2000+ posts and in her profile it says 2 but in postbit it says the correct 2000+ posts. Now a member with less than 1000 posts, say 30 posts for example it shows correct in both postbit and profile page. Any ideas what can be wrong and how to fix this? It seems if you have more than 1000 posts it messes up.

The guys over at vb.com will not help as its a hacked board, thats fine but i need help guys. If someone can suggest things for me to look for or anything please help :)

Snowy

Andreas
07-21-2004, 07:07 AM
Strange :)
Did you modify member.php or MEMBERINFO?

If so check both carefully.

Xenon
07-21-2004, 02:18 PM
sounds like a incorrect hack for me as well.

numberformating problem i'd say.

be sure you have that line, just be called once:
$userinfo['posts'] = vb_number_format($userinfo['posts']);


and afterwards make sure, that below that line, isn't something like: $userinfo['posts'] = intval($userinfo['posts']);

at least that would result in exactly the problem you explained.

SnowBot
07-21-2004, 02:43 PM
sounds like a incorrect hack for me as well.

numberformating problem i'd say.

be sure you have that line, just be called once:
$userinfo['posts'] = vb_number_format($userinfo['posts']);


and afterwards make sure, that below that line, isn't something like: $userinfo['posts'] = intval($userinfo['posts']);

at least that would result in exactly the problem you explained.aaahhh I have that line twice, but which to remove?

member.php
// User has been a member for less than one day.
$userinfo['posts'] = vb_number_format($userinfo['posts']);
$postsperday = $userinfo['posts'];
}
else
{
$postsperday = vb_number_format($userinfo['posts'] / $jointime, 2);
$userinfo['posts'] = vb_number_format($userinfo['posts']);
}
// THREADS STARTED AND THREADS PER DAY

CarCdr
07-21-2004, 03:14 PM
Xenon nailed it. Line 392:$userinfo['posts'] = intval ( $userinfo['posts'] ) ;

SnowBot
07-21-2004, 03:48 PM
Xenon nailed it. Line 392:$userinfo['posts'] = intval ( $userinfo['posts'] ) ;
so i just remove that line?

SnowBot
07-21-2004, 03:50 PM
yep that worked :) Guys you are all pure stars. This place is so helpful and when you are registered as blind as i am all the help you guys give is much more appreciated :)

Xenon
07-21-2004, 03:52 PM
You're welcome :)

But please don't post full vb files here next time, as this isn't allowed.

SnowBot
07-21-2004, 03:54 PM
aahhh appologies, i didnt know but i do now :):)