2020-02-07, 11:39 PM
Hey again.
I'm creating a template for my plugin, and I need to include the likes of
For my title etc, however, with the following code:
I get an error saying it will cause an error, because of the missing '' around bbname, however when I wrap it in '' or "" I get unexpected character errors. What do I do? Is this an error thrown up because of escape string?
Thanks
I'm creating a template for my plugin, and I need to include the likes of
$mybb->settings['bbname'];
For my title etc, however, with the following code:
$template = '<html>
<head>
<title>{$mybb->settings[bbname]} - {$pageTitle}</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>{$pageTitle}</strong></td>
</tr>
<tr>
<td class="trow1">
Add here your custom messages.
</td></tr></table>
{$footer}
</body>
</html>';
$templateArray = array(
'title' => 'paypalShopTemplate',
'template' => $db->escape_string($template),
'sid' => '-1',
'version' => '',
'dateline' => time()
);
I get an error saying it will cause an error, because of the missing '' around bbname, however when I wrap it in '' or "" I get unexpected character errors. What do I do? Is this an error thrown up because of escape string?
Thanks