The theme_linktree() is the "tree" you see above your forums that tells you where you currently are.
For example:
SMF Helper > Simple Tricks > Start new topic
Currently SMF is designed to only show this tree in messages and other areas, but doesn't include the areas/subactions of those other areas.
If you visit your profile, regardless if you're viewing "posts" of a user or if you're perhaps editing your own profile, the linktree remains at {your_forum} > Profile.
I have the solution to extend the linktree to include all other actions while you're in your profile.
Example, if I'm ccbtimewiz and viewing Smoky's profile:
{your_forum} > Viewing the profile of Smoky > [Profile Info] Summary
Or if I'm ccbtimewiz and viewing my own profile:
{your_forum} > Profile > [Profile Info] Summary.
This code is for SMF 2.0 RC1.Open
./Sources/Profile.phpFind:
// Auto populate the above!
$defaultAction = false;
$defaultInclude = false;
$context['completed_save'] = false;
$context['password_areas'] = array();
$security_checks = array();
$include_file = false;
$requestedAreaValid = false;Replace with:
// Auto populate the above!
$category = false;
$defaultAction = false;
$defaultInclude = false;
$context['completed_save'] = false;
$context['password_areas'] = array();
$security_checks = array();
$include_file = false;
$requestedAreaValid = false;Find:
// Set the page title if it's not already set...
if (!isset($context['page_title']))
$context['page_title'] = $txt['profile'] . ' - ' . $txt[$_REQUEST['area']];Add After: // Building up the theme_linktree().
# First, the owner of the profile, or if you're the owner, just show "profile".
if ($context['user']['is_owner'])
$context['linktree'][] = array(
'url' => $scripturl . '?action=profile',
'name' => 'Profile',
);
else
$context['linktree'][] = array(
'url' => $scripturl . '?action=profile;u=' . $context['id_member'],
'name' => 'The profile of ' . $context['member']['name'],
);
# Showing what area and category we're in...
if ($profile_include_data['file'] == 'Profile-View.php')
$category = $txt['profileInfo'];
if ($profile_include_data['file'] == 'Profile-Modify.php')
$category = $txt['profileEdit'];
if ($profile_include_data['file'] == 'Profile-Actions.php')
$category = $txt['profileAction'];
if (empty($profile_include_data['file']))
log_error('Linktree malfunction in profile.');
if (!empty($category))
$context['linktree'][] = array(
'url' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=' . $profile_include_data['current_area'],
'name' => '[' . $category . '] ' . $profile_include_data['label'],
);
# Showing any sub-actions...
if ((!empty($_REQUEST['sa']) && (!empty($profile_include_data['subsections'][$_REQUEST['sa']][0]))))
$context['linktree'][] = array(
'url' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=' . $profile_include_data['current_area'] . ';sa=', $_REQUEST['sa'],
'name' => $profile_include_data['subsections'][$_REQUEST['sa']][0],
);
// End of theme_linktree() code....