Im looking for a hack that shows the top posters on your baords on the main page, so I can make it show up on my home page, anyone ever seen one?
Sorry, I wasn't thinking...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Put this in any page you want to. Just change the path to global.php and the LIMIT statement to reflect how many people you want to display. It's set at 10.
HTH
-jim
Wow thanks, but how do I, and what can I do with one line of code? What do i do to incorp it into a php file in another DIR
it's in the same directory
help ... :(
try changing the lines to this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
This should tell you where your error is...
Good Luck,
do you have this in the same directory had global.php? if not you have to have the full path for it to open it
I did that and I get this error
Warning: Supplied argument is not a valid MySQL-Link resource in /web/sites/3/leokiller/www.flyaway.f2s.com/board/main.php on line 15
and on line 15 the only thing on is is this symbol -> {
Originally posted by JimF
Sorry, I wasn't thinking...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Put this in any page you want to. Just change the path to global.php and the LIMIT statement to reflect how many people you want to display. It's set at 10.
HTH
-jim
I got it to work by making a file inside the vBulletin folder, setting the global require path to just require("global.php"); and then called the file using the reltivie path (eg. include ("http://www.yourdomain.com/vBulletin/topposters.php") and everything worked nice and quickly.
$db_link is wrong I think , with what should I replace it ?
help help help plzzzzzzz
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
THANKS MAN! Wow, this wasnt hard like it thought, sweet!
is sais error connecting to DB ,how is that possible ? It uses my global.php yes ? Well since my vbulletin shows no problems and connects without errors ,how can this script make an error connecting ? Please help , I really want this script to work
blabla
require("global.php");
print("| Top Posters |
| Username | Posts | ");
$db_link = @mysql_pconnect("$dbservername", "$dbusername", "$dbpassword");
mysql_select_db ("$dbname", $db_link)
or die("Error connecting to DB");
$query = mysql_query("SELECT posts, username FROM user ORDER BY user.posts DESC, user.username DESC LIMIT 0, 10")
or die("Query Error:$query");
while($row = mysql_fetch_array($query))
{
$username = $row["username"];
$posts = $row["posts"];
print("| $username | $posts | ");
}
print(" ");
?>
that's the script I use ,and this is the error I get :
Warning: Supplied argument is not a valid MySQL-Link resource in /web/sites/3/blabla111111/www.blabla.f2s.com/board/main.php on line 15
Error connecting to DB
Blank page when attempting to edit templates
Reasons for WorldPay and vB system not accepting order |