2015-05-05, 03:55 PM
site:
public_html/index.php
forums:
public_html/forums/index.php
MyBB: 1.8
I want to place the last 5 threads of a specific category on my site index.php
I got this code, but doesn't seem to work.
url: www.primeknights.com
Anyone can help me?
public_html/index.php
forums:
public_html/forums/index.php
MyBB: 1.8
I want to place the last 5 threads of a specific category on my site index.php
I got this code, but doesn't seem to work.
<?php $query = $db->query("SELECT * FROM ".TABLE_PREFIX."announcements WHERE fid='$x'");
while($announcement = $db->fetch_array($query))
{
eval("\$announcements .= \"".$templates->get("sometemplate")."\";");
}
?><p>
<?php
$forumquery = $db->query("SELECT fid, name FROM ".TABLE_PREFIX."forums");
while($forum = $db->fetch_array($forumquery))
{
$fid = $forum['fid'];
$threadquery = $db->query("SELECT * FROM ".TABLE_PREFIX."threads WHERE fid=$fid ORDER BY dateline DESC LIMIT 10");
while($thread = $db->fetch_array($threadquery))
{
eval("\$threads .= \"".$templates->get("PKTheme")."\";"); // Put the template name that you want each thread to use.
} // Close thread loop
$postquery = $db->query("SELECT * FROM ".TABLE_PREFIX."posts WHERE fid=$fid ORDER BY dateline DESC LIMIT 10");
while($post = $db->fetch_array($postquery))
{
eval("\$posts .= \"".$templates->get("PKTheme")."\";"); // Put the template name that you want each post to use.
} // Close post loop
} // Close forum loop
?>
url: www.primeknights.com
Anyone can help me?