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
Details »»

Version: , by tubedogg tubedogg is offline
Developer Last Online: Dec 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-21-2001 Last Update: Never Installs: 8
 
No support by the author.

LAST UPDATED: 3.26.01 2:10 AM Eastern

I put together a little thing to show the top XX posters on your board. It can be used on a non-vB page. The username is a link to the member's profile.



Hack version: 0.0.4

Changes from version 0.0.1: Fixed a small bug with the path.
Changes from version 0.0.2: Added option to exclude admins from list of posters.
Changes from version 0.0.3: Fixed alternating colors so they are horizontal, not vertical. Changed $path to $url and $path2 to $path to make variables easier. Added a seperate header row color.

For version: 2.0.0 beta 3 (possibly also beta 1 and beta 2, but it is untested with those versions).

Files needed: topposters.php (see attached zip file below).

Files to edit: topposters.php (see instructions below).

Possible file locations: Anywhere, so long as the $path is set correctly.

Instructions
  • Unzip the file topposters.php from topposters004.zip to your hard drive.
  • Open topposters.php in an ASCII text editor, such as Notepad (Windows), SimpleText (Mac), EditPlus, UltraEdit, TextPad, etc. (DO NOT use WYSIWYG HTML editors such as FrontPage, HotDog, DreamWeaver, etc. They will in all likelyhood screw up the file! I will not be able to support you if you edit the file in one of these programs.)
  • Edit the variables at the top. These are:
    ---$maxposters > This is the number of posters you want to show.
    ---$hc > Set this to the color you want the header row to be.
    ---$bc1 and $bc2 > These are the first and second alternating colors. Look at the picture in the vbulletin.com thread and you'll see what I mean.
    ---$text and $link > Set the colors of the main text and the color of the links. Make sure this color is visible on both alternating colors, set in step 3b.
    ---$font > This is the font(s) to use for display. You can set specific fonts (e.g. Verdana, Arial, etc.) or general font-families (e.g. sans-serif, serif).
    ---$fontsize > Set a point size for your font. Size 8 is about equivelant to <font size=1>. Anything below about 6 will basically be undreadable, so be careful.
    ---$url > This is the path to your board files, such as index.php, members.php, etc. This is *not* the path to config.php (e.g. don't include the /admin part of the URL)!
    ---$path > This is the path to config.php - normally in the /admin directory. Do not add a trailing slash. It may need a leading slash.
    ---$admins > If you want admins included on the list of posters, set this to 1. If you do *not* want admins included, set this to 0.
  • Upload it to your website. You can include it as follows. To include it on a PHP-parsed page (.php, .php3, .phtml, etc.):
    Code:
    <? include("topposters.php"); ?>
    To include it on a server-parsed page (.shtml, .shtm, .ssi, etc.):
    Code:
    <!--#include file="topposters.php"-->

Instructions are included in the zip file (topposters.txt) and brief instructions are also in the topposters.php file itself.

FEEDBACK WANTED! Likes/dislikes/modification requests, please.

Show Your Support

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

Comments
  #92  
Old 10-14-2001, 10:04 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

find in topposters.php make sure you have 1's and not zero's see below this works for admins, but does not for moderators.

PHP Code:
$admins "1"// change this to "1" to leave admins off the list of top posters. 
PHP Code:
if ($admins == "1") {
    
$exq mysql_query("SELECT usergroupid FROM usergroup WHERE cancontrolpanel='1'");
    
$exr mysql_result($exq,0,0);
    
$exn "WHERE usergroupid<>$exr"
Reply With Quote
  #93  
Old 10-15-2001, 08:49 PM
Freegaia
Guest
 
Posts: n/a
Default

I can exclude administrators, but i want to exlude to all moderators.

How can i do ? Please
Reply With Quote
  #94  
Old 11-11-2001, 02:38 PM
Sloat Sloat is offline
 
Join Date: Nov 2001
Location: NE Texas
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by webhost
top of index.php make look like this

<?php
error_reporting(7);
require('./global.php');
require("./topposters.php");

Try that make sure topposters.php is in your forums root directory

add $topposters in forumhome you will need to build a table for it.
If I add the "require" line, the output of topposters.php appears at the top of the index.php instead of the table where I have $topposters
Reply With Quote
  #95  
Old 11-23-2001, 11:09 PM
Logtenberg Logtenberg is offline
 
Join Date: Nov 2001
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by webhost
top of index.php make look like this

<?php
error_reporting(7);
require('./global.php');
require("./topposters.php");

Try that make sure topposters.php is in your forums root directory

add $topposters in forumhome you will need to build a table for it.
I made the above modifications to my index.php - I basically just added the line: require("./topposters.php");

I uploaded topposters.php to the /forum folder and I added $topposters into my forumhome template.

When I go to load the page, the page is completely blank.

Any idea what's going on?

Thanks
Reply With Quote
  #96  
Old 11-25-2001, 02:07 AM
Logtenberg Logtenberg is offline
 
Join Date: Nov 2001
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind. I fixed it.
Reply With Quote
  #97  
Old 11-27-2001, 11:20 PM
Logtenberg Logtenberg is offline
 
Join Date: Nov 2001
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Pie'oh'pah
I worked around, you may find this interesting if you want to integrate it to your vbulletin pages, so i post it here.

What I did was pasting the code from topposters.php to my index.php

then changed the following:

Step 1 find:

PHP Code:
echo("<table border=0 cellpadding=4 cellspacing=0><tr><td align=\"center\" bgcolor=\"$hc\"><b style=\"color: $text; font-family: $font; font-size: $fontsize\"><i>Username</i></b></td><td align=\"center\" bgcolor=\"$hc\"><b style=\"color: $text; font-family: $font; font-size: $fontsize\"><i>Posts</i></b></td></tr>"); 
Change to read:

PHP Code:
$mytops="<table border=0 cellpadding=4 cellspacing=0><tr><td align=\"center\" bgcolor=\"$hc\"><b style=\"color: $text; font-family: $font; font-size: $fontsize\"><i>Username</i></b></td><td align=\"center\" bgcolor=\"$hc\"><b style=\"color: $text; font-family: $font; font-size: $fontsize\"><i>Posts</i></b></td></tr>"
Step 2 find:

PHP Code:
echo("<tr><td align=\"center\" bgcolor=\"$bc\" style=\"color: $text; font-family: $font; font-size: $fontsize\"><a href=\"$path/member.php3?&action=getinfo&userid=$topposters[userid]\" style=\"color: $link\">$topposters[username]</a></td><td align=\"center\" bgcolor=\"$bc\" style=\"color: $text; font-family: $font; font-size: $fontsize\">$topposters[posts]</td></tr>"); 
Change to read:

PHP Code:
$mytops .="<tr><td align=\"center\" bgcolor=\"$bc\" style=\"color: $text; font-family: $font; font-size: $fontsize\"><a href=\"./member.php3?&action=getinfo&userid=$topposters[userid]\" style=\"color: $link\">$topposters[username]</a></td><td align=\"center\" bgcolor=\"$bc\" style=\"color: $text; font-family: $font; font-size: $fontsize\">$topposters[posts]</td></tr>"
Step 3 find:

PHP Code:
echo("</table>"); 
Change to read:

PHP Code:
$mytops .="</table>"
Step 4:
Place the $mytops anywhere you want the stats to be displayed.

Hope this helps

-Pie

I did this and it works for me too. the problem I have though is that the administrator is not listed in the top posters even though I have $admins = "1";

Do you have this problem too? Is anyone having this problem where admins don't appear in top posters on index.php?
Reply With Quote
  #98  
Old 11-27-2001, 11:42 PM
Sinecure's Avatar
Sinecure Sinecure is offline
 
Join Date: Oct 2001
Location: Victoria, BC, Canada
Posts: 407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One of the usefull hacks, I luv it!
Reply With Quote
  #99  
Old 12-26-2001, 02:41 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on 2.2.1?
Reply With Quote
  #100  
Old 02-19-2002, 02:33 PM
nitro nitro is offline
 
Join Date: Nov 2001
Posts: 302
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

gr8 hack works fine in vbb 222 got it displaying in a sideblock on my portal

also id like to see a conversion of this hack instead of showing top overall posters cud sum1 tell me how to get this to query top thread starters in specific forum ids then u cud display say your top 5 news submitters
Reply With Quote
  #101  
Old 08-10-2002, 01:44 PM
ForKmaN's Avatar
ForKmaN ForKmaN is offline
 
Join Date: Jan 2002
Location: Australia
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
Fatal errorFailed opening required '/admin/config.php' (include_path='.:/php/includes:/usr/share/php'in /home/virtual/site44/fst/var/www/html/topposters.php on line 59 
eep :s

I seen this error for a few other people but I did every thing that was said, and I still get it!
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 02:30 PM.


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.08482 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
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_code
  • (9)bbcode_php
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)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