TinyPortal

Development => Support => Topic started by: Maddog452 on December 30, 2008, 07:33:12 AM

Title: [SOLVED] Parse Error.
Post by: Maddog452 on December 30, 2008, 07:33:12 AM
I have recently found an issue with my Profile area. I had a small "Seniors Moment" and uninstalled TP rather than the mod above it on the list and when I reinstalled it, I got a "Fatal error: Cannot redeclare tpsummary() " the same as the error described in the post at http://www.tinyportal.net/index.php/topic,23536.0.html . 

I followed this post and again got a similar problem (but didn't want to hijack that post) sich that I now get the error below.

Parse error: syntax error, unexpected $end, expecting T_VARIABLE or '$' in /XXX/XXX/XXX/Sources/Profile.php on line 2928

While the above listed post solved the problem, I could not find what they did between the before and after files (profile.php) to solve the problem.  It was probably something small like a missing { or a . but I'm not PHP literate enough.

Could someone please look at the attached file and let me know where I have cocked up.

Cheers

Dog
Title: Re: Parse Error.
Post by: G6Cad on December 30, 2008, 08:00:22 AM
Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)

Check the part for profile.php and make sure the tp code got added correctly
Title: Re: Parse Error.
Post by: JPDeni on December 30, 2008, 01:03:25 PM
Definitely look at the Modification instructions and do all of those things, but there's more problem than that. You have lost part of a function.

Your last line is


$row['value'] = $


which isn't even a full line. Delete that line and paste in


$row['value'] = $_POST['options'][$row['variable']];
$context['member']['options'][$row['variable']] = $row['value'];
}
mysql_free_result($request);

// Load up the default theme options for any missing.
foreach ($temp as $k => $v)
{
if (!isset($context['member']['options'][$k]))
$context['member']['options'][$k] = $v;
}
}
}

?>


Then to the TP modifications. Also look at some of your other mods and see if they have anything that needs to go at the end of the Profile.php file.
Title: Re: Parse Error.
Post by: Maddog452 on December 30, 2008, 10:10:56 PM
Thanks Guys

Found lots of double ups in the code and have cleaned it up and it seems to be working.

Cheers