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
  #32  
Old 01-11-2002, 11:51 AM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack!

Could someone help me figure out how to put this in my forumhome? I tried just inserting the "$percentoftotalposts% of total posts" but when I do that all I get is "% of total posts". Am I doing something wrong?

Thanks for your help!
Reply With Quote
  #33  
Old 01-22-2002, 06:10 AM
69-FLy-gUy's Avatar
69-FLy-gUy 69-FLy-gUy is offline
 
Join Date: Oct 2001
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You mean the postbit template when you make a post?

If so.. I am wondering how to also..

I palced the contents in showthread.php, but when i did, it made the pages 427 pages long for some reason...

Any help??
Ciao
Reply With Quote
  #34  
Old 05-05-2002, 06:04 AM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* inetd installed this hack
[/high]
Good hack!
Reply With Quote
  #35  
Old 05-05-2002, 06:07 AM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Sadie Frost
Great hack!

Could someone help me figure out how to put this in my forumhome? I tried just inserting the "$percentoftotalposts% of total posts" but when I do that all I get is "% of total posts". Am I doing something wrong?

Thanks for your help!
Sadie, you must add this code
Code:
 $countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
  $totalposts=$countposts['posts'];

  $percentoftotalposts = round(($userinfo[posts] / $totalposts) * 100,2);
in index.php
after this
Code:
$numbersmembers=$DB_site->query_first('SELECT COUNT(*) AS users,MAX(userid) AS max FROM user');
$numbermembers=number_format($numbersmembers['users']);
And add $percentoftotalposts% of total posts in forumhome template

GL!
Reply With Quote
  #36  
Old 05-16-2002, 01:28 PM
Eniyi's Avatar
Eniyi Eniyi is offline
 
Join Date: Mar 2002
Location: Turkey
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which file am I supposed to edit to put the percentage in the postbit?
Reply With Quote
  #37  
Old 05-16-2002, 02:38 PM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to also get the threads per day (assuming you've installed this hack and tubedog's hack according to this info: https://vborg.vbsupport.ru/showthrea...068#post198068)

in member.php

FIND
PHP Code:
  $jointime = (time() - $userinfo[joindate]) / 86400// Days Joined
  
if ($jointime 1) { // User has been a member for less than one day.
    
$postsperday "$userinfo[posts]"
ADD DIRECTLY UNDER THAT
PHP Code:
$threadsperday "$starts"
FIND
PHP Code:
    $postsperday sprintf("%.2f",($userinfo[posts] / $jointime)); 
ADD DIRECTLY UNDER THAT
PHP Code:
    $threadsperday sprintf("%.2f",($starts $jointime)); 
save and upload

than, in the getinfo template
REPLACE
PHP Code:
$starts ($percentageoftotalthreadsof total threads
WITH
PHP Code:
$starts ($threadsperday threads per day $percentageoftotalthreadsof total threads
and it should work fine

PS: see the screenie to see what I mean
Reply With Quote
  #38  
Old 05-16-2002, 11:20 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed on 2.2.5. Thanks for this hack!
Reply With Quote
  #39  
Old 05-19-2002, 02:55 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For the users with low posts, their percentage seems to be accurate, but for some reason I and others with high posts are getting a percentage over 100, see attachment:
Reply With Quote
  #40  
Old 05-20-2002, 06:32 AM
Broekie's Avatar
Broekie Broekie is offline
 
Join Date: Dec 2001
Location: Netherlands
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Velocd
For the users with low posts, their percentage seems to be accurate, but for some reason I and others with high posts are getting a percentage over 100, see attachment:
Looks like you've got an old version of this hack (that old version had this problem)

just read the first few posts, and see if that can help you...
Reply With Quote
  #41  
Old 05-22-2002, 02:06 PM
Eniyi's Avatar
Eniyi Eniyi is offline
 
Join Date: Mar 2002
Location: Turkey
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess my question was missed.

How can I display this percentage in the postbit?
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 06:26 PM.


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.11495 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_php
  • (2)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
  • (4)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_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