Author Topic: How can I make this work?  (Read 3566 times)

0 Members and 1 Guest are viewing this topic.

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
How can I make this work?
« on: May 03, 2003, 08:39:14 PM »
Im trying to get a simple Login at the top of my site using the following:

{if user_loggedout}{lang_reregister}{endif user_loggedout}

I've placed this where I want it, and regardless if a user is logged in or not, it appears.  I only want it to appear if they are NOT logged into the site.

Thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
How can I make this work?
« Reply #1 on: May 03, 2003, 08:46:25 PM »
u have to register it in /includes/page_header.php
for example like this:
Code: [Select]
"guest" => ($user_info['user_level'] == GUEST) ? 1 : 0
then just use like {if guest}{lang_reregister}{endif guest}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
How can I make this work?
« Reply #2 on: May 03, 2003, 09:07:53 PM »
Thanks, once I placed it in the right spot for the: $site_template->register_vars(array(
instead of down at the bottom under: //--- User Box ----------------------------------------
It works great.  Thanks V@no.  Im learning more and more everyday.  My logic is backwards it seems, I think of if user not logged in then show, where it should be if user is logged in then dont show.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
How can I make this work?
« Reply #3 on: May 03, 2003, 09:13:24 PM »
Quote from: lakeside
I think of if user not logged in then show, where it should be if user is logged in then dont show.

lol actualy this is absolutely the same...its like "sugar is white, coal is not white" - they both are true...;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)