News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

User Control Panel ( User CP ) V3.0

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

Previous topic - Next topic

TheListener

The reason I like the mod is because I find the normal profile to be plain and boring.

mikedijital

Just wanted to let everyone know that I got this working on 2.0.2 though you will need to manually edit in one error in your subs, at least I did... and the menu icons Action=  commands need to be updated in the sources/usercp.php file  ( because they just take you back to your main OLD profile page, rather than to the sub profile area's theyare supposed to )  but other than that this is a snazzy mod for a boring control panel.

dimspace

#922
Yeh, i got it working in 2.0.3

Took a few alterations.

Usercp.php needs heavily editing as the urls are in the old format.

corrected array below

$usercp_buttons = array(
'account' => array(
'title' => $txt['usercp_account_info'],
'href' => $scripturl . '?action=profile;area=account;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/ksysguard.png',
'txt' => $txt['usercp_account_info_summary'],
'show' => !empty($modSettings['usercp_enable_account']),
),

'layout' => array(
'title' => $txt['usercp_look_and_layout'],
'href' => $scripturl . '?action=profile;area=theme;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kivio.png',
'txt' => $txt['usercp_look_and_layout_summary'],
'show' => !empty($modSettings['usercp_enable_layout']),
),
'theme' => array(
'title' => $txt['usercp_my_theme'],
'href' => $scripturl . '?action=theme;sa=pick;u=' . $user_info['id'] . ';sesc=' . $context['session_id'],
'img' => $settings['images_url'].'/usercp/blockdevice.png',
'txt' => $txt['usercp_my_theme_summary'],
'show' => !empty($modSettings['usercp_enable_theme']) && allowedTo(array('profile_extra_any', 'profile_extra_own')),
),

'profile' => array(
'title' => $txt['usercp_my_profile'],
'href' => $scripturl . '?action=profile;area=forumprofile;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kuser.png',
'txt' => $txt['usercp_my_profile_summary'],
'show' => !empty($modSettings['usercp_enable_profile']),
),

'stats' => array(
'title' => $txt['usercp_my_stats'],
'href' => $scripturl . '?action=profile;area=statistics;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kchart.png',
'txt' => $txt['usercp_my_stats_summary'],
'show' => !empty($modSettings['usercp_enable_stats']),
),

'contributions' => array(
'title' => $txt['usercp_my_posts'],
'href' => $scripturl . '?action=profile;area=showposts;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kedit.png',
'txt' => $txt['usercp_my_posts_summary'],
'show' => !empty($modSettings['usercp_enable_contributions']),
),

'notifications' => array(
'title' => $txt['usercp_my_notifications'],
'href' => $scripturl . '?action=profile;area=notification;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/mailreminder.png',
'txt' => $txt['usercp_my_notifications_summary'],
'show' => !empty($modSettings['usercp_enable_notifications']),
),

'buddies' => array(
'title' => $txt['usercp_buddies'],
'href' => $scripturl . '?action=profile;area=lists;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kdmconfig.png',
'txt' => $txt['usercp_buddies_summary'],
'show' => !empty($modSettings['usercp_enable_buddies']) && !empty($modSettings['enable_buddylist']),
),

'message_options' => array(
'title' => $txt['usercp_message_options'],
'href' => $scripturl . '?action=profile;area=pmprefs;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/mail.png',
'txt' => $txt['usercp_message_options_summary'],
'show' => !empty($modSettings['usercp_enable_message_options']),
),
'search' => array(
'title' => $txt['usercp_search'],
'href' => $scripturl . '?action=search',
'img' => $settings['images_url'].'/usercp/find.png',
'txt' => $txt['usercp_search_summary'],
'show' => !empty($modSettings['usercp_enable_search']),
),

'contact_pm' => array(
'title' => $txt['usercp_contact_admin'],
'href' => $scripturl . '?action=pm;sa=send;u=' . $modSettings['usercp_adminid'],
'img' =>  $settings['images_url'].'/usercp/agent.png',
'txt' => $txt['usercp_contact_admin_summary'],
'show' => !empty($modSettings['usercp_usepm']) && !empty($modSettings['usercp_enablecontactadmin']),
),
'contact_email' => array(
'title' => $txt['usercp_contact_admin'],
'href' => 'mailto:' . $modSettings['usercp_contact_email'],
'img' =>  $settings['images_url'].'/usercp/agent.png',
'txt' => $txt['usercp_contact_admin_summary'],
'show' => !$modSettings['usercp_usepm'] && !empty($modSettings['usercp_enablecontactadmin']),
),

'group_membership' => array(
'title' => $txt['usercp_group_membership'],
'href' => $scripturl . '?action=profile;area=groupmembership;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kgroup.png',
'txt' => $txt['usercp_group_membership_summary'],
'show' => !empty($modSettings['usercp_enable_group_membership']) &&  !empty($modSettings['show_group_membership']),
),

'ignore_boards' => array(
'title' => $txt['usercp_ignore_boards'],
'href' => $scripturl . '?action=profile;area=ignoreboards;u=' . $user_info['id'],
'img' => $settings['images_url'].'/usercp/kignore.png',
'txt' => $txt['usercp_ignore_boards_summary'],
'show' => !empty($modSettings['usercp_enable_group_ignore_boards']) &&  !empty($modSettings['allow_ignore_boards']),
),
'usercp_field1' => array(
'title' => $modSettings['usercp_field1maintext'],
'href' => $modSettings['usercp_field1url'],
'img' => $modSettings['usercp_field1image'],
'txt' => $modSettings['usercp_field1summary'],
'show' => !empty($modSettings['usercp_field1enable']),
),
'usercp_field2' => array(
'title' => $modSettings['usercp_field2maintext'],
'href' => $modSettings['usercp_field2url'],
'img' => $modSettings['usercp_field2image'],
'txt' => $modSettings['usercp_field2summary'],
'show' => !empty($modSettings['usercp_field2enable']),
),
'usercp_field3' => array(
'title' => $modSettings['usercp_field3maintext'],
'href' => $modSettings['usercp_field3url'],
'img' => $modSettings['usercp_field3image'],
'txt' => $modSettings['usercp_field3summary'],
'show' => !empty($modSettings['usercp_field3enable']),
),
'usercp_field4' => array(
'title' => $modSettings['usercp_field4maintext'],
'href' => $modSettings['usercp_field4url'],
'img' => $modSettings['usercp_field4image'],
'txt' => $modSettings['usercp_field4summary'],
'show' => !empty($modSettings['usercp_field4enable']),
),
);


Didnt have to change anything in subs or the language files.

running into issues with the  loadLanguage('usercp'); line that goes in indextemplate. For some reason it messes all the fonts in the themes up. Thankfully i dont actually use my default theme, so ive left it out of all the other themes indextemplate and it doesnt seem to be causing any problem.

wouldnt take too much for the author to update and re-release this for 2.0.3

Arantor

Other than the small matter of getting permission from the mod author.
Holder of controversial views, all of which my own.

dimspace

Which i was just about to add. thats the code to make it work anyway.

Going to drop the author a pm and see if he plans to update it. Certainly had no intention of updating myself, which is why I didnt post my php file, just the correct code for the pages.

Arantor

Just before you get too entrenched, the author hasn't been around here for months. :/ Hopefully you'll get a reply though :)
Holder of controversial views, all of which my own.

dimspace

yeh, saw he hasnt logged on since october.

took about an hour to rebuild it myself this evening, and added in thank you, drafts, bookmarks and other mods. fairly simple job. Will drop him a pm and see if he gets back to me.

Arantor

Same deal with the other mods, though, if you're adding them in you need permission to redistribute unless they're under a suitable licence. I seem to recall the drafts mod might be, fairly sure I left that as BSD when I released that a couple of years ago, but can't remember for sure (Spoogs now looks after it)
Holder of controversial views, all of which my own.

dimspace

Quote from: Arantor on January 18, 2013, 08:00:50 PM
Same deal with the other mods, though, if you're adding them in you need permission to redistribute unless they're under a suitable licence. I seem to recall the drafts mod might be, fairly sure I left that as BSD when I released that a couple of years ago, but can't remember for sure (Spoogs now looks after it)

really? didnt realise something as simple as adding a link to one mod to another mod was a problem. Just did it so that my drafts was accessible from control panel.. I shall have to look at the mods in question. I only added button links to them on the cp, not including the actual modification.

All very complicated..

Arantor

Quotereally? didnt realise something as simple as adding a link to one mod to another mod was a problem.

Ah, see, it wasn't clear what you were doing. Checking if it's present and providing a link, that's fine. But it sounded like you were actually trying to integrate those features - which would be a lot more trouble.
Holder of controversial views, all of which my own.

dimspace

Quote from: Arantor on January 18, 2013, 08:08:45 PM
Quotereally? didnt realise something as simple as adding a link to one mod to another mod was a problem.

Ah, see, it wasn't clear what you were doing. Checking if it's present and providing a link, that's fine. But it sounded like you were actually trying to integrate those features - which would be a lot more trouble.

nah, i just added links to them and built it into my copy of the installer so it added them to the settings etc. Like so:

its a nice little mod for new users to forums who get lost easily trying to change their avatar.

Arantor

Holder of controversial views, all of which my own.

dimspace


Kindred

Actually, I think I posted the same list of needed updates to the action list way back with RC3. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

I also might have to give this a test drive one of these days, the profile area in SMF 2.0 is not the best.
Holder of controversial views, all of which my own.

Kindred

I like it and the users over on 40konline like it.
It's nice for a graphically/visually inclined society, but it still allows you to use the old menus as well. :)


BTW: Here is my modified userCP.php file (and  I am including it here is because I actually do have permission from the author to attach it in this specific thread :) )

Anyone who wants can do the normal install and then replace the Sources/usercp.php file with this one... or replace the file in the package before uploading it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Yeah, I can imagine - I know I revamped my admin panel in a similar fashion, and I've been thinking about doing that for the profile area but I want to uproot a lot more than just the interface to it.
Holder of controversial views, all of which my own.

Kindred

yeah... :)

One thing that I really like about this was the ability to easily control which choices are displayed and to add other icons/links
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

You know me, I have other needs that must be balanced, but it's likely I'll end up rewriting the entire profile area eventually and this might be the way I start it off, need to give a proper play tomorrow, I think.
Holder of controversial views, all of which my own.

dimspace

Quote from: Arantor on January 19, 2013, 12:10:32 AM
You know me, I have other needs that must be balanced, but it's likely I'll end up rewriting the entire profile area eventually and this might be the way I start it off, need to give a proper play tomorrow, I think.

I would say its the start of a nice idea, at the moment its a nice front end to the user area. Certainly for new members its a lot easier, especially if you have heavily modified menus, users can get a bit lost.

and its nicely written in that its easy enough to add to the array and slip in the db settings.

can also see how it could be more tightly integrated though.

Advertisement: