bijuhameed wrote:
Hi all,
wondering whether there is a delimiter field tag where you can pull and display a users ACL status (for eg. guest, registered , editor, premium member etc)
Thanks in advance
Bijou
This substitution works at any place where substitutions can be made:
[code:1][cb:userdata field="usertype" /][/code:1]
Moreover you could display this info only for Super Administrators' eyes:
[code:1][cb:if user="#me" usertype="Super Administrator"]User of type: [cb:userdata field="usertype" /] [/cb:if][/code:1]
Here some additional possibilities:
[code:1][cb:if user="#me" user_id="0"]i am A GUEST[/cb:if]
[/code:1]
Using raw data from database (we recommend cb:userfield instead, where possible, as that would be rendered content, instead of raw one):
[code:1]
The user [cb:userdata field="username" /] lives in [cb:userdata field="cb_citystate" /] and his name is: [cb:userdata field="name" /].
[/code:1]
Again with cb:userfield: That would display the rendered field, not raw data
[code:1]
The user [cb:userfield field="username" /] lives in [cb:userfield field="cb_citystate" /] and his name is: [cb:userfield field="name" /].
[/code:1]
Again with cb:userdata OF #me:
[code:1]The user [cb:userdata field="username" user="#me" /] lives in [cb:userdata field="cb_citystate" user="62" /] and his name is: [cb:userdata field="name" user="#me" /].
[/code:1]
NOW SEE IFS possible:
[code:1]
[cb:if username="trail"]This is Trail being displayed[/cb:if]
[cb:if user="#displayed" username="nant"]This is Nant being displayed[/cb:if]
[cb:if user="#me" username="trail"]This is Trail watching[/cb:if]
[cb:if user="#me" username="admin"]This is Admin watching[/cb:if]
[cb:if user="#me" username!="admin"]This is NOT Admin watching[/cb:if]
[cb:if user="#me" username!="admin" and sername!="nant"]This is NOT Admin and NOT nant watching[/cb:if]
[/code:1]
Note that substitutions work in:
- delimiter fields
- fields titles
- fields, tabs and list titles and descriptions
- BUT NOT in field-contents (provided by users!)
- operators are supported: and / or
- comparators supported: = , !=, <, >, <=, >=
There is many more possibilities on that, and we are writing the documentation. Take the above as an apetizer.
CB 1.2 Stable required for the above.