Skip to Content Skip to Menu

Condition in Profile

  • mfe13
  • mfe13
  • OFFLINE
  • Posts: 572
  • Thanks: 26
  • Karma: 5
12 years 2 months ago #208240 by mfe13
Replied by mfe13 on topic Re: Condition in Profile
I'm sorry but by this way, the CB nophoto_n.png user does not appear in HIS profile but he can see the avatar of other users.

I mean he can't see any picture user if he did't picture in his profile, to force him to put his image.

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 #208244 by krileon
Replied by krileon on topic Re: Condition in Profile
I don't understand what you're trying to do. You want to show avatars only if viewing user uploaded an avatar? That's what I understood what you wanted and that's what it should be doing.


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 #208262 by mfe13
Replied by mfe13 on topic Re: Condition in Profile
hello,
I think I explained wrong.
Normally, all members can even complete profiles.
I want to stop (prohibit) a member who has no avatar in his profile to see the avatar of other members. That way, he is encouraged to add an image to their profile.
So he who has no image in his profile can not see images in the other profiles. Do you understand me?
thank you

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 #208283 by krileon
Replied by krileon on topic Re: Condition in Profile
Yes, I understand; that's what my previous IF condition should be doing. I tested and confirmed the below works fine.

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

What you need to do is move the avatar field to a tab that is in a not shown on profile position. You then use the above in a delimiter field to render the avatar on a tab in the appropriate position and it'll render the avatar only if the use viewing the profile has an avatar uploaded (should also work with gallery images).


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 - 12 years 2 months ago #208289 by mfe13
Replied by mfe13 on topic Re: Condition in Profile
Then I did exactly like that.
It works almost well.
Whoever has no profile image not see images of other profiles, ok.

The problem now, a member can't see HIS image in HIS profile :silly:
Last edit: 12 years 2 months ago by mfe13.

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 #208304 by krileon
Replied by krileon on topic Re: Condition in Profile
Then you need to extend it further to always show for self. Example as follows.

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

The first IF sees if I have an avatar, it then checks if the profile is not mine, it then displays avatar. The next IF checks if the profile is mine and if it is always display.


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