vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User's Percent of Total Posts (https://vborg.vbsupport.ru/showthread.php?t=32050)

FleaBag 06-20-2002 09:29 AM

Working on 2.2.6, thanks! :D

mrdave 07-01-2002 02:41 PM

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>

The Ghost 07-21-2002 04:40 PM

hi,

work's great on 2.2.6, thx for this great hack!

FleaBag 09-03-2002 03:44 PM

Work well on 2.2.7. :D

khaleejy 09-23-2002 06:08 PM

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 :)

Velocd 09-23-2002 06:19 PM

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

Just to let you know ;)

khaleejy 09-23-2002 06:44 PM

well i didnt know :|

neocorteqz 09-24-2002 10:03 AM

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.

FleaBag 10-29-2002 08:44 PM

Works with 2.2.8. :)

BaldNut 02-02-2003 10:45 PM

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 ?

Alien 05-28-2003 03:48 AM

Just to be clear, this adds +1 query to the member's profile pages?


All times are GMT. The time now is 01:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01738 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete