Helpful Information
 
 
Category: vBulletin 3.0
Thread Counter & Display

As Requested by BigJohnson..

This hack counts the numbers of threads a user has made in a specific forum or forums, and outputs the count on the postbits & the profile page..


Included is the instructions for up to 5 counters..but you can add in more, just read the code, its easy to follow :)

It also allows for exemptions from the counters based on userid's and not usergroups though i am sure its adaptable!

Enjoy!

Won't that code in the showthread add a query for every post on the page? It's in the loop, right? ;)

Yes, but consider the information it retreives along with the amount of post's per page..(a usual 15)..it adds about a second to load times :)

There's got to be an easier way to do that outside the loop. That's why I didn't meess with it because of the queries it would add. But at least you got it done. Good job. ;)

Thanks so much. Well u can just sort between threads made a different way but then u wont be able to edit the number of new threads created in the amdin cp or anything.

Thanks so much dude. I love you hehe.

Interesting one...

Very nice hack, one of my members were asking for this. I know he will find it useful :)

Hey, could you make some modifications for a new post count, for offtopic/spam forums? so they dont mixup with the normal post count?

Example:

Post: 980 (normal)
SPAM Post: 4666 (In the OFFTOPIC/CHAT/SPAM forums IDs: 2,3,4)

thanks n.nU

can anyone get this up and running? to have a total count of multiple forums?

bump?

Hello :)

I`ve seen to have some problem installing this one...

In the count1.txt file you say:

=========================================
Open functions_newpost.php
Add Before $DB_site->query(" on line 367
=========================================


// Begin Thread Count Hack By TouchingVirus
if (($foruminfo['forumid']=='counter1_forum1') || ($foruminfo['forumid']=='counter1_forum2'))
{
$threadcount1 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while ($threadcounter1 = $DB_site->fetch_array($threadcount1))
{$counter++;}if ($counter<1)
{
$DB_site->query("INSERT INTO thread_count (userid,count1) VALUES('".$bbuserinfo['userid']."',1)");
}
else
{
$DB_site->query("UPDATE thread_count SET count1=count1+1 WHERE userid=$bbuserinfo[userid]");
}
}
// End Thread Count Hack By TouchingVirus


But in my functions_newpost.php (under includes/functions_newpost.php) i have on line 367...


Line 365 // check that they can use this icon
Line 366 if ($post['iconid'] > 0)
Line 367 {
$membergroups = fetch_membergroupids_array($bbuserinfo);
$imagecheck = $DB_site->query("SELECT usergroupid FROM " . TABLE_PREFIX . "icon AS icon
INNER JOIN " . TABLE_PREFIX . "imagecategorypermission USING (imagecategoryid)
WHERE icon.iconid = $post[iconid]
AND usergroupid IN (" . addslashes(implode(',', $membergroups)) . ")
");

if ($DB_site->num_rows($imagecheck) == sizeof($membergroups))
{
$post['iconid'] = 0;
}
}

// ### POST NEW THREAD ###



eh.. kinda dumb here maybe, but please help me out.. :o

But hey, nice hack :D

Cheers, Cyberfreak.

By the way, uses vB 3.0.3

Could that do anything about it maybe... ?? hmm...

Never mind, i got it done :D

Thankx for your havk TV...again ;)

Cheers, Cyberfreak










privacy (GDPR)