I'm glad you asked since I did it for my site a while ago actually. In order to accomplish this,
Version Ago to your
includes/page_header.php file,
find :
"url_control_panel" => (!empty($url_control_panel)) ? $site_sess->url($url_control_panel) : $site_sess->url(ROOT_PATH."member.php?action=editprofile"),
add below :
"url_show_profile" => (!empty($url_show_profile)) ? $site_sess->url($url_show_profile) : $site_sess->url(ROOT_PATH."member.php?".URL_USER_ID."=".$user_info['user_id']."&action=showprofile"),
Then, find :
"lang_control_panel" => $lang['control_panel'],
add below :
"lang_show_profile" => $lang['show_profile'],
Then, in your lang/english/main.php file,
add above the '?>' tag :
$lang['show_profile'] = "View my profile";
Then, in your templates/<your_template>/user_logininfo.html file,
find :
» <a href="{url_control_panel}">{lang_control_panel}</a><br />
add below :
» <a href="{url_show_profile}">{lang_show_profile}</a><br />
Then, try your link from the user box window. This should definitely work.
Version BAlso, you might be interested to know I also did the following for another user recently (but forgot to post here) - so - still
in your includes/page_header.php file (backup of the file is recommended),
find :
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", $user_info['user_name'], $lang['lang_loggedin_msg']));
$user_box = $site_template->parse_template("user_logininfo");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 1,
"user_loggedout" => 0,
"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
));
$site_template->un_register_vars("user_logininfo");
unset($user_box);
}
else {
$user_box = $site_template->parse_template("user_loginform");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 0,
"user_loggedout" => 1,
"is_admin" => 0
));
$site_template->un_register_vars("user_loginform");
unset($user_box);
}
replace with :
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $user_info['user_id'], $url_show_profile) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$user_info['user_id']);
$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_info['user_name']."</a>", $lang['lang_loggedin_msg']));
$user_box = $site_template->parse_template("user_logininfo");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 1,
"user_loggedout" => 0,
"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
));
$site_template->un_register_vars("user_logininfo");
unset($user_box);
unset ($user_profile_link);
}
else {
$user_box = $site_template->parse_template("user_loginform");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 0,
"user_loggedout" => 1,
"is_admin" => 0
));
$site_template->un_register_vars("user_loginform");
unset($user_box);
}
This will say like :
Connected to <<user_account>> (with the showprofile's page on it). It's quite the same function as the "View my profile" thing I did above.
[ EDIT ]
Some modifications needed to be done to version B and everything works fine now.