All right, here are the things you have to change (should work with q2a v1.5.4 and 1.6 / 1.6.1):
1. modify qa-page-user.php to output "edit profile" button on user's profile page:
Insert after line:
qa_lang_sub($favorite ? 'main/remove_x_favorites' : 'users/add_user_x_favorites', $handle));
This code:
if($userid == qa_get_logged_in_userid()) {
$qa_content['custom_btn']='<a class="yourbuttoncss" style="position:absolute;top:50px;right:0;" href="../account">Edit Profile</a>';
}
2. Add subnavigation "favorites" to user's profile page
Using an advanced theme, add the blue code block to an override of nav_main_sub():
function nav_main_sub() {
$this->output('custom stuff');
$this->nav('main');
$this->nav('sub');
// add subnavigation 'favorites' to user page
if($this->template=='user') {
$myhandle = basename( qa_path_html(qa_get_logged_in_handle()) );
$myurl = strtok($_SERVER['REQUEST_URI'],'?');
if($myurl == '/user/'.$myhandle){
$this->content['navigation']['sub']['favorites'] = array(
'label' => qa_lang_html('misc/nav_my_favorites'),
'url' => qa_path_html('favorites'),
);
}
}
}
3. Remove "My Account" link from navigation on top (link is not needed anymore)
Open your theme's CSS file, and add: .qa-nav-user-account {display:none}
4. {Remove] subnavigation on favorites and account page (is optional, must be improved)
Instead of removing the subnav, I actually would like to display the same subnavigation as on the user's profile page, but don't know yet how to. That's why I removed the subnav for now by using CSS: .qa-template-account .qa-nav-sub, .qa-template-favorites .qa-nav-sub {display:none}
DONE!
.qa-nav-user-account {display:none}
.qa-nav-user-account {display:none}
.qa-nav-user-account {display:none}
.qa-nav-user-account {display:none}
.qa-nav-user-account {display:none}