Show Hits only for the Profile owner, and also limit to cb subs plans

1 week 6 days ago #337880 by Pomond
Hi!
My use case is that I have a tier of CB Subs-powered "Sponsor" accounts. I would like to let Sponsors view their own "hits" counter on their profiles, but only their own. (So public users and other members don't see anyone's counters at all, and our Sponsor plans can only see their own.) I would like only our Sponsor plans/subscriptions to have this capability, and any other users/members not to have it.

So, I look in Field Management > hits (editing screen) > Integrations tab > CBSubs Fields Tabs Protect ...

For field A., I assume "Normal CB settings."

For Field B, I assume "Yes, CB subs control field availability"

Then, under the "B." details that appear, I assume I leave the 1) field ("For other viewers") without selection of any plan, and leave the 2) field ("For Profile owner himself") as "Yes: profile owner can still view his own field."

But wouldn't this make hits appear to every member on their own account? I'd like to limit it to just our Sponsors. Is this possible?

It's not the end of the world if all accounts can see their own hits; maybe CSS can be used to mask output, but this is a bit of a crutch. I'm looking for ways to enhance the value of our paid accounts by tuning what Profile features are available to them. Thanks!

Please Log in to join the conversation.

1 week 6 days ago #337882 by krileon
Probably easier to do that with CB Conditional. The below should work.

Display: Field conditional show
Condition 1
Field: Users
User: Viewing User
Operator: Is
Value: [user_id]
On: Profile View and Userlists View (unselect the others)
Condition 2 (AND)
Field: Subscriptions
User: Displayed Use
Operator: Has
Plans: SELECT_PLAN_HERE
Status: Active
On: Profile View and Userlists View (unselect the others)

That should make it so only the profile owner sees the field if they've an active subscription. Nobody else should see the field. If you want moderators to also be able to see it add a 3rd condition as follows.

Condition 3 (OR)
Field: Moderators
User: Viewing User
Operator: Is Moderator
On: Profile View and Userlists View (unselect the others)

Basically CB Conditional now now pretty much exclusively handle all conditional tab/field display since it has condition types for pretty much everything now (even custom PHP!).


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.

1 week 6 days ago #337886 by Pomond
Daaaaaamn.  This my first foray into CB Conditional, and I was not aware of the scope of its capabilities. That's quite a Swiss Army Knife of capabilities! I'm certain it is going to be useful, including for this use case.

A question: Filling in "[user_id]" as the Value for Condition 1 is a substitution, correct? So this will effectively apply this condition to "every user" looking at this field in a Profile?

(I'd also love to see a full list of substitutions; I know I've happened on it before. Is there a canonical location?)

Thanks!

Please Log in to join the conversation.

1 week 6 days ago #337888 by krileon

A question: Filling in "[user_id]" as the Value for Condition 1 is a substitution, correct? So this will effectively apply this condition to "every user" looking at this field in a Profile?

Correct, it's comparing the viewing user id against the profile user id since substitutions in CB Conditional are default from the profile owner.

(I'd also love to see a full list of substitutions; I know I've happened on it before. Is there a canonical location?)

It's unfortunately not really possible since substitutions very much depend on what fields you've made. At best we could provide a list of core fields. Recommend reading our substitution tutorial below carefully as it should help better understand how they work.

www.joomlapolis.com/documentation/279-community-builder/tutorials/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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.238 seconds

Facebook Twitter LinkedIn