1
ladon
custom menu (admin/user/guest) problem
  • 2003/11/6 19:09

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


hi,

Besides the a drop down menu i intergrated with my website I want a seperate link for the admin section when the user is an admin and a link for a user that isn't logged in. I used a simple if/else to get info on type of user.

As far is the Admin link goes there's no problem, works perfectly. But when i want to add a second if for the user that's hasn't logged in yet it doesn't work. Even worse, XOOPS remeains blank!

I used this code. When I take out the second if part it works perfectly.

<{if $xoops_isAdmin == true}>
        <
tr
              <
td colspan="2" id="headerbar" align="left">|<a href="<{$xoops_url}>/admin.php">Admin sectie!</a>|</td>
          </
tr>
            <{if 
$xoops_isOnline == false}>        
              <
tr
                <
td colspan="2" id="headerbar" align="right">|<a href="<{$xoops_url}>/user.php">log in</a>|</td>
              </
tr>
          <{else}>        
          <
tr
              <
td colspan="2" id="headerbar" align="right"></td>
          </
tr>
        <{/if}>


I got this "&xoops_isOnline" form the API DOC but I had little hope this was gonna work anyway. Mayby someone knows wich one I am supposed to use.

btw: If you think my code is messy, plz consider i just started only looking at this code last week, all new to me, only used to plain html before XOOPS

2
Jan304
Re: custom menu (admin/user/guest) problem
  • 2003/11/6 21:39

  • Jan304

  • Official Support Member

  • Posts: 520

  • Since: 2002/3/31


Hi there,

First you might wanne know we have a dutch xupport site... :)

Second, you can try this, I'm not completely shure what exact you want to reach since you did not closed all tags correctly...

<{if $xoops_isAdmin == true}>
            <
tr>
                   <
td colspan="2" id="headerbar" align="left">|<a href="<{$xoops_url}>/admin.php">Admin sectie!</a>|</td>
              </
tr>
        <{/if}>
        <{if 
$xoops_isuser == false}>
              <
tr>
                 <
td colspan="2" id="headerbar" align="right">|<a href="<{$xoops_url}>/user.php">Inloggen</a>|</td>
              </
tr>
          <{else}>
              <
tr>
               <
td colspan="2" id="headerbar" align="right">| Welkom <{$xoops_uname}> |</td>
              </
tr>
        <{/if}>

3
ladon
Re: custom menu (admin/user/guest) problem
  • 2003/11/7 10:15

  • ladon

  • Quite a regular

  • Posts: 284

  • Since: 2003/10/31


hi,

Thanks, "isuser" is what I needed. Huh?! Didn't close all tags? hmm, I'll look into it. Btw, after posting i noticed my if/else didn't make any sense like this. It will most likely not show "admin sectie". Well, newbie mistake I guess, I'll learn someday

And yes, I know there is a dutch support site. I'll come bye soon

Login

Who's Online

240 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 240


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits