All previous mods, when fetching data from db
i eval and use fetch template
then print eval..
But since vb4 thats not possible anymore..
the infamous parse error is a pain
Warning: fetch_template() calls should be replaced by the vB_Template class in [path]/includes/functions.php on line
and searching vbcom and vborg = nothing but people with the problem when they run
a vb3 mod on a vb4 board..
Say i got this line and want to upgrade that to vb4 how would i proceed ?
Thinking the last eval should be replaced with
Thanks in advance.
similar Q on vborg
i eval and use fetch template
then print eval..
But since vb4 thats not possible anymore..
the infamous parse error is a pain
Warning: fetch_template() calls should be replaced by the vB_Template class in [path]/includes/functions.php on line
and searching vbcom and vborg = nothing but people with the problem when they run
a vb3 mod on a vb4 board..
Say i got this line and want to upgrade that to vb4 how would i proceed ?
PHP Code:
if ($_REQUEST['do'] == 'main')
{
$emailresult =$vbulletin->db->query_read("SELECT userid, username, email FROM " . TABLE_PREFIX . "user ORDER BY userid");
while ($row = $vbulletin->db->fetch_array($emailresult))
{
$userid = htmlspecialchars_uni($row['userid']);
$username = htmlspecialchars_uni($row['username']);
$usermail = htmlspecialchars_uni($row['email']);
eval('$dbtestdata("' . fetch_template('$dbtestrow') . '");');
}
eval('print_output("' . fetch_template('dbtesttemplate') . '");');
}
Thinking the last eval should be replaced with
PHP Code:
$templater = vB_Template::create('dbtesttemplate');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());
similar Q on vborg
Comment