Well that's a little more difficult i'm thinking about this code
Code:
$forum['title'] = str_replace('"', "'", $forum['title']);
what would be the hook location?
*replace the " with the '
--------------- Added [DATE]1324406159[/DATE] at [TIME]1324406159[/TIME] ---------------
Ok this is driving me insane o.o!
I can't put a ' in a string!!
Is vbulletin?! Why this code doesn't work?
Code:
$find = '<h2 class="forumtitle"><a href="\' . vB_Template_Runtime::linkBuild("forum", $forum) . \'">\' . $forum[\'title\'] . \'</a></h2>';
$replace = ' \' ';
$vbulletin->templatecache['forumhome_forumbit_level2_post'] = str_replace($find, $replace, $vbulletin->templatecache['forumhome_forumbit_level2_post']);
If i write " all is ok but if i write \' it delete all the template! This is impossible..
--------------- Added [DATE]1324418531[/DATE] at [TIME]1324418531[/TIME] ---------------
Ok i'm thinking that this template doesn't accepts apostrophe i tried this code and it works
Code:
$find = 'test';
$replace = <<<DH DH;
$vbulletin->templatecache['forumhome_forumbit_level2_post'] = str_replace($find, $replace, $vbulletin->templatecache['forumhome_forumbit_level2_post']);
Then i tried this code but doesn't works!
Code:
$find = 'test';
$replace = <<<DH ' DH;
$vbulletin->templatecache['forumhome_forumbit_level2_post'] = str_replace($find, $replace, $vbulletin->templatecache['forumhome_forumbit_level2_post']);
What i mean with "doesn't work" it delete the template