The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#42
|
||||
|
||||
Try
./admin/config.php |
#43
|
|||
|
|||
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? |
#44
|
||||
|
||||
doh sorry try just
./admin |
#45
|
|||
|
|||
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! |
#46
|
|||
|
|||
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? |
#47
|
||||
|
||||
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. |
#48
|
||||
|
||||
you don't need to use this inside vb there is also the feature
http://161.58.84.213/forum/memberlis...ers&perpage=10 |
#49
|
|||
|
|||
Has anyone set this up to run in a vBportal block? If so, would you be willing to share your method?
|
#50
|
||||
|
||||
Ok, I got this error:
"Unable to select database" So the problem is on: PHP Code:
What's the problem?! Fixed. |
#51
|
|||
|
|||
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 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 Nice hack. Like other hacks this requires error_reporting(7); to be added to the scirpt to get rid of those nasty error messages. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|