MyBB Community Forums

Full Version: Adding template through plugin activation error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

    $template = '<html>
                <title>{$mybb->settings[bbname]} - {$pageTitle}</title>
                <table border="0" cellspacing="1" cellpadding="4" class="tborder">
                <td class="thead"><strong>{$pageTitle}</strong></td>
                <td class="trow1">

                Add here your custom messages.


$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?

Just a thought but have you tried




As that should sort you out. Since you are including it all in ' ' rather than " " and in " " you wouldn't have to do so, but would have to say \$ \"\" etc, etc,  but yeah \'\' should be what you want as is?
That worked. Thanks
No worries, glad you got it sorted out. Smile