Voltar
01-17-2009, 07:53 AM
So since upgrading to vB 3.8.0 I've been recoding all of my hacks and template modifications to use plugins and I've ran into a bit of an issue. One of the little things that I do is remove the version number from public display, which requires a phrase edit/translation and editing the generator meta tag in the headinclude template.
After reading This (https://vborg.vbsupport.ru/showthread.php?t=151254), This (https://vborg.vbsupport.ru/showthread.php?t=151332) and This (https://vborg.vbsupport.ru/showthread.php?t=151288), and making progress on my other mods, I ran into a problem where I can't get a change to take place in the headinclude template, no matter what hook I try.
This is what I've been trying...
$gen_find = '<meta name="generator" content="vBulletin $vboptions[templateversion]" />';
$gen_replace = '<meta name="generator" content="vBulletin" />';
$vbulletin->templatecache['headinclude'] = str_replace($gen_find, $gen_replace, $vbulletin->templatecache['headinclude']);
I've also tried every combination of escaping and quoting that I can think of, and even using the the version number added in manually (with a hook after parse_templates), and even using $vbulletin->options['templateversion'] concatenated into the string. Any ideas?
Also, is there a simple/easy/proper way to directly concatenate two templates together?
After reading This (https://vborg.vbsupport.ru/showthread.php?t=151254), This (https://vborg.vbsupport.ru/showthread.php?t=151332) and This (https://vborg.vbsupport.ru/showthread.php?t=151288), and making progress on my other mods, I ran into a problem where I can't get a change to take place in the headinclude template, no matter what hook I try.
This is what I've been trying...
$gen_find = '<meta name="generator" content="vBulletin $vboptions[templateversion]" />';
$gen_replace = '<meta name="generator" content="vBulletin" />';
$vbulletin->templatecache['headinclude'] = str_replace($gen_find, $gen_replace, $vbulletin->templatecache['headinclude']);
I've also tried every combination of escaping and quoting that I can think of, and even using the the version number added in manually (with a hook after parse_templates), and even using $vbulletin->options['templateversion'] concatenated into the string. Any ideas?
Also, is there a simple/easy/proper way to directly concatenate two templates together?