Display a customized Avatar when hidden by Privacy

8 years 4 months ago #275385 by krileon
What is avatar2? I'm at a complete loss as to what you're doing at this point. To condition the avatar field based off it being hidden by CB Privacy you need to be using the above CB Conditional 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.

Please Log in to join the conversation.

8 years 4 months ago #275398 by pranaydhruv
Replied by pranaydhruv on topic Display a customized Avatar when hidden by Privacy
Dear Kyle,


I created a 2nd Avatar field and named it Avatar2 to condition it when the original Avatar is hidden by Privacy please refer to this post :-

www.joomlapolis.com/forum/255-developer-members-support/231972-display-a-customized-avatar-when-hidden-by-privacy?start=6

Thanks
Pranay

Please Log in to join the conversation.

8 years 4 months ago #275413 by krileon
To do that you'd use the below condition on your second avatar field using CB Conditional.

Display: Field conditional self
Field: Custom > Value
Value: [cb:userfield field="avatar" /]
Translate Value: No
Operator: Equal To
Value: (leave empty)
Translate Value: No
Mode: Show

The Is Empty operator may also work.


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 to join the conversation.

8 years 4 months ago - 8 years 4 months ago #275503 by pranaydhruv
Replied by pranaydhruv on topic Display a customized Avatar when hidden by Privacy
Dear Kyle,


in addition to the above i also added these in profile value layout and userlist value layout :-

[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://localhost/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://localhost/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_m.png" alt="Male" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]

but this is not picked up when Another user views this profile . also the Userlist remains empty,


Thanks
Pranay
Attachments:

Please Log in to join the conversation.

8 years 4 months ago #275561 by krileon
Do you have a cb_gender field with those exact values? that was supplied to another user to fit their specific environment. With that it will only show an image if the user has uploaded an image or they've set gender to Male or Female and have not uploaded an image.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.178 seconds

Facebook Twitter LinkedIn