inherit
193226
0
May 22, 2013 22:07:12 GMT -8
oxym0r0n
17
April 2013
oxym0r0n
|
Post by oxym0r0n on May 8, 2013 19:31:41 GMT -8
Is there anyway to use an or operator in templates?
For example, I want to make it so that an element on a profile can be seen by only the user who owns that profile and staff.
The code I want to use is something like this:
{if $[current_user.username] == $[user.username] || $[current_user.is_staff]} //ELEMENT {/if}
Using || for or just makes the whole element disappear to all users, is there a way to do OR statements?
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on May 9, 2013 0:35:39 GMT -8
Unfortunately not at this time, no - this is something I spent ages trying to get to work, before just asking and finding out, haha. Not sure if there's any plans to include it in the future, either. Sorry. =[
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 9, 2013 8:43:28 GMT -8
This is something I've really wanted for a while now too.
|
|
inherit
193226
0
May 22, 2013 22:07:12 GMT -8
oxym0r0n
17
April 2013
oxym0r0n
|
Post by oxym0r0n on May 10, 2013 18:55:38 GMT -8
Okay, thanks. It would make my life so much easier :/ Any chance that they might add this feature eventually Tim?
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 13, 2013 7:34:00 GMT -8
I certainly hope so.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on May 14, 2013 14:56:46 GMT -8
<SPAN style="display:none" class="{if $[current_user.username] == $[user.username]}one{/if}{if $[current_user.is_staff]}one{/if}"> internal HTML stuff </SPAN> <style type="text/css"> .one, .oneone {display:inline;} </style>
see if that works
|
|