News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

$context['insert_after_template']

Started by spiros, May 06, 2020, 01:40:09 PM

Previous topic - Next topic

spiros

Is this a valid function?

I want to move some js from header to footer in Load.php but when I change:

if (!isset($context['html_headers']))
$context['html_headers'] = '';

// OneAll Social Login (https://docs.oneall.com/plugins/)
if ( ! empty ($modSettings['oasl_api_subdomain']))
{
$context['html_headers'] .= "\n<!-- OneAll.com / Social Login for SMF //-->\n";
$context['html_headers'] .= '<script type="text/javascript" src="//www.translatum.gr/forum/Themes/default/scripts/library.js"></script>';
}


To:

if (!isset($context['insert_after_template']))
$context['insert_after_template'] = '';

// OneAll Social Login (https://docs.oneall.com/plugins/)
if ( ! empty ($modSettings['oasl_api_subdomain']))
{
$context['insert_after_template'] .= "\n<!-- OneAll.com / Social Login for SMF //-->\n";
$context['insert_after_template'] .= '<script type="text/javascript" src="//www.translatum.gr/forum/Themes/default/scripts/library.js"></script>';
}


I get no output in the footer

vbgamer45

Depends on where you put in the file in load.php it says it starts at

Load.php(1673): $context['insert_after_template'] = '';


// This allows sticking some HTML on the page output - useful for controls.
$context['insert_after_template'] = '';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

spiros


Advertisement: