Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Thread... Post... and Reply Count... Details »»
Thread... Post... and Reply Count...
Version: 1.00, by g-force2k2 g-force2k2 is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-19-2002 Last Update: Never Installs: 6
 
No support by the author.

It's really a quick hack but i thought i'd release it because maybe some members would find interest in it... requested by Barret... it requires only a file edit and template edit... yes a smaller hack i usually try to stay away from them because i like challenges...

open admin/functions.php

find:

PHP Code:
$post[joindate]=vbdate($registereddateformat,$post[joindate]); 
above it add:

PHP Code:
global $DB_site;
$threads $DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE postuserid='$post[userid]'");
    
$post[threads] = $threads['threads'];
    
$post[replies] = $post[posts] - $post[threads]; 
the open the postbit template and place $post[threads] and/or $post[replies] wherever you like... hopefully it'll be useful to some member...

Enjoy

g-force2k2

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-20-2002, 08:10 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it'll add one extra query per post as i see.
you should optimize it, so it'll cache values it has already
Reply With Quote
  #13  
Old 08-21-2002, 02:15 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon could you explain to me what you mean... i kinda have an idea... but i want to learn... after all thats why im hacking

g-force2k2
Reply With Quote
  #14  
Old 08-21-2002, 10:03 AM
kmfdm_kid2000's Avatar
kmfdm_kid2000 kmfdm_kid2000 is offline
 
Join Date: Mar 2002
Location: Where Towers Crumble (NYC)
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, this is good, my members have been asking for this. Works great, easy install. I only use the Thread count variable, not the replies as well. It's interesting to see people's stats though...
Reply With Quote
  #15  
Old 08-21-2002, 10:12 AM
FFMania FFMania is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack...but I already have too much things in my postbit so...not for me XD
Reply With Quote
  #16  
Old 08-21-2002, 03:26 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@g-force:
you should replace this:
PHP Code:
$threads $DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE postuserid='$post[userid]'");
    
$post[threads] = $threads['threads'];
    
$post[replies] = $post[posts] - $post[threads]; 
with something like this:
PHP Code:
if(!isset($threads[$post[userid]])) {
$threads[$post[userid]] = $DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE postuserid='$post[userid]'");
}
    
$post[threads] = $threads[$post[userid]['threads'];
    
$post[replies] = $post[posts] - $post[threads]; 
this should reduce the querys if the same user has two or more posts in one thread on the displaying page
Reply With Quote
  #17  
Old 09-01-2002, 11:16 AM
Ice Man_00 Ice Man_00 is offline
 
Join Date: Jan 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, but i`m keep getting a parse error in line 188 in that file

(Using vbb 2.2.7 - Works here ??)

Thx
Reply With Quote
  #18  
Old 09-01-2002, 11:47 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought I had a solution, but then I found :

Fatal error: Call to a member function on a non-object in /home/virtual/site26/fst/var/www/html/forums/admin/functions.php on line 198

Satan
Reply With Quote
  #19  
Old 09-01-2002, 01:02 PM
Ice Man_00 Ice Man_00 is offline
 
Join Date: Jan 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx for helping out anyway
Reply With Quote
  #20  
Old 09-01-2002, 04:06 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you can just use my original coding on post#15... Xenon made the first coding and im not sure whats up with it... but i'll test it later and find out whats up... regards...

g-force2k2
Reply With Quote
  #21  
Old 09-01-2002, 04:13 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks g-force

Satan
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05036 seconds
  • Memory Usage 2,316KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete