Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要代码替换钩子上的 vbulletin 模板中的一个单词 (global_start ....)
vb3中的代码
$vbulletin->templatecache['SHOWTHREAD'] = preg_replace("#word#", "replace", $vbulletin->templatecache['SHOWTHREAD']);
但我想要它用于 vbulletin 4
You should use str_replace instead:
$vbulletin->templatecache['SHOWTHREAD'] = str_replace("word", "replace", $vbulletin->templatecache['SHOWTHREAD']);