Additional Info |
---|
Type
|
Package ID
Alan_S:UserCP
|
First Created
February 23, 2007, 07:43:09 PM
|
Last Updated
October 30, 2008, 05:00:17 PM
|
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Edit Profile... [profile] if usercp is enabled
if ($context['allow_edit_profile'] && $modSettings['usercp_enable'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=usercp;u=',$ID_MEMBER,'">' , $txt['usercp'] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//Edit Profile... [profile] if usercp is disabled
if ($context['allow_edit_profile'] && !$modSettings['usercp_enable'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
);
// By default do the basic settings.
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';
$context['sub_action'] = $_REQUEST['sa'];
// --- Begin modification - SMFBlog ---
'usercp' => 'ModifyUserCPSettings',
// --- End modification ---
'karma' => array(
'title' => $txt['smf293'],
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
'is_last' => true,
),
// --- Begin modification - UserCP ---
'usercp' => array(
'title' => $txt['usercp'],
'href' => $scripturl . '?action=featuresettings;sa=usercp;sesc=' . $context['session_id'],
),
// --- End modification ---
);
// Default to core (I assume)
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';
// --- Begin modification - UserCP ---
'usercp' => 'ModifyUserCPSettings',
// --- End modification ---
?>
// --- 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 ---