MyBB Community Forums

Full Version: find_replace for all templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How to use find_replace for all templates like index, footer, header and others?
	require_once MYBB_ROOT."/inc/adminfunctions_templates.php";
find_replace_templatesets("TEMPLATE_NAME", "#".preg_quote('THING_ALREADY_PRESENT')."#i", 'THING_ALREADY_PRESENT+THING_TO_ADD');
for ALL templates not for only one
Don't be lazy, just change the CAPITAL letters to your desired template name, and what code you are going to replace.
okay i will do but is there a way to find_replace all the templates?
You mean all templates at once ? No, you've to replace each code using above function separately.