Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-20-2002, 08:42 PM
Joshua Clinard Joshua Clinard is offline
 
Join Date: Nov 2001
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 04-23-2002, 07:23 AM
XAM's Avatar
XAM XAM is offline
 
Join Date: Mar 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
???? ?? ?????? ????? ?? ????????.
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:49 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.03514 seconds
  • Memory Usage 2,183KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete