How to change the links for non logged in and logged in member.
Someone asked about this and was having trouble getting the links to change and work.
So... Here it is
This changes the login link to point to our TPG/MPG page.
Once a member is logged in the Login link changes to a Videos link just as the join free link changes to their homepage link after login.
(You can change the code to point to whatever page/script etc that you want.)
In your design.inc.php find these sets of code and change them to suit your needs.
before code change:
if ( $logged['member'] )
{
$_page_cont[0]['TMI_Join'] = TopCodeMenuItem ( $f(_t("_Homepage")), "member.php", $site[url] );
}
else
{
$_page_cont[0]['TMI_Join'] = TopCodeMenuItem ( $f(_t("_Join Free")), "join_form.php", $site[url] );
}
if ( $logged['member'] )
{
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( (_t("_FAQ")), "faq.php", $site[url] );
}
else
{
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( $f(_t("_Log In")), "member.php", $site[url] );
}
After code change:
if ( $logged['member'] )
{
$_page_cont[0]['TMI_Join'] = TopCodeMenuItem ( $f(_t("_Homepage")), "member.php", $site[url] );
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( $f(_t("_Videos")), "freevids.php", $site[url] );
}
else
{
$_page_cont[0]['TMI_Join'] = TopCodeMenuItem ( $f(_t("_Join Free")), "join_form.php", $site[url] );
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( $f(_t("_Login")), "member.php", $site[url] );
}
if ( $logged['member'] )
{
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( $f(_t("_Videos")), "freevids.php", $site[url] );
}
else
{
$_page_cont[0]['TMI_Login'] = TopCodeMenuItem ( $f(_t("_Login")), "member.php", $site[url] );
}
I have included before login and after login screen shots of our header so you can see the differences.
Why should you waste good space for a usable link and why have LOGIN displayed to an aleady logged in member?.....
Our new link points to http://www.CageMe.com/freevids.php (so you can see what our new link destination looks like.)
You can also change this code for member level checking and only allow certain links to be viewed by certain member levels. Certain member levels see one set of links and another level see another set of links in the header. A bit more complicated but it can be done...
Peace.
Todd


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks