Not really sure if OK to ask here, since this question isn’t exactly related to this website.
In short, I’m lost why one code is, and an almost similar code isn’t working.
Working:
[php]$search = addslashes(‘‘);
$replace = addslashes(‘ test’);
$vbulletin->templatecache = str_replace($search, $replace.$search, $vbulletin->templatecache);[/php]
Not working:
[php]$search = addslashes(‘‘);
$replace = $vbulletin->templatecache;
$vbulletin->templatecache = str_replace($search, $replace.$search, $vbulletin->templatecache);[/php]
Working:
[php]$search = addslashes(‘
$headinclude instead of $vbulletin->templatecache … because $headinclude is constructed at the end of init.php…
Using $headinclude didn’t work I’m afraid (read didn’t work for me)
Managed to get it to work however
parse_templates
[php]$vbulletin->templatecache .= $vbulletin->templatecache;[/php]
cache_templates
[php]global $globaltemplates;
$globaltemplates[] = ‘vbdock_facebox’;[/php]
vbdock_facebox
[html] [/html]
Again, much appreciated (Y)
oh, i did not notice where you had it hooked… the problem was actually the addslashes wrongly written… 🙂