Basically i'm trying to grab the topic titles and links from the database and display them on a page as a summary.
Here is my home.php file:
<?php
# /*
# * Filename: home.php
# * Version: 1.0.1
# * Author: thedragonpaladin@hotmail.com
# */
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
// Start output of page
//
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//
// Grab Announcements
//
$sql = "SELECT forum_id,topic_title,topic_id, FROM phpbb_topics
WHERE forum_id='1'";
while($result=mysql_query($sql))
{
$topic_id = $result["topic_id"];
$forum_id = $result["forum_id"];
$topic_title = $result["topic_title"];
}
$template->assign_block_vars('news',array(
'TOPIC_TITLE' => $topic_id,
'FORUM_ID' => $forum_id,
'TOPIC_TITLE' => $topic_title)
);
$template->set_filenames(array(
'body' => 'home_body.tpl')
);
//
// Generate the page
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Here is my home_body.tpl file:
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td width="50%" rowspan="2"><div align="center">[Graphic]</div></td>
<td width="50%" background="templates/neonSYLFE/images/cellpic3.gif"><div align="center"><strong>News:</strong></div></td>
</tr>
<!-- BEGIN news -->
<tr><td><div align="center">{news.TOPIC_TITLE}</div></td></tr>
<!-- END news -->
<tr>
<td colspan="2"><div align="center">[Banner]</div></td>
</tr>
<tr>
<td colspan="2" background="templates/neonSYLFE/images/cellpic3.gif"><div align="center"><strong>Newest Items:</strong></div></td>
</tr>
<tr>
<td colspan="2"><div align="center">[Items]</div></td>
</tr>
</table>
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
<input class="post" type="text" name="username" size="10" />
{L_PASSWORD}:
<input class="post" type="password" name="password" size="10" maxlength="32" />
<!-- BEGIN switch_allow_autologin -->
{L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
<!-- END switch_allow_autologin -->
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table>
</form>
<!-- END switch_user_logged_out -->
(yes i'm aware i only have the title variable referenced in the template but until i can get that to work i might as well wait before i add the link.)
The page displays fine but nothing comes up, I assure you that all the database column references are valid and contain data.