Only show a field when viewing my own profile

7 years 7 months ago #286609 by wrongjon
Hi again

Sorry I've been trying to find solution to this for past hour and have checked forums.

I want to show a custom text message field to the user but only when they are viewing THEIR OWN profile, not when viewing others. Its just a warning message so its not editable.

I've been trying using the conditional rules etc like

[cb:if user="#displayed" ]To change your status please <a href="/profile/edit-profile/userdetails">edit your profile</a>[/cb:if]

But I can;t work out what syntax or rule to add in the first bit as I want to say

IF the profile being displayed is equal to my own username/profile then show the text message

thanks so much for any guidance
Jonathan

Please Log in to join the conversation.

7 years 7 months ago #286611 by krileon
Replied by krileon on topic Only show a field when viewing my own profile
The below IF substitution should work fine.

[cb:if user_id="myid"]This is Me being displayed.[/cb:if]

Exact example for this is found at bottom of our substitutions tutorial below.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb

You could also use CB Privacy and set the field to have forced privacy controls then set the default to private. The field will only be visible to the users self and moderators.


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.
The following user(s) said Thank You: wrongjon

Please Log in to join the conversation.

7 years 7 months ago #286614 by wrongjon
Replied by wrongjon on topic Only show a field when viewing my own profile
Sorry I couldnt see the wood for the trees as I scanned over all those examples but that works fine thank you

With the privacy I checked that too but when i choose forced i only see user groups

private is not an option so do I need to set that in the privacy plugins settings perhaps - ill check that out later

thanks again

Please Log in to join the conversation.

7 years 6 months ago #286638 by krileon
Replied by krileon on topic Only show a field when viewing my own profile

With the privacy I checked that too but when i choose forced i only see user groups

private is not an option so do I need to set that in the privacy plugins settings perhaps - ill check that out later

Ensure within CB Privacy > Parameters > Privacy that the Private rule is enabled.


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

Facebook Twitter LinkedIn