Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Location
    Tokyo, Melbourne, Shanghai
    Posts
    102
    Plugin Contributions
    0

    Default Tricky Log In / Log Out Link

    Good evening. I want to add the link "Log In" to the Important Links Sidebox. (Because it's a very important link!!) Easy enough accomplished by creating an EZPage BUT then it wont change to "LogOut" like the clever link in the navBar!!

    So does anyone know how to create a "LogIn" link in the Important Links Sidebox that will change to "LogOut" once the user has logged in??
    ooh man tricky tricky!!

    Mae motte totemo oki na ARIGATO! (A big THANKS in advance!)

    Arpeggio

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Tricky Log In / Log Out Link

    You will have to create in the sidebox php code the similar session checking - if/else conditional.
    ez pages will not parse php to my knowledge -

    Relavant code from tpl_header.php:
    Code:
    <?php if ($_SESSION['customer_id']) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
    <?php
          } else {
            if (STORE_STATUS == '0') {
    ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
    <?php } } ?>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Dec 2006
    Location
    Tokyo, Melbourne, Shanghai
    Posts
    102
    Plugin Contributions
    0

    Default Re: Tricky Log In / Log Out Link

    Thanks for the tip Kobra. I'm willing to give it a bash and after analysing (trying to understand the code) of both tpl_ezpages.php and ezpages.php it looks to me as though the "tpl" file is doing the actual defining of links for the sidebox. I've been trying to "get into" the FOR statement with an IF statement but just cannot find a way to effect a change. It is true that i dont really know what i'm doing as far as code but even when i write a very simple echo "hello" in there to understand it better what is happening, the word "hello" never makes it to my webpage.

    If you dont mind could you give me a few more pointers. For example: Is it correct that tpl_ezpages.php actually writes the link names in the ezpage side box? (thereforei should be effecting the tpl_ezpages.php file?)
    Should i be inserting a IF statement in the FOR loop? Any guidance you could offer would be of great assistance. sincerely arpeggio.

    Btw my plan was to open an ezpage called "Log In". Then in tpl_ezpages.php i would do a check:
    IF $var_linksList[$i]['name'] = "Log In"

    if TRUE use the IF statement you sent me,
    if FALSE just carry on as normal.

 

 

Similar Threads

  1. Problem with Customer Log in/ Log out
    By tequila in forum General Questions
    Replies: 11
    Last Post: 3 Jul 2009, 02:39 AM
  2. Log In/Log Out link issue...
    By d1driftbiz in forum General Questions
    Replies: 1
    Last Post: 14 Oct 2007, 06:47 AM
  3. After log out can't log back in unless......
    By oldpaint in forum General Questions
    Replies: 13
    Last Post: 17 Mar 2007, 05:51 AM
  4. log in/log out 404 -NOT double directory issue
    By felixthehat in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 30 Sep 2006, 02:35 PM
  5. Log in and Log out from main page
    By gardengate in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 7 Sep 2006, 06:07 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR