I adapted the Latest Blog Using Carp add-on to vB4 here:
https://vborg.vbsupport.ru/showthread.php?t=234254
At the time, I was using only the Forum (CMS and Blog disabled in the Suite) and it worked fine, displaying the title of the latest (external) blog feed in the postbit for any forum post by that member.
The add-on uses two small plug-ins:
1.
Carp Configuration, attached to the "global_start" hook location (I realize this should now be changed to global_bootstrap_init_start but doing that makes no difference - I still get the errors).
PHP Code:
require_once '/path/to/forum/carp/carp.php';
CarpConf('carperrors',0);
CarpConf('cacheinterval',120);
/** You may want to set a cachepath specifically for your forum **/
/** CarpConf('cachepath','/path/to/carp_cache/'); **/
/** CarpConf('cacherelative',0); **/
/** You can omit the above two lines without a problem **/
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',1);
CarpConf('iorder','link');
CarpConf('linktarget',1);
2.
Get Users Blog Entry, attached to postbit_display_start
PHP Code:
ob_start();
CarpCacheShow($post[field6]);
$blogentry = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('postbit',array('blogentry' => $blogentry));
When I enable CMS, however, I get errors like this depending on which hook I attach the two plgins to:
Quote:
Warning: Invalid argument supplied for foreach() in [path]/includes/class_postbit.php(321) : eval()'d code on line 21
Warning: Invalid argument supplied for foreach() in [path]/includes/class_postbit.php(321) : eval()'d code on line 21
Warning: Invalid argument supplied for foreach() in [path]/includes/class_postbit.php(321) : eval()'d code on line 21
Warning: Invalid argument supplied for foreach() in [path]/includes/class_postbit.php(321) : eval()'d code on line 21
|
The thing is that this should only function for forum posts anyway. It isn't needed in CMS (or the vBulletin Blog for that matter although I haven't enabled that yet). For me, the errors are seen whenever I try to edit the CMS article or add or edit a comment. Another user who has this installed reported the same problems.
What do I need to do to eliminate these errors?