Skip to Content Skip to Menu

[#4488] CB Privacy plugin and field substitutions/delimiter fields?!

10 years 6 months ago - 10 years 5 months ago #244563 by Michael2014
Hey guys,

another question here.

I use the heck out of delimiter fields to customize the look of my member pages. I need need need to do this, unless there is a more comfortable way to create appealing CB member templates.

SO, there I was thinking that the privacy plugin controls the general visibility of fields and their values.
But if I set a field to "privacy" (there is no German translation for that in the plugin, btw.), the value still shows up in my delimiter field.

I can of course set up additional fields for controlling the displayed delimiter fields, but would prefer using the streamlined Privacy control features of course ;)

Thanks,
Michael
Last edit: 10 years 5 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244576 by krileon
It depends on how you used your substitutions. If you used raw substitutions like [FIELD_NAME] then no it won't protect it. If you used a normal output substitution then yes it should. Example as follows.

[cb:userfield field="FIELD_NAME" /]

Please see the below substitution tutorial for further substitution usage information.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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.

10 years 6 months ago #244717 by Michael2014

krileon wrote: ... If you used a normal output substitution then yes it should. Example as follows.

[cb:userfield field="FIELD_NAME" /]

Please see the below substitution tutorial for further substitution usage information.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


Hello Kyle,

thanks for the reply.

Unfortunately it does not seem to work :\

This is how I´ve set up the delimiter field:

Street address: [cb:userfield field="cb_street" /][cb:userfield field="cb_number" /]

Privacy works if I use it with the "standard" layout for displaying fields, though.

Any ideas?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244733 by krileon
Ah, yeah substitutions use PHP value parsing. CB Privacy will not check against PHP value output. You'll need to add the privacy controls to the delimiter field it self.


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.

10 years 6 months ago - 10 years 6 months ago #244742 by Michael2014
Sooo ... using delimiter fields as a simple way to layout a profile is not recommended if I want to use the privacy controls?

Or are there settings that will let me control the fields that I´ve put inside the delimiter field individually?

Any recommendations for a nifty workaround for an individual layout and privacy controls?
Last edit: 10 years 6 months ago by Michael2014.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244770 by krileon
Move your extra fields to a tab that is in a not shown on profile position. Next ensure they're set to display on profile (they won't due to being on a hidden tab). Now use the below substitutions.

[cb:userfield field="FIELD_NAME" /]

That should work fine. Please keep in mind CB Privacy does not protect fields from Moderators or from the users self. So if it's set to Private then the user themselves and moderators will still see the field. So the best way to test is with a second registered user or by logging out and viewing the profile publicly.

The field privacy check is done as follows.

1. Am I on Frontend? Yes, Continue.
2. Am I a Profile rendered field (reason = profile)? Yes, Continue.
3. Is the $user a valid CB user object? Yes, Continue.
4. Am I being viewed by the users self (user->id = myid)? No, Continue.
5. Am I being viewed by a CB Moderator? No, Continue.
6. Does the field still exist in the fields array? Yes, Continue.
7. Am I visible on profile? Yes, Continue.
8. Does the viewing user have access? No, Continue.
9. Remove field

The above is basically a breakdown of the IF statement to determine if a field should be removed.


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