General Community > Scripting Help

$context['insert_after_template']

(1/1)

spiros:
Is this a valid function?

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


--- Code: ---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>';
}
--- End code ---

To:


--- Code: ---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>';
}
--- End code ---

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'] = '';


--- Code: --- // This allows sticking some HTML on the page output - useful for controls.
$context['insert_after_template'] = '';

--- End code ---

spiros:
Yes, that did it, thanks!

Navigation

[0] Message Index

Go to full version