Quote:
Originally Posted by KirbyDE
1) Which function?
2) Don't think so ... example code?
|
Thats a good idea KirbeDE. I had been treating the first post like the poll, but because of your suggestion I decided to treat the first post just like any other post, except I created a new class, and using this hook:
PHP Code:
($hook = vBulletinHook::fetch_hook('showthread_postbit_create')) ? eval($hook) : false;
$postbit_obj =& $postbit_factory->fetch_postbit($fetchtype);
if ($fetchtype == 'post')
{
$postbit_obj->highlight =& $replacewords;
}
$postbit_obj->cachable = $post_cachable;
I have made it so it calls vB_Postbit_MyClass. That did require some code editing to create the class, but its something that is very easy and only requires one edit.
Maybe I'll suggest they make a hook at this location:
PHP Code:
function &fetch_postbit($postbit_type)
{
switch ($postbit_type)
{
case 'post':
$out =& new vB_Postbit_Post();
if ($this->registry->options['legacypostbit'])
{
$out->templatename = 'postbit_legacy';
}
break;
It seems like they could handle it better than throwing an error on 'default' too.
Thanks for your help, everyone. And, if anyone gets 'continue' or 'return;' to work... I would love that as well.