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

Here ya go:

https://vborg.vbsupport.ru/attachmen...862&fullpage=1
Reply With Quote
  #13  
Old 11-03-2001, 03:34 PM
toLTcaboLT toLTcaboLT is offline
 
Join Date: Nov 2001
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool .. Tnx man
Reply With Quote
  #14  
Old 11-03-2001, 03:36 PM
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
Location: somewhere you're not
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working great now. Thanks apfeifer and FireFly!
Reply With Quote
  #15  
Old 11-03-2001, 03:42 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First, thanks to FireFly; that fixed my problem.

Next, I'd like to show how I took the basic idea of this hack and extended it to work with tubedogg's 'user has started xx threads' hack (which was my idea ). This hack adds a new line to a person's profile, below the person's post count (and now the post percentage count, with this hack), and shows how many threads a person has started. What I've done is taken the idea of this hack, interfaced it with tubedogg's hack, to display the percentage of total threads that a person has started.

1. Install this hack
2. Install tubedogg's hack from here, only instead of adding the contents of his memberadd.txt file where he tells you to in his step #2, insert the contents of that file just above the bit you added from this hack.
3. Below the bit you added to member.php from this hack, add this:
Code:
// Find percentage of threads started
$counttotalthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=$counttotalthreads['threads'];
$percentageoftotalthreads = round(($starts / $totalthreads) * 100,2);
4. In the getinfo template, assuming you have already added the contents of getinfoadd.txt from tubedogg's hack, find $starts and change it to $starts ($percentageoftotalthreads% of total threads).

I would like to get permission from apfeifer and tubedogg to re-release their individual hacks along with my modifications as one unified hack (with full crediting, of course).
Reply With Quote
  #16  
Old 11-03-2001, 03:44 PM
apfeifer apfeifer is offline
 
Join Date: Oct 2001
Location: Sioux Falls, South Dakota, USA
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me likes!

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

No problems.
I installed this here, it's cool to have. leased:
Reply With Quote
  #18  
Old 11-03-2001, 03:57 PM
GeorgeofCS's Avatar
GeorgeofCS GeorgeofCS is offline
 
Join Date: Oct 2001
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it to work, but I did have a problem in this line

$percentoftotalposts = round(($userinfo[posts] / $totalposts) * 100,2);

it wouldn't work so I had to change it to

$percentoftotalposts = round(($userinfo[posts] / $totalposts) * 100);

but for me it doesn't give decimals.
Reply With Quote
  #19  
Old 11-03-2001, 04:04 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What version of PHP are you using George?
Reply With Quote
  #20  
Old 11-03-2001, 04:16 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.vbulletin.com/forum/showt...threadid=32024

Try to use this:
Code:
$percentoftotalposts=sprintf('%.2f', (($userinfo[posts] / $totalposts) * 100);
Reply With Quote
  #21  
Old 11-03-2001, 04:33 PM
GeorgeofCS's Avatar
GeorgeofCS GeorgeofCS is offline
 
Join Date: Oct 2001
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately I'm on php 3.16 I think. I'd have to check on the actual version number.

That replacement string didn't work
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 08: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.04702 seconds
  • Memory Usage 2,293KB
  • 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
  • (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_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