Skip to Content Skip to Menu

Condition in Profile

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
12 years 2 months ago #208189 by mfe13
Condition in Profile was created by mfe13
hello,

I would create a condition in the profile but I can not find the solution.

This is what I want to do:
Only users who have Avatar in the profile can see Avatar of the other users.
I know this is possible, but how?
Thank you for your help.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 2 months ago #208208 by krileon
Replied by krileon on topic Re: Condition in Profile
With a delimiter field, sure; CB Conditionals, nope. Example substitution as follows.

[cb:if user="#me" avatar!=""][cb:userfield field="avatar" /][/cb:if]


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.

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
12 years 2 months ago #208223 by mfe13
Replied by mfe13 on topic Re: Condition in Profile
Well, I copied this code exactly, but it does not work.
If the user has no picture in his profile, but the CB nophoto_n.png, he can still see pictures of other profiles.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 2 months ago #208227 by krileon
Replied by krileon on topic Re: Condition in Profile
Hmm, suppose that didn't work as expected. Try the below.

[cb:if user="#me" avatar!~"/nophoto/"][cb:userfield field="avatar" /][/cb:if]


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.

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
12 years 2 months ago #208233 by mfe13
Replied by mfe13 on topic Re: Condition in Profile
No, I can't.
And if I put "displayed in the profile - yes" in the setting fields, the image of all users appears 2 times.
Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 2 months ago #208237 by krileon
Replied by krileon on topic Re: Condition in Profile
You need to move the avatar field to a tab in a not shown on profile position. You then need to replace its display with a delimiter field.


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