vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Thread Counter & Display (https://vborg.vbsupport.ru/showthread.php?t=64018)

TouchingVirus 04-16-2004 10:00 PM

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!

Boofo 04-17-2004 09:51 PM

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

TouchingVirus 04-17-2004 10:01 PM

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 :)

Boofo 04-17-2004 10:04 PM

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. ;)

BigJohnson 04-18-2004 05:23 AM

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.

gmarik 04-19-2004 03:48 PM

Interesting one...

Logikos 04-23-2004 01:41 AM

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

Ryuujin 05-02-2004 02:12 PM

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

pjdaley 05-28-2004 12:56 AM

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

pjdaley 06-04-2004 03:29 AM

bump?

Cyberfreak 10-11-2004 10:53 PM

Hello :)

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

In the count1.txt file you say:
Code:

=========================================
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...

Code:

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...

Cyberfreak 10-16-2004 10:36 AM

Never mind, i got it done :D

Thankx for your havk TV...again ;)

Cheers, Cyberfreak


All times are GMT. The time now is 12:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01128 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete