rejetto forum

How to hide this button if %user% is not "admin".

0 Members and 1 Guest are viewing this topic.

Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
hi. i just want to ask if you guys know a code on how to hide the "Admin Panel" when the account logged in is just a user. i need the whole code. new here :D thanks guys  ;D i will wait for ur replies


heres a screenshot of what i want to hide.



Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
found out the answer by searching. thanks :D

{.if|{.=|%user%|user1.}{.=|%user%|user2.}{.=|%user%|user3.}|
<a href="/page/">mylink</a>
.}


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2068
    • View Profile
another coding can

{.if|{.count substring|;%user%;|;user1;user2;user3;user4;user5;........userN;.}|
<a href="/page/">mylink</a>
.}

if you have a long list, it is best to use a group Admin

member of | A
    true if the current user is member of group A (specify more than one group separating by semicolons ";").
    Optional parameter user to check a different user.
    Example member of|administrators|user=rejetto

{.if|{.member of |Admin.}|
<a href="/page/">mylink</a>
.}



Offline mynameiskeeet

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
another coding can

{.if|{.count substring|;%user%;|;user1;user2;user3;user4;user5;........userN;.}|
<a href="/page/">mylink</a>
.}

if you have a long list, it is best to use a group Admin

member of | A
    true if the current user is member of group A (specify more than one group separating by semicolons ";").
    Optional parameter user to check a different user.
    Example member of|administrators|user=rejetto

{.if|{.member of |Admin.}|
<a href="/page/">mylink</a>
.}

just saw this now. thanks mars :)