Assuming I wanted to replace a large portion of the navbar template with a custom template, let's say from [minicode]<!-- nav buttons bar -->[/minicode] to [minicode]<!-- / nav buttons bar -->[/minicode], would the first part of this plugin be correct?
PHP Code:
$template = $vbulletin->templatecache['navbar']; $match = '<!-- nav buttons bar/.+/nav buttons bar -->'; $replace = $vbulletin->templatecache['djs_navbar'];
This is assuming that dot matches newlines. What I don't know what to do know, is what to do with the [minicode]preg_replace[/minicode] function itself. I thought something like: