Well you can open index.php and place this code after
require("global.php")
Code:
// Set this to the max number top posters to display
$num = 5;
$sql = "SELECT userid,username FROM user ORDER BY posts DESC LIMIT $num";
$results = $DB_site->query($sql);
while ($result = $DB_site->fetch_array($results))
{
$top5 .= "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> °
<A HREF=\"member.php?action=getinfo&userid=$result[userid]\">$result[username]</A></FONT><BR>";
}
OR
put this in a file called
top5.php
Code:
<?php
// Set this to the max number top posters to display
$num = 5;
$sql = "SELECT userid,username FROM user ORDER BY posts DESC LIMIT $num";
$results = $DB_site->query($sql);
while ($result = $DB_site->fetch_array($results))
{
$top5 .= "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> °
<A HREF=\"member.php?action=getinfo&userid=$result[userid]\">$result[username]</A></FONT><BR>";
}
?>
and then put
require("top5.php"); after
require("global.php");
then for either way you put $top5 in your
forumhome template where you want the results to show up.
[Edited by rangersfan on 09-13-2000 at 12:58 PM]