User Control Panel ( User CP ) V3.0

Started by Alan S, April 28, 2007, 12:59:54 PM

Previous topic - Next topic

ScoobyDan

Alan S,

I have just upgraded your UserCP from v1.2 to v2.0, and I like the new features, but could you please make the default buttons optional (or dependent on the user's permissions)? The reason I ask this, is because I do not allow my users to change their theme, or to delete their accounts. Having these options available on the UserCP screen confuses my users.

I have manually edited the page to remove those options, but I would rather do this through an Admin option...

Many thanks for your great mod

Daniel

Alan S

Quote from: ScoobyDan on January 03, 2008, 08:32:15 AM
Alan S,

I have just upgraded your UserCP from v1.2 to v2.0, and I like the new features, but could you please make the default buttons optional (or dependent on the user's permissions)? The reason I ask this, is because I do not allow my users to change their theme, or to delete their accounts. Having these options available on the UserCP screen confuses my users.

I have manually edited the page to remove those options, but I would rather do this through an Admin option...

Many thanks for your great mod

Daniel

Well the problem with adding the option to disable the default icons would be there would be 12 more options in the admin section which would really fill up a page , And also the layout would get messed up.

If you have one of the four custom fields enabled now on the user cp. And you disable the contact admin feature , The custom fields stay in the same place ,they do not move up to fill the space where the admin icon was. Can you imagine what it would look like if 4 of the default icons were disabled?
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

blondeamon

#242
Hi again Alan as you mentioned on your pm there must be something wrong on my modsettings.php and i cant see the option "Features and Options" on my admin panel.

Just in case i attached  admin.php too
Always looking for the best

www.kamenos.gr  Greek Gaming Community

Alan S

Quote from: blondeamon on January 03, 2008, 04:25:31 PM
Hi again Alan as you mentioned on your pm there must be something wrong on my modsettings.php and i cant see the option "Features and Options" on my admin panel.

Just in case i attached  admin.php too

Try this one

Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

blondeamon

Alan i tried this one but nothing changed....i still cant see the "Features and Options" on my admin Panel.


Any idea what else might be the fault?
Always looking for the best

www.kamenos.gr  Greek Gaming Community

Alan S

I'm not sure , I mean i tested that modsettings.php on my site and it worked perfectly , You may want to try asking in General Support aswell as they may be able to help more.

Another thing you could do is to try using a default modsettings.php ( IE one that comes directly from the smf install package )

If that ^^ makes no difference its not mod related at all. Its to do with something else.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Me313

Quote from: Alan S on January 02, 2008, 09:52:53 PM
*** Backup Files Before Trying This ***

Well upload the image attached to the post to /Themes/helios/images/english/ , The image should be called usercp.gif


Next , Open up the helios index.template.php , located in /Themes/helios

Find

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt;


Replace with

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;



Find

// Edit Profile... [profile]
        if ($context['allow_edit_profile'])
                echo '<td><a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" />' : $txt[467]), '</a></td>';



Replace With


// UserCP [profile]
        if ($context['allow_edit_profile'] && $modSettings['usercp_enable'])
                echo '<td><a href="', $scripturl, '?action=usercp">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/usercp.gif" alt="User Control Panel" style="margin: 0px 0;" border="0" />USER CP</a></td>';
// Edit Profile... [profile]
        if ($context['allow_edit_profile'] && !$modSettings['usercp_enable'])
                echo '<td><a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" />' : $txt[467]), '</a></td>';


Save and Reupload To /Themes/helios/ , And you should be good to go!

hello again..thank you for ur reply and help..however i keep recieving this error when i want to replace..the second code..

The file you tried to save generated the following error:
Parse error: parse error, unexpected ';' in index.template.php on line 576

Alan S

What is line 576 of the modified index.template.php?
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Me313

i dont know...here's the helious tp index.template.php file..pls try add the code for me..

Alan S

This should be the correct file though i did not test it first so make sure to have a backup of the original file.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Me313

the button works looks well..when i change the edit profile button profile.gif....to usercp gif..but..the appearance didnt show up..the profile section looks just normal.not in usercp  mode

Alan S

You need to change it to ?action=usercp if you changed the button on the original usercp.

You should know that if you do not use the code i gave in the mod like

if ($modSettings['usercp_enable'])
echo '
// usercp button code

If you turn the usercp off in the admin panel the button wont change , you will have to change it manualy.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Me313

thank u..^-^ its working well..now..forgive me for troubling u a lot..

Jade Elizabeth

Quote from: Alan S on May 01, 2007, 03:17:40 PM
To Add A Extra Button To The UserCP

Open up usercp.template.php

<find>

<a href="mailto:', $webmaster_email ,'"><img border="0" src="',$settings['images_url'],'/usercp/agent.png" width="80" height="80"></a></td>


<add after>

<a href="' , $scripturl ,'?action=xxxx"><img border="0" src="',$settings['images_url'],'/usercp/image.png/gif/jpg" width="80" height="80"></a></td>


<find>
<font face="Verdana" size="1">',$txt['usercp_contact_admin_summary'],'</font></td>

<add after>

<td align="center" width="25%" valign="top">
<font face="Verdana" size="2"><a href="' , $scripturl ,'?action=xxxx'"><b>BUTTON TITLE</a><br>
</b></font><font face="Verdana" size="1">BUTTON SUMMARY</font></td>



There are things you need to edit.

First of all , Get your button image or icon ( Good ones at http://www.crystalxp.net/ ) , name it and upload it to /Themes/themeurl/images/usercp/

Then replace , In the button code above

'?action=xxxx   with '?action=youraction

',$settings['images_url'],'/usercp/image.png/gif/jpg with ',$settings['images_url'],'/usercp/yourimage.extenison

BUTTON TITLE with Your Button Title Such As WishList

BUTTON SUMMARY with The Summary Of The Button Function

when i follow this, without editing your code i get this error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/jade/public_html/forums/Themes/default/usercp.template.php on line 100

which is
</b></font><font face="Verdana" size="1">BUTTON SUMMARY</font></td>
that line :)
i tried the text string thing and it went to line 99 :( its being picky i guess.

can anyone help?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Alan S

If your using V2.0 you can add custom icons via the admin panel , No manual editing is required.
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Jade Elizabeth

Quote from: Alan S on January 07, 2008, 11:40:21 AM
If your using V2.0 you can add custom icons via the admin panel , No manual editing is required.

really?
wow. maybe im running an old version :(

lmao try 1.2 lmao...yeah ill go back to my hole now lol
* Alundra goes off to upgrade
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

:( i deleted the zip ages ago (from my package folder-i dont have much web space)....it was the first mod i installed :( does anyone have the old version?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Alan S

Here it is V1.2 ( Upload the zip to /Packages , You'd be better off uninstalling V1.2 and installing V2.0 from scratch )

Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Jade Elizabeth

Quote from: Alan S on January 07, 2008, 02:03:16 PM
Here it is V1.2 ( Upload the zip to /Packages , You'd be better off uninstalling V1.2 and installing V2.0 from scratch )



THANKYOU!!
:D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

);

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


it says to find that and put
// --- Begin modification - SMFBlog ---
'usercp' => 'ModifyUserCPSettings',
// --- End modification ---

after it

but it wont work. i have the ultimate profile mod installed too so i guess it wont work with that? heres that lovely block of code :)

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

loadLanguage('CustomProfile');
// Load up all the tabs...
$context['admin_tabs'] = array(
'title' => &$txt['modSettings_title'],
'help' => 'modsettings',
'description' => $txt['smf3'],
'tabs' => array(
'basic' => array(
'title' => $txt['mods_cat_features'],
'href' => $scripturl . '?action=featuresettings;sa=basic;sesc=' . $context['session_id'],
),
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),

'ultprofile' => array(
'title' => $txt['ultimate_profile'],
'href' => $scripturl . '?action=featuresettings;sa=ultprofile;sesc=' . $context['session_id'],
),

'sbox' => array(
'title' => $txt['sbox_ModTitle'],
'href' => $scripturl . '?action=featuresettings;sa=sbox;sesc=' . $context['session_id'],
),
'profile' => array(
'title' => $txt['cp_cpfields'],
'href' => $scripturl . '?action=featuresettings;sa=profile;sesc=' . $context['session_id'],
),
'MemberColorLinks' => array(
'title' => $txt['MemberColorLinkHeadline'],
'href' => $scripturl . '?action=featuresettings;sa=MemberColorLinks;sesc=' . $context['session_id'],
),
'googlebot' => array(
'title' => $txt['ob_googlebot_modname'],
'href' => $scripturl . '?action=featuresettings;sa=googlebot;sesc=' . $context['session_id'],
),
                        'websiteButton' => array(
                                'title' => $txt['websiteButton_title'],
                                'href' => $scripturl . '?action=featuresettings;sa=websiteButton;sesc=' . $context['session_id'],                       
),
// --- Begin modification - SMFBlog ---
'blog' => array(
'title' => $txt['blog_settings'],
'href' => $scripturl . '?action=featuresettings;sa=blog;sesc=' . $context['session_id'],
),
// --- End modification ---

'karma' => array(
'title' => $txt['smf293'],
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
),
// --- Begin modification - UserCP ---
'usercp' => array(
'title' => $txt['usercp'],
'href' => $scripturl . '?action=featuresettings;sa=usercp;sesc=' . $context['session_id'],
),
// --- End modification ---
'aeiou' => array(
'title' => $txt['aeiou'],
'href' => $scripturl . '?action=featuresettings;sa=aeiou;sesc=' . $context['session_id'],
),
'sig' => array(
'title' => $txt['signature_settings'],
'description' => $txt['signature_settings_desc'],
'href' => $scripturl . '?action=featuresettings;sa=sig;sesc=' . $context['session_id'],
'is_last' => true,
),
),
);


i can see the admin button....but when i click it it takes me to basic features....
i did try uninstall/reinstall.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: