2012-02-23, 11:58 AM
i using this code to my php file :
credit from this thread : http://community.mybb.com/thread-6190-page-45.html
but that code just list latest thread for all entire forum, i just want to display latest thread from specify sub forum, just like fid=8 for example, how about the code?
<?php
define("IN_MYBB", 1);
require_once("./global.php"); // Change this if needed
$tlimit = 6; // How many titles you want
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads ORDER BY `tid` DESC LIMIT $tlimit");
while($fetch = $db->fetch_array($query)){
echo '<body bgcolor="#E7EAC8"><ul style="list-style-image: url(http://crwscdn.appspot.com/bulletorange.png);padding:0px 0px 0px 10px;margin:0px 0px 0px 0px">
<li style="list-style-image: url(http://crwscdn.appspot.com/bulletorange.png);margin: -2px 0px;"><a style="text-decoration:none;color:#000000;font-family:verdana;font-size:11px" href="./showthread.php?tid='.$fetch['tid'].'target="_parent">'.$fetch['subject'].'</a><br /></li></ul>' . "\n";
}
?>
credit from this thread : http://community.mybb.com/thread-6190-page-45.html
but that code just list latest thread for all entire forum, i just want to display latest thread from specify sub forum, just like fid=8 for example, how about the code?