Nieuw lid |
|
Ok heb dus een klein probleempje met een php script.
Ik gebruik dus phpbb3 als template engine enzo dit terinfo. Voor de rest werkt alles normaal alleen deze pagina doet ambetant
Hieronder mijn php code:
$colums = 4;
$count=1;
$break=$colums;
$template->set_filenames(array('page' => 'links.tpl'));
$sql = 'SELECT name, url, description, user_id FROM site_links where active=1 order by name asc';
if( !($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not obtain LINK information', '', __LINE__, __FILE__, $sql);
}
while($data = $db->sql_fetchrow($result))
{
print_r($data);
$template->assign_block_vars('LINK',array( 'url' => $data['url'],
'description' => $data['description'],
'poster' => $data['user_id'],
'name' => $data['name'],
));
}
require('includes/overall_header.php'); // HEADER
$template->display('page');
//print_r($template->_tpldata);
$colums = 4; $count=1; $break=$colums; $template->set_filenames(array('page' => 'links.tpl')); $sql = 'SELECT name, url, description, user_id FROM site_links where active=1 order by name asc'; if( !($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain LINK information', '', __LINE__, __FILE__, $sql); } while($data = $db->sql_fetchrow($result)) { $template->assign_block_vars('LINK',array( 'url' => $data['url'], 'description' => $data['description'], 'poster' => $data['user_id'], 'name' => $data['name'], )); } require('includes/overall_header.php'); // HEADER $template->display('page'); //print_r($template->_tpldata);
Die print_r($data); dat ik doe geeft mooi de data weer dus die is ingevuld ook heb ik print_r($template->_tpldata); gedaan en dat is ook allemaal mooi ingevuld met dezelfde data, zien ik soms ergens over?
Het tpl bestand
<h2 align="center" style="font-family: 'Old English Text MT';"><u>Links</u></h2>
<table border="0" align="center" width="60%" cellpadding="0" cellspacing="0" class="forumline">
<!-- BEGIN LINK -->
<tr>
<td class="row1" align="center"><a class="gen" href="{LINK.url}" target="_new">{LINK.name}</a></td>
</tr><tr>
<td class="row1" align="center">{LINK.description}<br />Gepost door: {LINK.poster}</td>
</tr>
<!-- END LINK -->
</tr>
</table>
<h2 align="center" style="font-family: 'Old English Text MT';"><u>Links</u></h2> <table border="0" align="center" width="60%" cellpadding="0" cellspacing="0" class="forumline"> <tr> <td class="row1" align ="center"><a class="gen" href ="{LINK.url}" target ="_new">{LINK.name }</a ></td > </tr><tr> <td class="row1" align ="center">{LINK.description }<br />Gepost door : {LINK.poster }</td > </tr> </tr> </table>
Ik krijg dus een pagina terug waar {LINK.name} enzo niet geparsed zijn. Aan wat ligt dit?
|