PDA

View Full Version : How to fetch BBCODECACHE?


Adult SEO
03-10-2008, 02:10 PM
Dear vBulletin experts,

I am currently working on a more advanced mod for vBulletin 3.7 B5 and am trying to do the folowing:

I start a script e.g. script.php (just include('global.php'); for $vbulletin) and then upon a trigger I want to load the regular vBulletin editor (standard forum editor page for a new thread/reply).

However, I keep receiving the folowing error:


Warning: Invalid argument supplied for foreach() in /includes/functions_editor.php on line 649


Even when adding the folowing on top of the script.php file that is loaded before the editor script (include global.php):

$specialtemplates = array(
'smiliecache',
'bbcodecache',
'ranks',
);

I already tried $vbulletin->datastore->fetch($specialtemplates); however the $vbulletin->bbcodecache does not get populated.

The error is caused by the folowing loop in functions_editor.php on line 649:

foreach ($vbulletin->bbcodecache AS $bbcode)

Anybody has any idea how to populate the bbcode cache array in the right way to be able to show the default vBulletin new thread editor page for a forum?

Thanks in advance for your tips/support!

Best Regards,
Jan Jaap

Dismounted
03-11-2008, 05:36 AM
Are the other caches being fetched?

Adult SEO
03-11-2008, 01:52 PM
Are the other caches being fetched?

Could you please be more specific by what you mean by that?

The phrases are catched, however also using a trick (https://vborg.vbsupport.ru/showthread.php?t=171629).

Thanks in advance for your support.

Best Regards,
Jan Jaap

--------------- Added 11 Mar 2008 at 16:35 ---------------

The error seems to be caused by something other then my script.

Just accessing the original newthread.php?do=newthread&f=2 file will return the same error in Beta 5, it must have been a bug.

Right now I reuploaded all new Beta 6 filesand I ran an upgrade and the error is gone!