PDA

View Full Version : Replacing default template with custom using plugin?


m03
02-21-2010, 04:22 AM
Has anyone figured out how to replace a default vbulletin template with a custom one using a plugin? This used to be possible using:

$vbulletin->templatecache['pm_messagelistbit'] = $vbulletin->templatecache['pm_messagelistbit_preview'];

but that doesn't work in vb4 :(

I'm trying to add a pm preview hack to vb4 so I need to replace the default pm_messagelistbit with a custom template automatically.

Paul M
02-21-2010, 09:28 AM
That method works fine in vb4, i use it myself.

m03
02-21-2010, 01:00 PM
Thanks for the reply Paul, which hook are you using when getting the above code to work?

* Found the answer (parse_templates) my error was in not adding the replacement template to the cache first. D'Oh!