News:

Join the Facebook Fan Page.

Main Menu

Parse Errors

Started by Slave2000, March 15, 2011, 08:26:00 PM

Previous topic - Next topic

Slave2000

I am running RC5

I seem to have problems after my host has updated things too.

I have some parse errors, and there are no longer any error logs.

Two that I have found are when trying to prune logs I get this: Parse error: syntax error, unexpected T_IF in /home/franglai/public_html/Sources/ManageSettings.php on line 371

Also, when I go to modification settings I get this:

Parse error: syntax error, unexpected T_IF in /home/franglai/public_html/Sources/ManageSettings.php on line 371


When I try to access features and options:

Parse error: syntax error, unexpected T_IF in /home/franglai/public_html/Sources/ManageSettings.php on line 371

There may be other problems that I am currently unaware of.

I have no idea on how to code whatsoever, and would appreciate any help offered.

Xarcell

Make sure the whole file is there, and the code isn't cut off.

Slave2000

Quote from: Xarcell on March 15, 2011, 08:27:01 PM
Make sure the whole file is there, and the code isn't cut off.

I am sorry, but I don't understand what you mean. I know nothing about coding.  :-\

Suki

can you attach your Sources/ManageSettings.php please and tell us a list of mods you had installed on your forum
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Slave2000

I have the Staff List Mod, Gallery and Arcade. I actually have 2 versions of this file, and was not sure which one you wanted, so will attach them both.

Suki

what Arcade mod did you had installed?  please post the link to that mod, it appears an edit made by that mod its causing the issue.


the ~  at the end means its a back up file,  every time you install a mod, SMF makes both back up files for the files the mod will modify and a semi-complete backup of all your files.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

HunterP

Quote from: Slave2000 on March 15, 2011, 09:11:11 PM
I have the Staff List Mod, Gallery and Arcade. I actually have 2 versions of this file, and was not sure which one you wanted, so will attach them both.

It seems as if your Arcade mod messed up some code :

	
// Anyone who would like to add a core feature?
	
call_integration_hook('integrate_core_features', array(&$core_features)// arcade = arcade (makes sense, right?) 'arcade' => array( 'url' => 'action=admin;area=arcade', 'settings' => array( 'arcadeEnabled' => 1, ), ),
	
if (
$return_config)
	
{
	
	
$return_data = array();
	
	
foreach (
$core_features as $id => $data)
	
	
	
$return_data[] = array('switch', isset($data['title']) ? $data['title'] : $txt['core_settings_item_' $id]);
	
	
return 
$return_data;
	
}


On the second line you see an addition done by Arcade, which doesn't make any sense since it is commented out (preceded by two slashes).

To fix this, it should be either

	
// Anyone who would like to add a core feature?
	
call_integration_hook('integrate_core_features', array(&$core_features)); // arcade = arcade (makes sense, right?) 'arcade' => array( 'url' => 'action=admin;area=arcade', 'settings' => array( 'arcadeEnabled' => 1, ), ),


Or

	
// Anyone who would like to add a core feature?
	
call_integration_hook('integrate_core_features', array(&$core_features));


This should fix the parsing problem. If you don't know how to fix this, I can attach the file for you.

Does the Arcade mod work at all?

Slave2000

I installed 2.5 RC1 Public, as recommended in this thread:

http://www.simplemachines.org/community/index.php?topic=426020.msg2987621#msg2987621

Also in that thread, I stated I had one error, which some1 told me how to fix, and I did as suggested. I am guessing I must have done it wrong.  :(

The Arcade Mod works, but some of the scores do not register. I would REALLY appreciate it if you could attach a file, please.

The only problems that I seem to have are Admin functions, no logs etc.

HunterP


Try this one, I'll have a look at the error and your way of fixing it.

Slave2000

It seems to be fine now. Thank you so much!  ;D

HunterP

Arcade tries to mod this :

// Anyone who would like to add a core feature?
call_integration_hook('integrate_core_features', array(&$core_features));


Into :

// Anyone who would like to add a core feature?
call_integration_hook('integrate_core_features', array(&$core_features) // arcade = arcade (makes sense, right?)
'arcade' => array(
'url' => 'action=admin;area=arcade',
'settings' => array(
'arcadeEnabled' => 1,
),
),
);


But this doesn't look correct to me... Anyone?

EDIT: wait a sec, think I found it..

Arantor

No, that's definitely not right. Basically, it's looking for code on the other side of the hook call and matching that - except that the code's different now (and the whole point of that call is to avoid making file edits for that screen, it is actually rather nifty)

HunterP

Quote from: Slave2000 on March 15, 2011, 09:43:10 PM
It seems to be fine now. Thank you so much!  ;D

The error should be gone now, but the Arcade code was still not added correctly.

Should be fixed now, please try this file.

Slave2000

Thanks again for the time and effort that you have put into helping me. I truly appreciate it.  :)

HunterP

Quote from: Slave2000 on March 15, 2011, 10:02:05 PM
Thanks again for the time and effort that you have put into helping me. I truly appreciate it.  :)

No problem :) As long as you let me know if all Arcade functions are working correctly now ;)

Slave2000

I still have the same problem with some of the games not recording scores, but apart from that it seems to be fine. Thanks! :)

Advertisement: