[#5600] use the Request Connection Javascript link for other uses

8 years 6 months ago #273488 by krileon

1)the condition i am using is not working :-
[cb:userdata field="avatar" avatar="nophoto_n|tnnophoto_n\.png$/]

That's not a valid substitution. You'll need to use the below to condition if the avatar field has an image uploaded.

Display: Field conditional self
Field: Custom > Value
Value: [cb:userfield field="avatar" /]
Translate Value: No
Operator: Is REGEX
Value: /(nophoto_n|tnnophoto_n)\.png$/
Translate Value: No
Mode: Hide

2)what should be the right substitution for this, (i am wanting the Firstname of the user to whom the PM is being sent ) ?

You'd just substitute in the first name using [firstname] for example. The user object is going to be the user id specified in &users so substitutions will default to their user object.


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 6 months ago #273531 by pranaydhruv
Dear Kyle,

1)I tried the substitution but there is no difference in behaviour for users who are showing their avatar or who are not showing their avatar. The link shows for both type of users.
2) This substitution of Firstname is however resolved and works just fine.


Thanks
Pranay

Please Log in to join the conversation.

8 years 6 months ago #273581 by krileon

1)I tried the substitution but there is no difference in behaviour for users who are showing their avatar or who are not showing their avatar. The link shows for both type of users.

Is the avatar field it self hidden? This could result in the substitution failing as the field won't be reachable. You can try the below, but it may not be as accurate as it's checking the database value directly.

Display: Field conditional self
Field: Custom > Value
Value: [avatar]
Translate Value: No
Operator: Is REGEX
Value: /(nophoto_n|tnnophoto_n)\.png$/
Translate Value: No
Mode: Hide


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 6 months ago - 8 years 6 months ago #273622 by pranaydhruv
Hello Kyle,

in this case let us suppose that a user chooses to hide their avatar, only then would this button / link be visible, so if a user chooses not to hide their avatar this button would not be visible when someone visits their profile.

The Pm would be a request that would ask that user to show his avatar. so Showing the PM link / button for users who are not hiding their avatar is of no use.

I tested the above substitution but it doesn't make any difference on if a user hides or shows their avatar the link is visible for all profiles.

Thanks
Pranay

Please Log in to join the conversation.

8 years 6 months ago #273627 by krileon
Is the avatar field hidden it self and if it is how is it being hidden? Another field being conditioned? CB Privacy? The problem with the above substitutions is they return nothing if the field can't be accessed except the direct database substitution [avatar]. You can test this by adding a Custom HTML field with the below substitutions.

[avatar]
[cb:userfield field="avatar" /]

This will show you what values are being output so you can adjust your condition as needed. If another field is hiding the avatar and being conditioned then just reverse the condition for you link 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 to join the conversation.

8 years 6 months ago - 8 years 6 months ago #273650 by pranaydhruv
Hello Kyle,

I am using CB Privacy to hide the field.
i tried the substitution in a custom HTML field and the Avatar field gets hidden on the profile that is hiding their Avatar using CB Privacy.
Thanks
Pranay

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.492 seconds

Facebook Twitter LinkedIn