Results 1 to 7 of 7

Thread: Smarty Help for login user

  1. #1
    Join Date
    Sep 2006
    Posts
    167

    Default Smarty Help for login user

    Somebody know how to use if $login == true for indexu template ?
    Antony
    Hotel Discount Web Search
    www.hotel-discount.com

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    hmm... well the way i do it on one of my sites is a little hack to detail.php, i check to see if a cookie is set with a username, if it is i assign the variable to the detail template and then use :

    <% if $username %>
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  3. #3
    Join Date
    Sep 2006
    Posts
    167

    Default

    Thank's Inspereme....

    And can i use <%if !$logged_in%>
    or <%if !$logged_in==true%>
    or by this way <%if !$logged_in==false%>
    or <%if !$if_not_logged_in%>
    Did you try it ?

    Antony
    Last edited by Antony; 10-26-2007 at 12:43 PM.
    Hotel Discount Web Search
    www.hotel-discount.com

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    well jsut put <%$logged_in%> onto your detail page and see if anything is output - im not sure if that variable is available, i didnt think it was.

    if it output a 1 on your page you could use :

    <%if $logged_in %>
    do this
    <%/if%>

    if it output nothing then the variable isnt available and you'll need to hack the php a little.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  5. #5
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    From block.login.html

    <%if !$logged_in%>

  6. #6
    Join Date
    Sep 2006
    Posts
    167

    Default

    No I try BOTH on a custom page but doesn't work....
    Thank's for your help.....

    Maybe Doddy will know...
    If he passe to the forum maybe i have a chance to get the answer....
    Hotel Discount Web Search
    www.hotel-discount.com

  7. #7
    Join Date
    Sep 2006
    Posts
    167

    Default

    Somebody help me...
    And the answer is
    <%if $login_status_logged_in%>
    I test it and its work perfectly.
    Hotel Discount Web Search
    www.hotel-discount.com

Similar Threads

  1. User in my memberlist are not shown in the user admin panel
    By Holger in forum Blocks and Modification
    Replies: 3
    Last Post: 09-16-2007, 08:45 PM
  2. Smarty AND/OR
    By beto in forum v5.x
    Replies: 2
    Last Post: 12-18-2006, 04:29 AM
  3. Smarty Errors
    By kevinrstruck in forum v5.x
    Replies: 2
    Last Post: 04-02-2006, 05:55 PM
  4. Replies: 1
    Last Post: 01-17-2006, 08:30 AM
  5. More smarty plugins
    By dody in forum v5.x
    Replies: 1
    Last Post: 12-16-2005, 09:33 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
  •