Show Moderators on wwwthreads.php - 04/06/2001 10:08 PM
this hack is much better because there is less queries on the wwwthreads.php page than on postlist.php. you can see an example of this at http://www.extremeforums.org/wwwthreads2.php .
open up wwwthreads.php and find the line:
and change it so it looks like this:
Then find the line that looks like this:
and change it so it looks like this:
booya....
[:red]--------------
http://extremeforums.org
open up wwwthreads.php and find the line:
echo "</td>
<td class="tdheader" align=center>
$lang[THREAD_TEXT]
</td>
<td class="tdheader" align=center>
$lang[POSTS_TEXT]
</td>
<td class="tdheader" align=center>
$lang[LAST_POST]
</td>
</tr>
";
and change it so it looks like this:
echo "</td>
<td class="tdheader" align=center>
$lang[THREAD_TEXT]
</td>
<td class="tdheader" align=center>
$lang[POSTS_TEXT]
</td>
<td class="tdheader" align=center>
$lang[LAST_POST]
</td>
<td class="tdheader" align=center>
Moderators
</td>
</tr>
";
Then find the line that looks like this:
echo "
</td><td width="15%" nowrap class="posttime">
$time</td></tr>";
}
$dbh -> finish_sth($boards);
// -----------------------------------------------------
// This closes out the table we opened for the category
and change it so it looks like this:
echo "
</td><td width="15%" nowrap class="posttime">
$time</td><td width="15%" nowrap class="posttime">
";
$moderators = "";
$query = "
SELECT Mod_Username
FROM w3t_Moderators
WHERE Mod_Board = '$Board_q'
";
$sth = $dbh -> do_query($query);
$total = $dbh -> total_rows($sth);
for ($i = 0; $i < $total; $i++) {
list($moder) = $dbh -> fetch_array($sth);
$moder = "<a href="$config[phpurl]/showprofile.php?Cat=$Cat&User=$moder&Board=$Board">$moder</a>";
$moderators .= " $moder,";
}
$moderators = preg_replace("/,$/","",$moderators);
$dbh -> finish_sth($sth);
echo "$moderators";
echo "</td></tr>";
}
$dbh -> finish_sth($boards);
// -----------------------------------------------------
// This closes out the table we opened for the category
booya....
[:red]--------------
http://extremeforums.org