The bar at the top of the page which (as far as I can see from template.html) is populated by {{guest_member_bar}} states "Welcome, login or register"
I can't for the life of me find out how to edit this to remove the 'Welcome'
Help!!
The bar at the top of the page which (as far as I can see from template.html) is populated by {{guest_member_bar}} states "Welcome, login or register"
I can't for the life of me find out how to edit this to remove the 'Welcome'
Help!!
If you open up index.php and go to line 1777 and you will see the section for the member/guest welcome bar.
It has to be defined inside the code rather than the template because it changes depending on whether the user is logged in.
If you literally just want to just remove "Welcome", just delete the language variable $lang['welcome'].
If you need some more specific instructions just let me know.
Yes a little more specific please, the . and " are throwing me a little!
I'd like to remove the or as well...
Current code says...
$member_bar = $lang['guest_bar'] = $lang['welcome'] . ". <a class=\"head_link\" href=\"" . $login_link . "\">" . $lang['login'] . "</a> " . $lang['or'] . " <a class=\"head_link\" href=\"" . $reg_link . "\">" . $lang['reg'] . "</a>";
Take this whole section at line 1781 of index.php
if(valid_session())
{
$ac_link = $conf['friendly_urls'] ? $conf['url'] . "account/" : "index.php?act=account";
$logout_link = $conf['friendly_urls'] ? $conf['url'] . "logout/" : "index.php?act=logout";
$member_bar = $lang['welcome'] . ", " . $member_row['email'] . ". <a href="">" . $lang['view_ac'] . "</a>";
if($conf['enable_contacts'])
{
$member_bar .= " | <a href="contacts();">" . $lang['contacts'] . "</a>";
}
$member_bar .= " | <a href="">" . $lang['logout'] . "</a>";
}
else
{
$login_link = $conf['friendly_urls'] ? $conf['url'] . "login/" : "index.php?act=login";
$reg_link = $conf['friendly_urls'] ? $conf['url'] . "register/" : "index.php?act=register";
$member_bar = $lang['welcome'] . ". <a href="">" . $lang['login'] . "</a> " . $lang['or'] . " <a href="">" . $lang['reg'] . "</a>";
}
And replace it with this:
if(valid_session())
{
$ac_link = $conf['friendly_urls'] ? $conf['url'] . "account/" : "index.php?act=account";
$logout_link = $conf['friendly_urls'] ? $conf['url'] . "logout/" : "index.php?act=logout";
$member_bar = $member_row['email'] . ". <a class=\"head_link\" href=\"" . $ac_link . "\">" . $lang['view_ac'] . "</a>";
if($conf['enable_contacts'])
{
$member_bar .= " | <a class=\"head_link\" href=\"javascript:contacts();\">" . $lang['contacts'] . "</a>";
}
$member_bar .= " | <a class=\"head_link\" href=\"" . $logout_link . "\">" . $lang['logout'] . "</a>";
}
else
{
$login_link = $conf['friendly_urls'] ? $conf['url'] . "login/" : "index.php?act=login";
$reg_link = $conf['friendly_urls'] ? $conf['url'] . "register/" : "index.php?act=register";
$member_bar = "<a class=\"head_link\" href=\"" . $login_link . "\">" . $lang['login'] . "</a> " . $lang['or'] . " <a class=\"head_link\" href=\"" . $reg_link . "\">" . $lang['reg'] . "</a>";
}
Let me know if you have any problems with this.
Thanks that worked :)
No problem.
Post again if you need any more help.
You must log in to post.