| 
Welcome, Guest
  • Page:
  • 1

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

[SOLVED] Display an icon depending on joomla user-group 11 months 3 weeks ago #201298

  • Lolo_als
  • Lolo_als
  • OFFLINE
  • Junior Boarder
    Junior Boarder
  • Posts: 27
  • Karma: -
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: 11 months 3 weeks ago by krileon.
The administrator has disabled public write access.

Re: Display an icon depending on joomla user-group 11 months 3 weeks ago #201325

  • krileon
  • krileon
  • ONLINE
  • Moderator
    Moderator
  • Posts: 31427
  • Karma: 897
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...3-substitution-usage
Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
CB links: Documentation - Tutorials - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Advanced, Professional, Developer, or CBSubs 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 Advanced, 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 EST to 4:00 PM EST. 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.
--
If you use Community Builder, please post a rating and a review at the Joomla! Extensions Directory.
The administrator has disabled public write access.
The following user(s) said Thank You: Lolo_als

Re: Display an icon depending on joomla user-group 11 months 3 weeks ago #201379

  • Lolo_als
  • Lolo_als
  • OFFLINE
  • Junior Boarder
    Junior Boarder
  • Posts: 27
  • Karma: -
Thank you very much. It works. Quite nice!
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.190 seconds