zanthor
12-28-2009, 11:15 PM
So I've gone through and fixed the template, and I've gone through the PHP and something isn't right...
Before:
while ($player = $db->fetch_array($res))
{
// code excluded
eval('$rosterbits .= "' . fetch_template('gwr_roster_bit') . '";');
}
With this code it dumped out the full roster of my guild.
After:
while ($player = $db->fetch_array($res))
{
// Code Excluded
$templater = vB_Template::create('gwr_roster_bit');
$templater->register_page_templates();
$templater->register('player', $player);
$templater->register('gwr_phrase', $gwr_phrase);
$templater->register('guild', $guild);
$templater->register('armory', $armory);
print_output($templater->render());
}
With this code it only dumps the first character.
I'm sure I'm doing something wrong, but I'm not sure what.
Before:
while ($player = $db->fetch_array($res))
{
// code excluded
eval('$rosterbits .= "' . fetch_template('gwr_roster_bit') . '";');
}
With this code it dumped out the full roster of my guild.
After:
while ($player = $db->fetch_array($res))
{
// Code Excluded
$templater = vB_Template::create('gwr_roster_bit');
$templater->register_page_templates();
$templater->register('player', $player);
$templater->register('gwr_phrase', $gwr_phrase);
$templater->register('guild', $guild);
$templater->register('armory', $armory);
print_output($templater->render());
}
With this code it only dumps the first character.
I'm sure I'm doing something wrong, but I'm not sure what.