I am using a customization to pull the title of the latest entry in an external blog. See
https://vborg.vbsupport.ru/showthread.php?t=234254 for details
This works fine and generates no errors in the Forum.
However, I've now enabled the CMS and when I do that and try to leave a comment I get this error:
Code:
Fatal error: Call to undefined function CarpCacheShow() in /path/to/forum/includes/class_postbit.php(277) : eval()'d code on line 2
I assume this means something is not declared properly for the CMS.
The function in question is called in a plugin using the postbit_display_start hook:
PHP Code:
ob_start();
CarpCacheShow($post[field6]);
$blogentry = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('postbit',array('blogentry' => $blogentry));
What do I need to add/change to get CMS to "see" and process this?
(Reposted from http://www.vbulletin.com/forum/showt...defined-in-CMS as Lynne suggested)
--------------- Added [DATE]1272819511[/DATE] at [TIME]1272819511[/TIME] ---------------
I've discovered that I can avoid error messages if I use the global_start hook instead of the postbit_display_start hook and add a line like this:
PHP Code:
ob_start();
CarpCacheShow($post[field6]);
$blogentry = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('postbit',array('blogentry' => $blogentry));
vB_Template::preRegister('vbcms_page',array('blogentry' => $blogentry));
However, I'm not sure this is an efficient way to do this.
--------------- Added [DATE]1272854336[/DATE] at [TIME]1272854336[/TIME] ---------------
Added: No. That disables the errors on the home page of the CMS but as soon as you click through to one of the articles there are errors again.