Delimiter field to show ACL levels

12 years 8 months ago #87455 by bijuhameed
Delimiter field to show ACL levels was created by bijuhameed
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

Please Log in to join the conversation.

12 years 8 months ago #87457 by beat
Replied by beat on topic Re:Delimiter field to show ACL levels
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.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

12 years 8 months ago #87460 by bijuhameed
Replied by bijuhameed on topic Re:Delimiter field to show ACL levels
Wow !

Cool !

Thanks a million

Bijou

Please Log in to join the conversation.

12 years 8 months ago #87464 by Rapunzl
Replied by Rapunzl on topic Re:Delimiter field to show ACL levels
:woohoo:
I knew some of the easy stuff, like [username]'s Profile in Title and stuff like that, but now I'm really excited to see what we can do!

Thanks Beat!

Jamie (Rapunzl)
Community Builder Team Member

Before posting on forums: Read all CB Articles | Specially the FAQ | Help us help you
CB links: Subscribe to CB documentation | [url=http://www.joomlapolis.com/content/view/7363/37/
]Our templates[/url] | [url=http://www.joomlapolis.com/content/blogcategory/61/74/
]Paid Subscriptions[/url] | Get Hosting | Our Forge
Visit my CB Profile

My personal site Rapunzl's Reality always under reconstruction

Please Log in to join the conversation.

12 years 8 months ago #87488 by pashmak
Replied by pashmak on topic Re:Delimiter field to show ACL levels
Don't want to hijack anything, but Is it possible to have several levels of users? :S Or atleast just have them in different user-types or groups?

THanks

Please Log in to join the conversation.

12 years 8 months ago #87824 by mserbanoiu
Replied by mserbanoiu on topic Re:Delimiter field to show ACL levels
Hi,
I wander if possible to limit avatar tab just for "author" users for ex - I mean only author to be able to upload image and implicit have avatar displayed...but in users list (with config User Groups to Include in List:author ) if the list is access to:everybody, all site visitors to be able do view author users avatars in that list.

Extended...If I limit a tab just for author (I mean just author users to be able to input and edit data), to be able to display information from the fields included in that tab also in users list (with everybody acces).

Now if a limit tab just for author users, only author type of users can see that info in users list...and this is not practical.

Regards Mark

Post edited by: mserbanoiu, at: 2009/02/05 15:20

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.187 seconds

Facebook Twitter LinkedIn