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
  #72  
Old 08-05-2001, 10:26 AM
acid acid is offline
 
Join Date: Oct 2001
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed the hack and I have tried everything, but I can't get past this error. I can't find the problem anywhere.
Parse error: parse error in /home/teamacid/public_html/topposters.php3 on line 45

This is my topposters.php, all my files are .PHP3 so I changed this to .PHP3- Could this be the problem?

<?php3

//..........Top X Posters v0.0.4..........\\
//......by Kevin (kevin@tubescan.com)......\\

// For vBulletin version 2, beta 3
// (c) 2001 Jelsoft Enterprises, Ltd.

// vBulletin.com thread: http://www.vbulletin.com/forum/showt...threadid=12067

///////////// CHANGE LOG /////////////
//
// New in version 0.0.4
// -- 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
//
// New in version 0.0.3
// -- Added option to exclude admins from list of posters
//
// New in version 0.0.2
// -- Fixed a small bug with the path.
//
// New in version 0.0.1
// -- Released!
//
/////////// END CHANGE LOG ///////////

//////// CONFIG EXPLANATION //////////
//
// a] $maxposters > This is the number of posters you want to show.
// b] $hc > The head row color.
// c] $bc1 and $bc2 > These are the first and second alternating color.
// d] $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.
// e] $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).
// f] $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.
// g] $url > This is the URL to your board directory. This is not the path to config.php! Do not put a trailing slash, either.
// h] $path > This *is* the path to your config.php file. This should include the /admin part. NO TRAILING SLASH! (May need a leading slash)
// i] $admins > Set this to "1" to show admins on the list of top posters. Set this to "0" to NOT show admins on the list.
//
////// END CONFIG EXPLANATION ////////

/////////////// CONFIG ///////////////
//
$maxposters = "5"; // change this to the number of posters you want to show. for a top 10 listing, set it to 10, etc.
$hc = "#999999"; // change to head row color.
$bc1 = "#696969"; // change to first alternating color.
$bc2 = "#5C5C5C"; // change to second alternating color.
$text = "#FFFFFF"; // change to text color.
$link = "#EEEEEE"; // change to link color.
$font = "Verdana,Helvetica,sans-serif"; // change to fonts you want. use serif or sans-serif for general, or use specific fonts names.
$fontsize = "8pt"; // change to font size you want. 8 is about the minimum; go up from there. 1 will not even show up.
$url = "http://www.teamacid.org/forum/index.php3"; // path to your board files. (e.g. index.php, member.php, etc.) may need a starting slash. *do not* put an ending slash on!
$path = "./admin"; // path to your config.php file. may need a starting slash. *do not* put an ending slash on!
$admins = "1"; // change this to "0" to leave admins off the list of top posters.
//
///////////// END CONFIG /////////////

require("$path/config.php3");
$db=mysql_connect($servername,$dbusername,$dbpassw ord) or die("Unable to connect to database");
mysql_select_db($dbname) or die("Unable to select database $dbname");

if ($admins == "1") {
$exq = mysql_query("SELECT usergroupid FROM usergroup WHERE cancontrolpanel='1'");
$exr = mysql_result($exq,0,0);
$exn = "WHERE usergroupid<>$exr";
}

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

$postsresult = mysql_query("SELECT username,posts,userid FROM user $exn ORDER BY posts desc LIMIT 0,$maxposters") or die("Unable to complete query");
while ($topposters = mysql_fetch_array($postsresult)):
if (($counter++ % 2) != 0) {
$bc=$bc1;
} else {
$bc=$bc2;
}
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>");
endwhile;
echo("</table>");

?>
Reply With Quote
  #73  
Old 09-10-2001, 12:15 AM
GameGalaxy
Guest
 
Posts: n/a
Default

Well before you post it might help to findout what is line 45?

It looks like you don't have // around words so it is screwed up near the beginning.

the <? <?php <?php3
I believe they all do the same thing, supposedly <?php3 was to let a programmer know that it was written in php3 code.
Reply With Quote
  #74  
Old 09-10-2001, 09:18 PM
dkilburn's Avatar
dkilburn dkilburn is offline
 
Join Date: Nov 2001
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've tried every combination I could think of to get the name link to work. Here's what I have in that section:

$url = "http://www.collegeteacher.org/forums";
$path = "./admin";

And it makes the name link to http://www.collegeteacher.org/admin/...info&userid=24 . I have tried using "./forums/admin", but then I get:

Fatal error: Failed opening required './forums/admin/config.php' (include_path='.:/usr/local/lib/php') in /home/kilburn/public_html/forums/topposters.php on line 59

Any ideas:

Debby Kilburn
http://www.collegeteacher.org/
Reply With Quote
  #75  
Old 09-10-2001, 09:33 PM
GameGalaxy
Guest
 
Posts: n/a
Default

Do what I did

make a new variable called

url2 = "http://www.yourdomain.com/forumdirectory";

then look in the url part below for $url and add the 2 after it and it will work fine.
Reply With Quote
  #76  
Old 09-13-2001, 09:04 PM
shadowbreed shadowbreed is offline
 
Join Date: Oct 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pie'oh'pah's solution works great check out http://www.snakepages.com/forum

also for people getting a link to admin/member.php?blablabla

find the line:


Quote:
$path/member.php?&action=getinfo&userid=$topposters[userid]\"
and change to:

Quote:
$url/member.php?&action=getinfo&userid=$topposters[userid]\"
Reply With Quote
  #77  
Old 09-29-2001, 10:56 PM
Sarge
Guest
 
Posts: n/a
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:
-Pie
I am confused

Did you place the entire contents of tubedoggs hack into your index,php?

What parts did you put in?
Thanks
Sarge
Reply With Quote
  #78  
Old 10-03-2001, 02:31 PM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to get this modified so it wouldn't display MODS either, just like it doesn't for admins? I'd really appreciate it.
Reply With Quote
  #79  
Old 10-08-2001, 04:54 PM
soceris
Guest
 
Posts: n/a
Default

Could somebody PLEASE upload the topposters.php file as a text file so that I can use it please. For some reason when i try to open a php file my pc associates it with a programmes photo parade.
Tis doing my nut in but I can get round it if somebody could just post the code as a normal text file

Thanks in advance
Reply With Quote
  #80  
Old 10-08-2001, 05:04 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

soceris,
rename the php file to .txt on your machine.

Amy
Reply With Quote
  #81  
Old 10-08-2001, 06:11 PM
soceris
Guest
 
Posts: n/a
Default

sorry to be a pain but i've tries every method under the sun to do that already.
Its doing my nut as i really want this hack installed.

help!!!!!
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 06:28 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.07448 seconds
  • Memory Usage 2,312KB
  • 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
  • (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
  • (4)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
  • (6)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