Results 1 to 1 of 1

Thread: How to change header links for non logged in and logged in member.

  1. #1
    Prometheus
    Guest

    Default How to change header links for non logged in and logged in member.

    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
    Attached Images Attached Images
    Last edited by Prometheus; 09-01-2006 at 04:08 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. member to be logged in all the time?
    By birkenstam in forum Dolphin General Discussion v5.3 to v5.6.5
    Replies: 13
    Last Post: 07-10-2009, 11:26 PM
  2. Header text moving if logged in...
    By tekomp in forum General Issues, Comments, Questions
    Replies: 4
    Last Post: 05-31-2007, 02:27 PM
  3. Non-Logged In Member Can't View Profiles
    By Smoge in forum Bugs aeDating v4.0.2
    Replies: 14
    Last Post: 10-30-2005, 11:43 PM
  4. Logged In Users Get Logged Out
    By Smoge in forum Bugs aeDating v4.0.2
    Replies: 3
    Last Post: 10-21-2005, 02:38 PM
  5. Replies: 3
    Last Post: 10-06-2005, 06:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •