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
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
  #42  
Old 06-20-2002, 09:29 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working on 2.2.6, thanks!
Reply With Quote
  #43  
Old 07-01-2002, 02:41 PM
mrdave mrdave is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A combination of a couple of hacks and a fix for the error when there are no posts on the entire board: by kreft
Total Threads And Percentage Of Total Posts & Threads In Users Profile
A combination of User's Percent of Total Posts by apfeifer &
User Has Started X Threads by tubedogg

member.php
FIND:

PHP Code:
  if ($userinfo[customtitle]==2)
    
$userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
    
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]); 
ADD this after:

PHP Code:
  $startcount $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postusername='$userinfo[username]' AND open!='10'");
  
$starts $startcount[starts];
  
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
  
$totalposts=$countposts['posts'];
 if (
$totalposts == 0) { $totalposts=$totalposts 1; }
  
$percentoftotalposts round(($userinfo[posts] / $totalposts) * 100,2);
  
$counttotalthreads=$DB_site->query_first('SELECT count(*) AS threads FROM thread');
  
$totalthreads=$counttotalthreads['threads'];
 if (
$totalthreads == 0) { $totalthreads=$totalthreads 1; }
  
$percentageoftotalthreads round(($starts $totalthreads) * 100,2); 
getinfo template
FIND:

<tr>
<td bgcolor=""><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor=""><normalfont>$userinfo[posts]($postsperday posts per day)</normalfont></td>
</tr>

ADD this after:
<tr>
<td bgcolor=""><normalfont><b>Total Threads:</b></normalfont></td>
<td bgcolor=""><normalfont>$starts</normalfont></td>
</tr>
<tr>
<td bgcolor=""><normalfont><b>Percent of Total Posts & Threads:</b></normalfont></td>
<td bgcolor=""><normalfont>$percentoftotalposts% of total posts | $percentageoftotalthreads% of total threads</normalfont></td>
</tr>
Reply With Quote
  #44  
Old 07-21-2002, 04:40 PM
The Ghost's Avatar
The Ghost The Ghost is offline
 
Join Date: Feb 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

work's great on 2.2.6, thx for this great hack!
Reply With Quote
  #45  
Old 09-03-2002, 03:44 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Work well on 2.2.7.
Reply With Quote
  #46  
Old 09-23-2002, 06:08 PM
khaleejy khaleejy is offline
 
Join Date: Jul 2002
Location: a
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi

this is my first hack but it goes alright. this hack shows the member posts percent of the total board posts in the member profile page.

just take a look at:
https://vborg.vbsupport.ru/member.ph...o&userid=17654

Total Posts: 29 (0.48 posts per day | 0.02% of total posts on board)

that what the hack will do to you

sorry for my bad english,
humood
Reply With Quote
  #47  
Old 09-23-2002, 06:19 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been done before
https://vborg.vbsupport.ru/showthrea...threadid=32050

Just to let you know
Reply With Quote
  #48  
Old 09-23-2002, 06:44 PM
khaleejy khaleejy is offline
 
Join Date: Jul 2002
Location: a
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i didnt know :|
Reply With Quote
  #49  
Old 09-24-2002, 10:03 AM
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Location: Barefoot Bay Fl
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well maybe someone can help me. I'm using version 2.2.7.


Whats happening is it's showing the % of post, but not the PPD (post per day). I'm using the original of this hack. All i want is the PPD to show up again. how would i go about fixing this?
Thanks.

http://nemesis.thecoldshop.com/membe...tinfo&userid=1


a snipet of my getinfo template

Code:
<tr>

<td bgcolor="#1C5780"><normalfont><b>Total Posts:</b></normalfont></td>
	<td bgcolor="#1C5780"><normalfont>$userinfo[posts] ($postsperday posts per day / $percentoftotalposts% of total posts)</normalfont></td>
</tr>
and what I did to member.php
PHP Code:
 // grab the total number of posts to compare to this users
  
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
  
$totalposts=$countposts['posts'];

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

Thanks for the help.
Reply With Quote
  #50  
Old 10-29-2002, 08:44 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works with 2.2.8.
Reply With Quote
  #51  
Old 02-02-2003, 10:45 PM
BaldNut BaldNut is offline
 
Join Date: Nov 2001
Location: Manchester, UK
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working excellent in profile view, but how would i get it to work in my phpportals top ten page, i tried just adding "/ $percentoftotalposts% of total posts"

but that just gave blank results, any ideas ?
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 08:17 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.08427 seconds
  • Memory Usage 2,324KB
  • 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
  • (1)bbcode_code
  • (3)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_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