Hey all.
I have finally finished my product and am trying to make sure that I am following all of the vBulletin standards prior to release. I have a template that I want to insert prior to the "messagearea" in the "newthread" template.
Here is the code I have thus far:
Code:
$newTemplate = vB_Template::create('qma'); //my custom template
$rendered = $newTemplate->render();
$find = "{vb:raw messagearea}";
$vbulletin->templatecache['newthread'] = str_replace($find, $rendered . "\n" . $find, $vbulletin->templatecache['newthread']);
Now, the templatecache has the correct values and is populated. The issue is what to use for the "find". When I did a "print_r" on the templatecache for the newthread template, it shows the output for the message area part like this:
' . $message . '
So, I tried searching for that as well, and no luck. Of course, there is no pre-defined vBulletin hook in this position, so this is the only way to do it that I know of without doing actual template edits with the newthread template, which I definitely want to stay away from.
Any help on what to use for the "$find" condition would be greatly appreciated!