Skip to Content Skip to Menu

[SOLVED] Gender badges

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago #259190 by chanteur94
Replied by chanteur94 on topic Gender badges
It's what i've done.
Here is captures :
- captureok is Ok (with users who have avatar or upload pictures)
- captureko is not good (with users who have no avatar or without pictures), you notice that picture and username are in the wrong place.


PS: what are these classes ; class="cbImgPict cbFullPict img-thumbnail" ?
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 9 months ago #259249 by krileon
Replied by krileon on topic Gender badges
Please understand we are not here to provide coding assistance. I've provided examples, tutorials, and similar forum topics to aid you in your usage configuration. Short from coding it for you there's nothing more I can advise. I will and have coded this for you as follows, but this will be the last time. I can not be expected to provide each and every person with their coding requests (see my signature in this regard). I urge anyone that needs coding to please consult the materials we've provided or consider hiring someone to code it for you.

To use the below you need to edit the "Profile image" (avatar) field within CB > Field Management then under Parameters > Layout set the "Profile View Layout" as follows.

Code:
[cb:if avatar!~"/(nophoto_n|tnnophoto_n)\.png$/"][value][/cb:if] [cb:if avatar=~"/(nophoto_n|tnnophoto_n)\.png$/" and cb_gender="female"]<img src="http://YOUR_DOMAIN_HERE/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_f.png" alt="Female" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if] [cb:if avatar=~"/(nophoto_n|tnnophoto_n)\.png$/" and cb_gender="male"]<img src="http://YOUR_DOMAIN_HERE/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_m.png" alt="Male" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if] [cb:if avatar=~"/(nophoto_n|tnnophoto_n)\.png$/" and cb_gender=""]<img src="http://YOUR_DOMAIN_HERE/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png" alt="Unknown" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]

Replace YOUR_DOMAIN_HERE with your actual site domain. I've implemented support for uploaded avatar, generic female, generic male, and non-gender. All 4 scenarios have been tested as working.


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: uncleron12345

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago #259281 by chanteur94
Replied by chanteur94 on topic Gender badges
Hi Kyle,

I'm sorry to boring you and i know how is difficult to answer to everybody with patience and also that you are not here for coding.
It's not what i want.

Just trying to understand how to use some usecase without boring you but sometimes something wrong.

In my case, I try exactly all the cases and I have always the same problems (see my previous capture)

Probably a problem with my Template but i don't find where.

So, I will not use this fonctionnality.

Despite all, thank you very much for your help.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 9 months ago #259287 by krileon
Replied by krileon on topic Gender badges
My previous reply has fully tested code on 3 installs. If it's not displaying right you likely have a styling conflict of some kind, which I can't help with without a URL to the issue. To confirm your Joomla template is conflicting switch to default Joomla template and see if the styling problems persists. Also ensure you've upgraded to CB 2.0.6 so you've our latest CSS improvements.


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.

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 8 months ago #259510 by chanteur94
Replied by chanteur94 on topic Gender badges
Changing to Joomla default Template was a good idea. Unfortunitly I have the same issue with Joomla Template and I confirm that I'm using CB 2.0.6
???

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 8 months ago #259513 by krileon
Replied by krileon on topic Gender badges
As I've explained there's nothing more I can do without a URL to the issue. I can't fix CSS problems that I can't see. I could not confirm your issue on 3 test environments so I've no way of knowing why it's doing that for you.


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum