testbot
02-15-2010, 09:09 PM
below is a snippet of code that i use to update tags from the subject line. some of my users have other mods installed that might require template edits around that line or that might do the same thing.
is there a better way to do this w/o having them make template edits?
$tagscript2 = 'onBlur="updateTagger()"';
$search = 'name="subject" id="subject"';
$replace = 'name="subject" id="subject" '.$tagscript2;
$vbulletin->templatecache['newthread'] = str_replace($search, $replace, $vbulletin->templatecache['newthread']);
i guess i'm looking for a best practice or something that will help reduce future issues or conflicts.
is there a better way to do this w/o having them make template edits?
$tagscript2 = 'onBlur="updateTagger()"';
$search = 'name="subject" id="subject"';
$replace = 'name="subject" id="subject" '.$tagscript2;
$vbulletin->templatecache['newthread'] = str_replace($search, $replace, $vbulletin->templatecache['newthread']);
i guess i'm looking for a best practice or something that will help reduce future issues or conflicts.