![]() |
Try
./admin/config.php |
Nope, that didn't work. I'll show you everything I have in my topposters.php file that is in my forum directory:
<?php //..........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/showthread.php?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 = "3"; // 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://216.10.11.101/forum/index.php"; // 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/config.php"; // path to your config.php file. may need a starting slash. *do not* put an ending slash on! $admins = "0"; // change this to "0" to leave admins off the list of top posters. // ///////////// END CONFIG ///////////// require("$path/config.php"); $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.php?&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>"); ?> When I goto the 216.10.11.101/forum/topposters.php I get the same message: "Fatal error: Failed opening required './admin/config.php/config.php' (include_path='.:/usr/local/lib/php') in /home/onlinega/public_html/forum/topposters.php on line 59" I haven't included it in my main forum page yet but that's because I can't get this single topposters.php to work correctly. Have you ever encountered this error? Do you have any more ideas? Please help? :confused: |
doh sorry try just
./admin |
YES IT WORKED! I love you so much! ;)
You are the man, man! But in all serious now, I really do appriciate the personal help you gave me there. It's working great and it's a beutiful peace of code! |
I only have one last problem now, I can't seem to get it to show up on the forum pages.
I add the code into the header section in the styles menu of the admin control pannel. I place it right below the control buttons where people can log into their user cp, register, calendar, member, etc... Any ideas? |
PHP isn't parsed in any of the templates, so it won't show up if you just put it in the header template. Really I wrote this for an external (to vB) page, but it could work inside it.
In your phpinclude template, put $topposters = implode('',file('path/to/topposters.php')); and then put $topposters where you want the list to appear. |
you don't need to use this inside vb there is also the feature
http://161.58.84.213/forum/memberlis...ers&perpage=10 |
Has anyone set this up to run in a vBportal block? If so, would you be willing to share your method? :)
|
Ok, I got this error:
"Unable to select database" So the problem is on: PHP Code:
What's the problem?! Fixed. :) |
Okay I uploaded it and when I directly visit the page it gives me the following message -
CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Thats all it gives :rolleyes: EDIT - I am very dumb lol I uploaded it to the wrong folder. The site root rather than the forum folder. Really need to get a decent FTP client rather than a web based one :D Nice hack. Like other hacks this requires error_reporting(7); to be added to the scirpt to get rid of those nasty error messages. |
You're still the best Boss....;)
|
TUBEDOGG:
I'm getting two problems.. 1.) When I click the name, it goes to bbs/admin instead of bbs/ for their profiles.. which makes a broken link.. ...and 2.) I'm not getting Administrators to show up, even though I set it to 1. |
Tubey...
I have the second problem too....:( |
*bump*
|
Quote:
Quote:
Code:
$exn = "WHERE usergroupid<>$exr"; Code:
$exn = "WHERE usergroupid<>$exr AND usergroupid!=6"; |
$url is http://www.soapedup.f2s.com/bbs ..
..and I changed around that coding, but still tries to get in my admin directory. The Top Posters Include is on my front page as well. |
Bah, I found the glitch. I had to change $path to my Forums directory.. you should really fix that tubedogg.
Or atleast change the $path/member.php?blahblah to $url/member.php?blahblah. |
c00l hack! can you please make a Top XX Threads started?
Thnx! |
Great hack Thanx alot, works like a charm
($admins = "0"; // change this to "0" to leave admins off the list of top posters. does so indeed, only the other way arround, so "1" to leave em off;)) |
See plz this sample --> include all needed functions in one file, not required conf file, all in one page, transparent include vb style on non vb pages....
|
While I appreciate your initiative, could you not use my thread? Thanks.
|
Indeed all much simply.
Can send ready file (worker version) good working at one of the sites(beside 60 non vb pages) |
First, nice hack dude.
though, i have a prob: when i include PHP Code:
and $topposters into the forumhome-template, the content of the php-file is being diplayed and spammes my page... any hints? btw: calling the topposters.php directly is workin fine.... |
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Place the $mytops anywhere you want the stats to be displayed. Hope this helps -Pie |
Tubedogg
I loaded your hack and it works but I have one probelm with it. I have a user that goes by AhoyM8 . He should be based on his post counts in the top 5, but with your hack he doesn't even showup in the top 10. In the member list top10 he shows up number 3. Any ideas? Can someone help with this I have updated counters in cp FIXED I HAD TO UPPATE HIS usergroupid from 3 to 2 IN THE DATABASE GREAT HACK!!!!!!!!! Click on Forums in my signature to see Top Posters. It is located at the bottom of the page lower left. |
Warning: Unable to access upload/admin/config.php in /usr/home/d/e/deadlycncu/public_html/upload/topposters.php on line 59
Fatal error: Failed opening required 'upload/admin/config.php' (include_path='') in /usr/home/d/e/deadlycncu/public_html/upload/topposters.php on line 59 thats wat i get i tried all sorts redownloaded and tried again ahhhhhhhhhh:mad: |
Change $path to admin/config.php
|
np i had to change path to admin thats it ive done it now anyway thx... oh dam now im having problams including file in my index.shtml page i tried
<!--#include file="cncu.deadlyfear.com/upload/topposters.php" --> <!--#include file="/upload/topposters.php" --> <!--#include file="upload/topposters.php" --> <!--#include file="topposters.php" --> and loads y dont it work ?? :( |
Trying not to have admins show up on list. I followed instructions in zip file but they still show up.
Any Ideas anyone? |
ye u set it to 0 instead of 1 tubedog got it mudled up now someone help me!
|
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>"); ?> |
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. |
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/ |
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. |
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:
Quote:
|
Quote:
Did you place the entire contents of tubedoggs hack into your index,php? What parts did you put in? Thanks Sarge |
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. :D
|
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 |
soceris,
rename the php file to .txt on your machine. Amy |
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!!!!! |
All times are GMT. The time now is 01:02 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|