Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by apfeifer apfeifer is offline
Developer Last Online: Jan 2007 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-02-2001 Last Update: Never Installs: 70
 
No support by the author.

Hack: User's Percent of Total Posts
Version of vB: 2.2.0, although may work on earlier versions but not tested
Current Version: 1.0.0
Description: This gives you a user's percent of the total posts on your forum.


Once again, this is a small hack but show's something interesting. Enjoy!

Show Your Support

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

Comments
  #2  
Old 11-03-2001, 01:30 AM
apfeifer apfeifer is offline
 
Join Date: Oct 2001
Location: Sioux Falls, South Dakota, USA
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Er, duh, helps if I attach the file...

03.11.01: Fixed issue with percent's on users with post count of over 1000, thanks FireFly!
Reply With Quote
  #3  
Old 11-03-2001, 02:15 AM
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
Location: somewhere you're not
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice hack! But, when I tried it out, it said that one of my users had 5988.52% of total posts. :?:
Reply With Quote
  #4  
Old 11-03-2001, 03:09 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, it looks like the results are 1000 times higher than what they should be.

For example, I have 9771 posts on a 116,395-post board. I have 8.39469% of the total posts. Yet it says I have 8423.28%. (It also looks like the rounding is off.)
Reply With Quote
  #5  
Old 11-03-2001, 03:47 AM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm well on popular boards the percent would be .02 % and so forth.... also it's a good idea to restrict the number of decimals.
Reply With Quote
  #6  
Old 11-03-2001, 11:40 AM
apfeifer apfeifer is offline
 
Join Date: Oct 2001
Location: Sioux Falls, South Dakota, USA
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eek, sorry about that, I'll fix it as soon as I get home from tryouts.

Reply With Quote
  #7  
Old 11-03-2001, 12:20 PM
apfeifer apfeifer is offline
 
Join Date: Oct 2001
Location: Sioux Falls, South Dakota, USA
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by JJR512
Yeah, it looks like the results are 1000 times higher than what they should be.

For example, I have 9771 posts on a 116,395-post board. I have 8.39469% of the total posts. Yet it says I have 8423.28%. (It also looks like the rounding is off.)
Hmm, I just plugged the numbers for your posts / your boards posts in and it worked fine:

PHP Code:
$percentoftotalposts round((9774  116429) * 100,2);

echo 
$percentoftotalposts
That echo's: 8.39

So I'm not totally sure. Paste the exact code that you have in member.php (just those couple lines, of course), and I'll look them over. I don't really see anything to fix because it's working for me.

Reply With Quote
  #8  
Old 11-03-2001, 12:23 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
  $totalposts=number_format($countposts['posts']);
should be
Code:
  $totalposts=$countposts['posts'];
because number_format() adds commas to the number (i.e 1000 => 1,000).
Reply With Quote
  #9  
Old 11-03-2001, 03:07 PM
apfeifer apfeifer is offline
 
Join Date: Oct 2001
Location: Sioux Falls, South Dakota, USA
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank's FireFly! I have uploaded the fixed version of it.

Reply With Quote
  #10  
Old 11-03-2001, 03:21 PM
toLTcaboLT toLTcaboLT is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmzz I know it's little stupid .. but when I install where I can see that info ?

Can someone post screenshot .. I wanna too see that Hack .. Please? Tnx
Reply With Quote
Reply

Thread Tools

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 03:24 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.04487 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_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