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)
-   -   vB3 Forum Quick Stats Cache Serialize Hack v1.1 (https://vborg.vbsupport.ru/showthread.php?t=61581)

pjdaley 06-21-2004 06:59 PM

(install has been clicked).... boooofooooo i need this hackkkkk.... is it hard to do? count threads of alot of forums to one sum?

pjdaley 06-21-2004 07:03 PM

that one has all the forums into 1 sum right? i can just choose 5? forums to count? (good job by the way)

Boofo 06-22-2004 07:07 AM

Quote:

Originally Posted by pjdaley
that one has all the forums into 1 sum right? i can just choose 5? forums to count? (good job by the way)

No, that hacks shows ALL of the threads that each user has started right next to how many posts they have made, in the postbit.

Nj?rd Eriksson 07-12-2004 06:39 AM

Quote:

Originally Posted by Boofo
But after you deleted the users and updated the counters, it should have straightened itself out. Did you update the theread and forum counters as well as the postcount? You need to do that, too.

Yes, I have updated all these counters. I do so quite regularly, whenever I change someone's username. However, vBulletin keeps a number of user records that equals the total number of registrations; and not the active registrations. All those users that have been pruned seem to be assigned no user ID (or an ID of 0) -- that's what I assume at least.

I also have been mistaken about this user "Strapu", which allegedly is the "Top Thread Starter" in this forum:

Top Threads: Strapu (117 Threads = 12.39%)

He did indeed exist, and has been pruned at some stage (what explains his user ID 0). He, however, definitely didn't start 117 threads in this forum -- that's rather the number of threads started by all pruned users combined. He did create -- amongst others -- the first thread in this forum, however.

The

Top Posts: (1,117 Posts = 7.83%)

problem where no user is displayed is then probably related. That should again be the total number of posts made by all pruned users combined.

Osterling 07-18-2004 09:30 PM

These maybe two stupid qestiosn but..

1.) how do you debug
and
2.) how do you add a settings

Osterling 07-20-2004 09:00 PM

anyone?

Elmer 08-19-2004 02:54 AM

Quote:

Originally Posted by exasko
anyone?

Edit your config.php and put this variable anywhere in the config.php file

$debug = "1";

next, go to your admincp and in your vBulletin Options select Forum Display Option (forumdisplay)
onece there, just click the link Add New Setting

that should work ;)

psico 08-20-2005 11:10 PM

There is a problem with the queries, I found the solution:

In forumdisplay.php find this code:
PHP Code:

        $topthreads $DB_site->query_first("
                SELECT COUNT(threadid) as threads, postusername, postuserid
                FROM " 
TABLE_PREFIX "thread
                WHERE forumid=
$forumid
                GROUP BY postuserid
                ORDER BY threads DESC, dateline ASC
                LIMIT 1
        "
);

        
$topposter $DB_site->query_first("
                SELECT user.userid, user.username, COUNT(post.postid) AS postcount
                FROM " 
TABLE_PREFIX "post
                LEFT JOIN " 
TABLE_PREFIX "thread ON (post.threadid = thread.threadid)
                LEFT JOIN " 
TABLE_PREFIX "user ON (post.userid = user.userid)
                WHERE thread.forumid=
$forumid
                GROUP BY post.userid
                ORDER BY postcount DESC
                LIMIT 1
        "
); 

Replace with this code:

PHP Code:

        $topthreads $DB_site->query_first("
                SELECT COUNT(threadid) as threads, postusername, postuserid
                FROM " 
TABLE_PREFIX "thread
                WHERE forumid=
$forumid  AND postuserid <> 0
                GROUP BY postuserid
                ORDER BY threads DESC, dateline ASC
                LIMIT 1
        "
);

        
$topposter $DB_site->query_first("
                SELECT user.userid, user.username, COUNT(post.postid) AS postcount
                FROM " 
TABLE_PREFIX "post
                LEFT JOIN " 
TABLE_PREFIX "thread ON (post.threadid = thread.threadid)
                LEFT JOIN " 
TABLE_PREFIX "user ON (post.userid = user.userid)
                WHERE thread.forumid=
$forumid AND user.userid IS NOT NULL AND user.username IS NOT NULL
                GROUP BY post.userid
                ORDER BY postcount DESC
                LIMIT 1
        "
); 

That's all!

See ya.


All times are GMT. The time now is 11:31 AM.

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.01216 seconds
  • Memory Usage 1,748KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete