Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2010
    Posts
    20
    Plugin Contributions
    0

    Default Custom Login Box

    We are trying to setup a custom login box on our site, the test page is at http://seeinteriors.co.uk/login_test_page.html and the login is in the top right corner in case you miss it.

    When I enter correct login details I get a security error logging in any ideas on how to fix this?

    Thanks in advance

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Custom Login Box

    hard to tell without seeing the code that you are using to send the login info

    I can see this
    <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>

    appears in your html code and should not

    also, just an fyi - login box wont work if javascript is disabled

  3. #3
    Join Date
    Dec 2010
    Posts
    20
    Plugin Contributions
    0

    Default Re: Custom Login Box

    Quote Originally Posted by rbarbour View Post
    hard to tell without seeing the code that you are using to send the login info

    I can see this
    <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>

    appears in your html code and should not

    also, just an fyi - login box wont work if javascript is disabled
    The code you can see it the full code that is currently in that file. I thought I removed the PHP code but obviously not.

    If must be an issue with the security token but I can't work out how to fix it.

  4. #4
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Custom Login Box

    seems to work for me

    nicely too :-)

    in your /includes/templates/YOUR_TEMPLATE/common/tpl_header.php file

    Code:
    <nav>
    <ul>
    <li id="login">
    <a id="login-trigger" href="#">
    Log In <span></span>
    </a>
    <div id="login-content">
    <?php echo zen_draw_form('login', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', 'id="loginForm"'); ?>
    <fieldset id="inputs">
    <?php echo zen_draw_input_field('email_address', '', 'size="18" id="username" placeholder="Your email address" required'); ?>
    <?php echo zen_draw_password_field('password', '', 'size="18" id="password" placeholder="Password" required'); ?>
    <?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
    </fieldset>
    <fieldset id="actions">
    <input type="submit" id="submit" value="Log in"><br/><br/>
    <?php echo '<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?>
    </fieldset></form></div></li><li id="signup">
    <?php echo '<a href="' . zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'NONSSL') . '">' . Register . '</a>'; ?>
    </li></ul></nav>

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Custom Login Box

    replace this:

    Code:
    <a id="login-trigger" href="#">
    with
    Code:
    <a id="login-trigger" href="<?php echo zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params()); ?># " onclick="('');return false;">
    this way if on home page it will not reload to home/index, actually it won't reload any page

 

 

Similar Threads

  1. Replies: 3
    Last Post: 15 May 2014, 05:35 PM
  2. Customers cannot login using my custom login box
    By pb4 in forum General Questions
    Replies: 13
    Last Post: 29 Nov 2010, 11:33 AM
  3. Replace New Prod/Mo Box w/custom box?
    By sheila123 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Mar 2009, 01:03 AM
  4. Modify login box or create new account info box?
    By torgil in forum Addon Sideboxes
    Replies: 4
    Last Post: 8 Nov 2006, 12:30 PM

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