[#5183] Hide Profile Fields / Tabs

9 years 1 month ago #260460 by pranaydhruv
Replied by pranaydhruv on topic Hide Profile Fields / Tabs
Hello Kyle,

I have used the same IF statements as suggested, I am unable to understand the 1st statement where viewaccesslevel!includes "2" and both of them lead to the Nophoto_n:-

[cb:if viewaccesslevel !includes "2"]<img src="http://localhost/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]
[cb:if viewaccesslevel includes "2"]
[cb:if cb_avatarprivate="1"]<img src="http://localhost/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]
[cb:if cb_avatarprivate!="1"][value][/cb:if]
[/cb:if]

Thanks
Pranay

Thanks
Pranay

Please Log in to join the conversation.

9 years 1 month ago - 9 years 1 month ago #260461 by krileon
Replied by krileon on topic Hide Profile Fields / Tabs
Please try the following usage first.

[cb:if cb_avatarprivate="1"]<img src="http://YOUR_DOMAIN_HERE/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]
[cb:if cb_avatarprivate!="1"][value][/cb:if]

The above usage I know works, because it's basically the same usage used for gender based default image display. The second usage as mentioned I've no idea if it'll work as it's an IF inside of an IF. Please see my reply as I explain what the IFs do.

Please see the below usage for gender based avatar default. Maybe it can inspire some ideas, but I don't know what more to suggest, sorry.

www.joomlapolis.com/forum/153-professional-member-support/228527-solved-gender-badges?start=6#259249


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.

9 years 1 month ago - 9 years 1 month ago #260485 by pranaydhruv
Replied by pranaydhruv on topic Hide Profile Fields / Tabs
Hello Kyle,
Thanks for your response!
I tried the first one mentioned below, when the user makes the Avatar private it hides his Avatar both in userlist and his profile, i read the posts you mentioned, not sure what i am missing :-

[cb:if cb_avatarprivate="1"]<img src="http://localhost/components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png" class="cbImgPict cbFullPict img-thumbnail" />[/cb:if]

[cb:if cb_avatarprivate!="1"][value][/cb:if]

Thanks
Pranay
Attachments:

Please Log in to join the conversation.

9 years 1 month ago #260503 by krileon
Replied by krileon on topic Hide Profile Fields / Tabs
You don't make the avatar private with CB Privacy. You need to create a checkbox to toggle the avatar being private or not. In my example the checkbox has a field name of cb_avatarprivate. Checkboxes store with a value of 1 (Yes) or 0 (No). You won't be able to do what you're wanting with CB Privacy as it completely removes the fields object from output.


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.

9 years 1 month ago #260535 by pranaydhruv
Replied by pranaydhruv on topic Hide Profile Fields / Tabs
Hello Kyle,

the way i have it setup is i have different connection types, which gives me the flexibility to Hide/show fields to different users based on the users decision, if i use the check box field then how can i still retain the functionality for the user to make show / Hide decisions pertaining to individual connections?

Thanks
Pranay

Please Log in to join the conversation.

9 years 1 month ago #260545 by krileon
Replied by krileon on topic Hide Profile Fields / Tabs
You can't. CB Privacy completely removes the field as if it doesn't exist. Privacy on formatname field and avatar fields really shouldn't be expected. Both are widely used throughout CB, its plugins, and in some cases outside of CB. I really don't recommend trying to privacy control those 2 fields specifically.


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.226 seconds

Facebook Twitter LinkedIn