View Full Version : last five threads of each forum on forum home?
vB-Host.com
07-30-2003, 09:31 AM
Anyone have a hack to do something like this? http://www.elitetrader.com/vb/
sabret00the
07-30-2003, 12:36 PM
if i was to think of a way to do it, it would be to introduce a new query for each forum, thus your server load goes up, but i aint a hacker, but it's pretty simple really, if no one helps you, i will try to
vB-Host.com
07-30-2003, 01:27 PM
ok great!
sabret00the
07-31-2003, 11:12 AM
since no one's helped you try this
this code is taken from nanoentity's top10 hack
// Top 10 Thread Replys
$pop = $DB_site->query("SELECT replycount,title,threadid,lastpost,postusername,la stposter,views FROM thread WHERE forumid<>'17' AND forumid<>'18' AND forumid<>'20' AND forumid<>'46' AND forumid<>'47' AND forumid<>'57' ORDER BY lastpost DESC LIMIT 5");
while ($poptop = mysql_fetch_array($pop)):
++$poptopnbsp;
$popthread .= "<a href=showthread.php?s=$session[sessionhash]&threadid=$poptop[threadid]>$poptop[title]</a> <a href=showthread.php?s=$session[sessionhash]&goto=newpost&threadid=$poptop[threadid]&goto=lastpost>»</a><br>";
$poppostusername .= "$poptop[postusername]<br>";
$poplastposter .= "$poptop[lastposter]<br>";
$popviews .= "$poptop[replycount] ($poptop[views])<br>";
endwhile;
fiddle witht hat make the nessassary references in your template and hey presto you should have it but then again i dunno nothing about php so i'm relying on my common sense :nervous:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.