2015-05-05, 11:21 AM
Your template should not contain backslashes in it. The reason you see it in the plugin file is because you need to escape the single quote so it can be inserted into the database.
(2015-05-05, 07:56 PM)r3nt3r Wrote: [ -> ]Hello, I have a little problem. I want to include this in the footer template but it doesn't work. :/
If I leave it in the index template it works fine, but when moved it doesn't show.
(2015-05-05, 08:06 PM)dragonexpert Wrote: [ -> ](2015-05-05, 07:56 PM)r3nt3r Wrote: [ -> ]Hello, I have a little problem. I want to include this in the footer template but it doesn't work. :/
If I leave it in the index template it works fine, but when moved it doesn't show.
This is because the footer template is evaluated before the code runs. You'd need to change the hook to global_start for it to work. I can't guarantee everything would work correctly though.
(2015-05-05, 11:21 AM)dragonexpert Wrote: [ -> ]Your template should not contain backslashes in it. The reason you see it in the plugin file is because you need to escape the single quote so it can be inserted into the database.
$lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
$latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
{$lang->latest_post_by} {$lastposterlink} {$lang->latestposttime}
{$lang->latest_post_by} {$lastposterlink} {$latestposttime}
$lastpostlink = get_thread_link($thread['tid'], "", "lastpost");
<strong><a href="{$mybb->settings[\'bburl\']}/showthread.php?tid={$tid}">{$postname}</a></strong><br>
<strong><a href="{$mybb->settings[\'bburl\']}/{$lastpostlink}">{$postname}</a></strong><br>