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)

Sadie Frost 01-11-2002 11:51 AM

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

69-FLy-gUy 01-22-2002 06:10 AM

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

inetd 05-05-2002 06:04 AM

[high]* inetd installed this hack
[/high]
Good hack! :)

inetd 05-05-2002 06:07 AM

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!

Eniyi 05-16-2002 01:28 PM

Which file am I supposed to edit to put the percentage in the postbit?

Broekie 05-16-2002 02:38 PM

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

FleaBag 05-16-2002 11:20 PM

Installed on 2.2.5. Thanks for this hack!

Velocd 05-19-2002 02:55 PM

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:

Broekie 05-20-2002 06:32 AM

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...

Eniyi 05-22-2002 02:06 PM

I guess my question was missed.

How can I display this percentage in the postbit?


All times are GMT. The time now is 07:12 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.01075 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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