Advertisement:

Navigation

SMF Mod Site

Mod Name:
User Control Panel ( User CP )
Created By:
Alan S
Type:
Feature Enhancement
First Created:
February 23, 2007, 07:43:09 PM
Last Modified:
October 30, 2008, 05:00:17 PM
Latest Version:
3.0
Compatible With:
1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 2.0 Beta 3.1 Public, 2.0 Beta 4
Total Downloads:
43373

Download this mod

UserCPV2.0_Install.zip (150kB) [4525]
UserCPV1.4_To_V2.0_Upgrade.zip (9kB) [1083]
UserCPV2.1QuickSearchFix_SMF2.X_Only.zip (2kB) [710]
UserCPV2.2_SMF2.X.zip (148kB) [27167]
UserCP v3.0.zip (226kB) [3279]
Manual Install Instructions for SMF


Below are some preview images of what the mod looks like when being used

Description:

Link To Mod
SMF2.0 Support Added
This mod replaces the current profile screen with a more colourful User Control Panel , It makes it easier to navigate around the profile options and provides a way to contact the admin via email.

UserCP V3.0 Released
UserCP V3.0 is for SMF2.0 Beta4 Only!!

********************
UserCP V3.0
Created By Alan S
30/10/08
********************
V3.0 is the next step for the UserCP

It includes all the features of 2.0 with a few major changes.

The UserCP is now created using a array so the buttons are layed out depending on your forum permissions. This also makes it easier to manualy add
new buttons should the 4 preset ones be used.

The way the copyright and the error pages are displayed have been completely rewritten.

See the Admin Panel ( Admin -> Configuration -> Modifications -> UserCP ) for more options that have been added.

  • UserCP now uses its own language file
  • Buttons are now built from an Array based on User permissions.
  • Added admin contact email field
  • Ability to choose which buttons are displayed by default regardless of permissions
  • Added copyright and error message functions
  • Fixed undefined index errors from v2.2

Big thanks to Kindred for the coding for the arrays.
  
Please Note , This Mod Could Cause Errors on Install On ModSettings.php , If It Does , Manualy Add the Code by following instructions at end of page.

Mod should work with versions 1.0.7 and above it has only been tested on 1.1 -> 1.1.4 and SMF2.0 Beta 3 however

SMF 2.0 Users Use The Package UserCPV2.1_SMF2.X

Bugs can be emailed to alanscomputergenius[at]gmail[dot]com

Changelog

*********************************
V1.1 - Initial Release 23/Feb/07
*********************************
V1.2

- Fixed installation errors on index.template
- Cleaned up instalation code
- Fixed bug on menu which ment the usercp tab was not highlighted when in usercp.
*********************************
V1.3

- Added 1.1.4 Compatibility
- Added fix for bug which sometimes caused 403 errors.

*********************************

V1.4 14/Dec/07

- Added "Delete My Account" option to the interface.
- Removed unwanted variables from the template
- Cleaned up code
- Added comments to make it easier to find the different parts of the usercp in the file.
- Added a proper guest error page

********************************

V2.0

- Added Admin Interface
- Added Ability to Enable/Disable User CP
- Added Ability to Disable Contacting Of Admin
- Added Ability to choose to use pm or email to contact admin
- Added Admin option to let users to switch to standard profile view
- Added 4 Customisable UserCP fields ( Use own icons/text/links )
- Added If UserCP is disabled , The Menu Button for the UserCp will automaticaly change back to profile.
- Edited Error Page For Guests
- Added User ID feature for admins ( Find out your UserID , Need for using admin pm contact option )
- Removed Unwanted Commenting Code + Added Code Explaination Comments
- Added Support For UTF8 ( English on Install )

********************************

********************
UserCP V2.0.1
Created By Alan S
13/7/08
********************
UserCP V2.0.1 is for SMF 2.0 Beta releases ONLY

No feature changes took place in 2.1 except added compatibility for SMF 2.X , Also a few template tweaks were made

DO NOT INSTALL THIS PACKAGE ON SMF 1.X forums!


********************

********************
UserCP V2.0.2
Created By Alan S
19/8/08
********************
UserCP V2.0.2 is for SMF 2.0 Beta releases ONLY

UserCP V2.02 fixs a bug from V2.0.1 that causes the quick search function in the admin panel to break.

DO NOT INSTALL THIS PACKAGE ON SMF 1.X forums!


********************

UserCP V2.0.1 Users , Please install the UserCPV2.1QuickSearchFix_SMF2.X_Only.zip package to fix the quick search bug ( Running this package would be the equivilent of updating to V2.0.2 )

Upgrade Package for 1.4 -> 2.0 added + Fresh 2.0 install


Language Files Can Be Found In UserCP forum topic.




To add different language strings go to Themes/default/languages/modifications.yourlanguage.php or /Themes/default/languages/modifications.yourlanguage-utf8.php
and copy the strings to it.

Manualy Adding The UserCP To Themes

/ThemeDir/index.template.php

Find
Code: [Select]
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</td>' : '';


Replace With
Code: [Select]
// 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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</td>' : '';


** Note the code in your index.template.php may be different depending on the theme your using , Ask in the topic for specific help regarding themes.


Errors on Install For ModSettings.php

Open up /Sources/ModSettings.php

Find
Code: [Select]
);
 
// By default do the basic settings.
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';
$context['sub_action'] = $_REQUEST['sa'];

Add Before
Code: [Select]
// --- Begin modification - SMFBlog ---
'usercp' => 'ModifyUserCPSettings',
// --- End modification ---

Find
Code: [Select]
'karma' => array(
'title' => $txt['smf293'],
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
'is_last' => true,
),
 

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

Find
Code: [Select]
);
 
// Default to core (I assume)
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';

Add Before
Code: [Select]
// --- Begin modification - UserCP ---
'usercp' => 'ModifyUserCPSettings',
// --- End modification ---

Find
Code: [Select]
?>

Add Before
Code: [Select]
// --- 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 ---

Save it and reupload and your good to go!

For info on removing the copyright email Alan S at alanscomputergenius[at]gmail[dot]com