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
PM Statistics bar in thread view Details »»
PM Statistics bar in thread view
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-15-2002 Last Update: Never Installs: 4
 
No support by the author.

This hack was requested by SgtSling.

This is a very simple hack that displays the PM statistics of a user in the thread view screen.
It requires no template modifications because it appends itself on to $post[posts].

Here is how to implement this hack.

In showthread.php look for the following code:
PHP Code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }
  
$postbits .= getpostbit($post);

And replace it with the following:
PHP Code:
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {

  if (
$postdone[$post[postid]]) {
    
$counter--;
    continue;
  } else {
    
$postdone[$post[postid]]=1;
  }

  
$pmcount=$DB_site->query_first("select count(*) as msgs from privatemessage where userid = $post[userid]");
  
$pmratio 100 $pmcount[msgs] / $pmquota;
  if(
$pmratio 100) {
    
$pmratio 100;
  }
  
$pmstats "<p><font face=\"verdana\" size=\"1\">PM Stats:</font><br>";
    
$pmstats "$pmstats<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"80%\" bordercolor=\"#000000\" bordercolorlight=\"#000000\" bordercolordark=\"#000000\"><tr><td bgcolor=\"#b5b5b5\"><img src=\"images/polls/bar3.gif\" width=\"$pmratio%\" height=\"9\"></td></tr></table>";
  
$pmstats "$pmstats\n$pmcount[msgs]/$pmquota";
  
$post[posts]="$post[posts]$pmstats";

  
$postbits .= getpostbit($post);

Click on the following link for a screenshot of this hack: http://www.ls1.com/forums/showthread...hreadid=110647

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-16-2002, 08:46 AM
[D]Vincent's Avatar
[D]Vincent [D]Vincent is offline
 
Join Date: Jun 2002
Location: In my own little world?
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, nice idea. I might install this a little later.
Reply With Quote
  #3  
Old 08-16-2002, 08:57 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. You are too kind.
Reply With Quote
  #4  
Old 08-16-2002, 08:59 AM
DudeSicko DudeSicko is offline
 
Join Date: Apr 2002
Location: Denmark
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this when i install it.

PHP Parse error: parse error, unexpected T_STRING in C:\Inetpub\webhotel\xxxxxxxx\forum\showthread.php on line 435
Reply With Quote
  #5  
Old 08-16-2002, 09:07 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DudeSicko
I get this when i install it.

PHP Parse error: parse error, unexpected T_STRING in C:\Inetpub\webhotel\xxxxxxxx\forum\showthread.php on line 435
Sorry My bad.

I copied and pasted this from my editor and it copied the "\" along with the line breaks.

It's fixed now.
Reply With Quote
  #6  
Old 08-16-2002, 01:52 PM
morrow's Avatar
morrow morrow is offline
 
Join Date: Mar 2002
Location: NJ
Posts: 370
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like that a lot! Is there any way I can get instructions and code if possible so I can add that to my site?

Thanks

Dennis
Reply With Quote
  #7  
Old 08-16-2002, 02:41 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by morrow
I like that a lot! Is there any way I can get instructions and code if possible so I can add that to my site?

Thanks

Dennis
Here you go: Spoiler Tag Instructions
Reply With Quote
  #8  
Old 08-16-2002, 03:22 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Who is the person who rated "1" this thread?
If you think is really worth nothing, why don't you write up one similar... better?

/me just rated the thread 5
Reply With Quote
  #9  
Old 08-16-2002, 05:15 PM
Attrox's Avatar
Attrox Attrox is offline
 
Join Date: Jan 2002
Location: St.Paul, MN
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea, I may install it soon. And yes, I'm not sure why this has a thread rating so low...
Reply With Quote
  #10  
Old 08-16-2002, 07:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be made to work with private messages in the privmsg template?

Also, I want that spoiler vbcode, can I have it? Please?
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 09:04 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.04480 seconds
  • Memory Usage 2,314KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_php
  • (2)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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