MyBB Community Forums

Full Version: ??? can u get..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
can u get a code that shows u how many ppl have clcik on a link on teh forums
so its like this
-----------------------
[attachment=4580]
-----------------------
In inc/functions_forumlist.php
Find:
$lastpost = "<span style=\"text-align: center;\">-</span>";
Change to:
$lastpost = "<span style=\"text-align: center;\">Redirected hits: ".my_number_format($forum['posts'])."</span>";

Then in forumdisplay.php
find:
if($foruminfo['linkto'])
{
Add under:
$db->query("UPDATE ".TABLE_PREFIX."forums SET posts=posts+1 WHERE fid='{$fid}'");
And your done Smile
Oohh..that's neat. It should be set as this by default.
I have to agree, pretty neat for stats. =)
thxBig GrinBig Grin
Wow!  I can't wait to implement this on my forum! Thanks, Crakter!  I had no idea it was even possible! Big Grin

Just to clarify, the only thing that has be changed to suit our own forum is ".TABLE_PREFIX." right?
no TABLE_PREFIX is already defined in your config.
You don't have to change anything, just the text before the number if you want to.
Could you whip this up as a quick plugin? I would love it plugin ready so on updates I won't lose the feature. If you don't want to let me know and I will release one. I just thought you may want dibs on this.
So what you're saying is we can leave it like it is??? I know that in 1.1.x, if we left it like ".TABLE_PREFIX." instead of mybb_, we would get an error!!!
Pages: 1 2