The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
I want to add some javascript code to the footer of the first page after user login(vb 4.1). I tried to use login_redirect hook but this code unfortunately doesn't work because templatecache is empty at that time? $vbulletin->templatecache["STANDARD_REDIRECT"] = str_replace('</body>', 'mycode</body>', $vbulletin->templatecache["STANDARD_REDIRECT"]); Any idea? |
|
#2
|
|||
|
|||
|
The templates don't get cached until the first template is created. But you could do something like this:
Code:
global $bootstrap;
if (!empty($bootstrap) AND !$bootstrap->called('template'))
{
$bootstrap->process_templates();
}
// the rest of your code here
|
|
#3
|
|||
|
|||
|
Thanks!!! It worked!!!
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|