Hi guys,
Totally new to PHP and not sure what to correct, this is the line in question:
$ce, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '<'))
return;
could anyone tell me how to correct this pls? url: www.epsomvideo.co.uk/forum
thx a lot
What modifications have you made to the SMF files? Also, please post several lines above the line and several lines below. Make sure to use the code tags when you post your code.
This is a copy of the sub.php file, parse error on line 1035, unexpected ','
code given here from line 1016
$codefromcache = array_keys($code_to_from);
$codetocache = array_values($code_to_from);
// GLOWING or /shadowed/ text.
$codefromcache[] = '~\[glow=([#\w]{3,12}),([012]\d{1,2}|\d{1,2})(,[^]]+)?\](.+?)\[/glow\]~i';
$codetocache[] = isset($disabled['glow']) ? '$4' : '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">$4</td></tr></table> ';
$codefromcache[] = '~\[shadow=([#\w]{3,12}),(left|right|top|bottom|[0123]\d{0,2})\](.+?)\[/shadow\]~ei';
$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';
// Moving text... stuff $codefromcache[] = '~\[move\](.+?)\[/move\]~i';
$codetocache[] = isset($disabled['move']) ? '$1' : '<marquee>$1</marquee>';
// Handle flash.
$codefromcache[] = '~\[flash=(\d+),(\d+)\](?:<br />)*([^<>]+?)(?:<br />)*\[/flash\]~ie';
if (empty($modSettings['enableEmbeddedFlash']) || isset($disabled['flash']))
$codetocache[] = isset($disabled['url']) ? '"$3"' : '"<a href=\"" . strtr("$3", array("\"" => """)) . "\" target=\"_blank\">$3</a>"';
// Internet Explorer for Windows.
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$ce, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '<'))
return;
$message = strtr($message, array('$' => '$'));
// Replace <a href="something">somewhere</a> with HTML.
if (!empty($modSettings['enablePostHTML']) && strstr($message, '<'))
I did modification of index.php + subs.php files as indicated in the step by step.
Re-read the instructions on how to modify Subs.php. Your modification is incorrect, but I don't have any experience with this mod so I can't tell you exactly what you should have done.
Ok I have replaced subs.php file with a back-up file, i re-entered the correct hacks as explained in mambo-mod file.
// Put the session ID in.
if (defined('SID') && SID != '')
$setLocation = preg_replace('/' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', $scripturl . '?' . SID . '&', $setLocation);
if (function_exists('mambo_smf_url'))
$setLocation = mambo_smf_url($setLocation);
and
// Don't exit if we're coming from index.php; that will pass through normally.
if (!$from_index || WIRELESS)
{
if (function_exists('mambo_smf_exit'))
mambo_smf_exit($do_footer && !WIRELESS);
else
exit;
}
Saved the new sub file in my forum Sources directory. I am still getting :
Parse error: parse error, unexpected ',' in /var/www/vhosts/epsomvideo.co.uk/httpdocs/forum/Sources/Subs.php on line 1035
:(
This is where your problem is:
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$ce, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '<'))
Specifically, the line that starts with $ce is the problem. You need to correct whatever changed those lines. What version of SMF are you running?
I am running SMF 1.0.7, Mambo 4.5.2 and bridge 3.19
Quote from: kegobeer on April 12, 2006, 11:39:44 AM
This is where your problem is:
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$ce, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '<'))
Specifically, the line that starts with $ce is the problem. You need to correct whatever changed those lines. What version of SMF are you running?
This is the line that should be at 1035:
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$codetocache[] = '"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"$1\" height=\"$2\"><param name=\"movie\" value=\"" . strtr("$3", array("\"" => """)) . "\" /><param name=\"play\" value=\"true\" /><param name=\"loop\" value=\"true\" /><param name=\"quality\" value=\"high\" /><param name=\"AllowScriptAccess\" value=\"never\" /><embed src=\"" . strtr("$3", array("\"" => """)) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => """)) . "\" target=\"_blank\">$3</a></noembed></object>"';
If your mod changes it, then you need to apply the correct changes.
ssanner... please do not start mutlipel threads on the same topic!
i replaced line 1035 with right code and now I am getting another error. i give-up it is too complicated for me/ thanks for your help though. :-[
Why was this posted in the Mambo/Joomla bridge board? This has nothing to do with the bridge....