News:

Follow us on Bluesky!

Main Menu

Error Message...

Started by Smythe, August 14, 2008, 09:10:15 PM

Previous topic - Next topic

Smythe

Fatal error: Cannot redeclare modifyusercpsettings() (previously declared in /homepages/29/d252871497/htdocs/RMSEIU/Sources/ModSettings.php:364) in /homepages/29/d252871497/htdocs/RMSEIU/Sources/ModSettings.php on line 415

When i try to go to the "Features and Options" on the admin panel, i get the above error..... any help would be great.

SMF 1.1.5
TinyPortal 0.9.8
Site http://www.rmseiu200.com


Just check a few mods i added and it seems the User Control Panel mod was the culprit. anyone have an idea that might fix this issue

ccbtimewiz

Attach your ModSettings.php file.

Smythe

Attached File per request

Smythe

#3
OK so i just took a peek at the file in depth and figured it out on my own.... Thanks for the consideration ...
there was a duplicate set of command right at the end of the file for some reason... deleted the extra set and it worked like a charm

ccbtimewiz

Remove the double instances of usercp() in your file.

Remove once:
// --- Begin modification - UserCP ---
'usercp' => array(
'title' => $txt['usercp'],
'href' => $scripturl . '?action=featuresettings;sa=usercp;sesc=' . $context['session_id'],
),
// --- End modification ---


Remove once:
// --- Begin modification - UserCP ---
function ModifyUserCPSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(
array('check', 'usercp_enable'),
           array ('check', 'usercp_enablecontactadmin'),
           array('check', 'usercp_switchview'),
           array('check', 'usercp_usepm'),
           array('int', 'usercp_adminid'),
            '',
             array('text', 'usercp_field1image'),
             array('text', 'usercp_field1url'),
             array('text', 'usercp_field1maintext'),
             array('text', 'usercp_field1summary'),
             array('check', 'usercp_field1enable'),
             '',
             array('text', 'usercp_field2image'),
             array('text', 'usercp_field2url'),
             array('text', 'usercp_field2maintext'),
             array('text', 'usercp_field2summary'),
             array('check', 'usercp_field2enable'),
             '',
             array('text', 'usercp_field3image'),
             array('text', 'usercp_field3url'),
             array('text', 'usercp_field3maintext'),
             array('text', 'usercp_field3summary'),
             array('check', 'usercp_field3enable'),
             '',
             array('text', 'usercp_field4image'),
             array('text', 'usercp_field4url'),
             array('text', 'usercp_field4maintext'),
             array('text', 'usercp_field4summary'),
             array('check', 'usercp_field4enable'),
             '',
   
);

// Saving?
if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=featuresettings;sa=usercp');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=usercp';
$context['settings_title'] = $txt['usercp'];

prepareDBSettingContext($config_vars);
}
// --- End modification ---

Advertisement: