vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Percentage of posts in forum (https://vborg.vbsupport.ru/showthread.php?t=37671)

Joshua Clinard 04-20-2002 08:42 PM

Percentage of posts in forum
 
Can someone create a hack that tells the pershentage of posts in each forum? We have a new ranking system, and we need to know the perchentage of a users posts in each forum. I want this to be displayed underneath thier post count if possible.

XAM 04-23-2002 07:23 AM

Statistics of messages of the user on forums.

member.php

To find "// get last post" and insert before it(her)

PHP Code:

  // get users statistic
  
$r_userstats=$DB_site->query("SELECT forum.title,count(*)
                  FROM post,thread,forum 
                  WHERE post.userid= '
$userinfo[userid]'
                  AND post.threadid=thread.threadid 
                  AND thread.forumid=forum.forumid 
                  AND forum.countposts=1 
                  GROUP BY forum.forumid
                  ORDER BY 2 DESC"
);
  while (
$r_userstat=$DB_site->fetch_array($r_userstats)) {
    if (
$backcolor=="#EEEEEE") {
      
$backcolor="#DEDEDF";
      
$bgclass "alt2";
    } else {
      
$backcolor="#EEEEEE";
      
$bgclass "alt1";
    }

    
$r_userstat_p sprintf("%.2f",($r_userstat[1] * 100 $userinfo[posts]));

    
$rt_userstats[title]="$r_userstat[0]";
    
$rt_userstats[value]="$r_userstat[1]";
    
$rt_userstats[pers]= "($r_userstat_p %)";
    eval(
"\$rt_userstat .= \"".gettemplate("getinfo_userstats")."\";");

  } 

To create new Template getinfo_userstats:
PHP Code:

<tr>
    <
td bgcolor="$backcolor"><normalfont>$rt_userstats[title]</normalfont></td>
    <
td align="center" bgcolor="$backcolor"><normalfont><b>$rt_userstats[value]</b></normalfont></td>
    <
td bgcolor="$backcolor"><normalfont>$rt_userstats[pers]</normalfont></td>
</
tr

In Template getinfo find "<normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td></tr>"

To insert after it(her):
PHP Code:

<tr>
    <
td bgcolor="#DEDEDF"> <normalfont> <b>Statistics of messages of the user on forums:</b></normalfont> </td>
<
td>
<
table cellpadding="4" cellspacing="1" border="0" bgcolor="#000000"  width="100%">
$rt_userstat
</table>
</
td>
</
tr

???? ?? ?????? ????? ?? ????????. :(


All times are GMT. The time now is 07:15 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.01066 seconds
  • Memory Usage 1,731KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete