This code works just fine on localhost, running PHP 5.0.5. On the live site, running PHP 4.3.2, I get the following error:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /var/www/html/includes/class_bbcode.php(149) : eval()'d code on line 14
PHP Code:
// Deck tag plugin by Stephan Hoyer
// http://www.sccs.swarthmore.edu/users/08/hoyer/decktag/
//
// Title: Custom bbcode tag WYSIWYG fix
// This code is necessary so that when using the WYSIWYG editor to edit a post,
// vBulletin does not attempt to still show the HTML in the editor (as it does for
// simple [url] or [b] tags), but rather completely unparses the tags, returning
// the original tags around the contents of the post.
//
// vB3.5 hook location: bbcode_create
if (class_exists('vB_BbCodeParser_Wysiwyg') AND is_a($this, 'vB_BbCodeParser_Wysiwyg'))
{
foreach ($this->tag_list AS &$option)
{
foreach ($option AS &$tag_name)
{
if ($tag_name['callback'] == 'handle_external')
{
$tag_name['callback'] = 'handle_wysiwyg_unparsable';
}
}
}
}
Any ideas why this isn't working? Line 14 is the first foreach line, but it seems to be perfectly well formed. I'm pretty sure the live site and my localhost copy are the same in all other relevant respects.