2014-06-06, 04:45 PM
Hi, I am trying to create a plugin that will display all my forums and categories, but i need to display all this in the page manager page any idea how to hook to it. Please check this code and correct whatever you feel would make it better:
$plugins->add_hook("misc_start", "sitemap22");
function sitemap22()
{
global $mybb, $sitemap, $theme, $db;
$query = $db->simple_select("forums", "fid");
while($row = $db->fetch_array($query))
{
$forumlink = get_forum_link($row['fid']);
$sitemap_forum .= "<tr><td class=\"trow2\">$forumlink</td></tr>";
$sitemap = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"tborder\">
<tr>
<td class=\"thead\" colspan=\"6\"><strong>Latest Threads</strong></td>
</tr>
{$sitemap_forum}
</table>";
}
}