2011-07-10, 06:44 PM
So I'm making a page where it shows threads from a certain section and I was going to add my own filtering.
Of course I started out with a basic page:
The template for it is:
Knowing me I'm doing something stupid, what's wrong?
EDIT: Yep, I have a += for the $plugincontent at the very end.
Of course I started out with a basic page:
<?php
define('IN_MYBB', 1);
define('THIS_SCRIPT', 'plugins.php');
require_once "./global.php";
$allplugins = $db->query("SELECT * FROM mybb_threads WHERE fid='8'");
$plugincontent='<table border="0" cellspacing="1px" cellpadding="8px" class="tborder">
<tr>
<td class="thead" width="15%"><strong>Categories</strong></td>
<td class="thead"><strong>Plugins</strong></td>
</tr>
<tr>
<td class="trow1">(categories here)</td><td class="trow1">';
$a=0;
while ($row = $db->fetch_array($allplugins)){
if($a==0){$a=1;} //First for horizontal rule
else{
$plugincontent.="<hr>";
}
$plugincontent.='<a href="/mybbtest/showthread.php?tid='.$row['tid'].'">'; //Thread ID
$plugincontent.=$row['subject']."</a>"; //Thread Title
$plugincontent.="<br>By <a href='/mybbtest/member.php?action=profile&uid='".$row['uid']."'>"; //User ID
$plugincontent.=$row['username']."</a>"; //User Name
}
$plugincontent+='</td>
</tr>
</table>';
add_breadcrumb("Plugins", "plugins.php");
eval("\$pluginspage = \"".$templates->get("plugintmp")."\";");
output_page($pluginspage);
?>
that's supposed to display every thread from that section.The template for it is:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$plugincontent}
{$boardstats}
<br style="clear: both" />
{$footer}
</body>
</html>
However, when I navigate to that page, the only thing where the {$plugincontent} should be is a 0 (even in raw html).Knowing me I'm doing something stupid, what's wrong?
EDIT: Yep, I have a += for the $plugincontent at the very end.