Hey guys,
Just wondering how I go about editing the layout of ?area=forumprofile and also adding my own page in ?area=pagename
With great difficulty since it's not a single profile template, it is a composite of many little bits put together. As ever *more details* are incredibly helpful.
As far as a new profile area goes, add it to the big array near the start of Profile.php, and note that the name of area also ends up being the default template_*name* that gets called, like the rest of the profile stuff is.
Yeah I found that just after I posted. Thanks :) I'll get the layout and stuff done before I worry about adding more too it.
Figured out how to add another page in the same method as forumProfile
in Profile-modify.php
function socialMedia($memID)
{
global $context, $user_profile, $user_info, $txt, $modSettings;
loadThemeOptions($memID);
loadCustomFields($memID, 'socialmedia');
$context['sub_template'] = 'edit_options';
$context['page_desc'] = 'You can change your information for social media sharing on this page. This information will be displayed throughout WASDED Community. If you arent comfortable with sharing some information, simply skip it - nothing here is required.';
setupProfileContext(
array(
'website_title', 'website_url', 'icq', 'aim', 'msn', 'yim', 'facebook', 'myspace', 'hr', 'twitter', 'twitteraccesstoken', 'twitteraccesstokensecret','twitterconsumerkey','twitterconsumersecret' , 'hr', 'googleplus', 'linkedin', 'youtube', 'deviantart', 'pinterest', 'hr',
)
);
}
in profile.php
'socialmedia' => array(
'label' => 'Social Media',
'file' => 'Profile-Modify.php',
'function' => 'socialMedia',
'sc' => 'post',
'permission' => array(
'own' => array('profile_extra_any', 'profile_extra_own', 'profile_title_own', 'profile_title_any'),
'any' => array('profile_extra_any', 'profile_title_any'),
),
),
OK.. got a little ahead of myself.. turns out it isnt saving the input fields