Skip to Content Skip to Menu

[SOLVED] Display an icon depending on joomla user-group

  • Lolo_als
  • Lolo_als
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 4 months ago - 12 years 4 months ago #201298 by Lolo_als
Hello,

since I am quite new to programming I am wondering how to display different icons in user-profiles depending on the joomla user group they belong to. we have created different joomla user groups for moderators so they may write and publish content of their categories. It would be nice to show icons in their profiles, so anyone sees at once, they are moderators.

Example:
registered users = no icon in profile
moderator_cat1 = /images/icon1
moderator_cat2 = /images/icon2
moderator_cat3 = /images/icon3

Is this possible with conditional plugin (I guess no ?)
Or should it be done with sql-query-field ?

Hope to get some help :-)
Last edit: 12 years 4 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 4 months ago #201325 by krileon
You should be able to do this purely with delimiter field and substitutions. Example as follows.

[cb:if viewaccesslevel includes "1"]I am Public[/cb:if]
[cb:if viewaccesslevel includes "2"]I am Registered[/cb:if]
[cb:if viewaccesslevel includes "3"]I am Special[/cb:if]

I believe the below should also work for usergroups.

[cb:if gids includes "8"]I am Super Users[/cb:if]

More substitution usage information can be found in the below tutorial.

www.allmysocials.com/directory/tutorials/item/233-substitution-usage


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: Lolo_als

Please Log in or Create an account to join the conversation.

  • Lolo_als
  • Lolo_als
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
12 years 4 months ago #201379 by Lolo_als
Thank you very much. It works. Quite nice!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum