[SOLVED] Auto-action, can I mark tab as private?

12 years 4 months ago - 12 years 4 months ago #185732 by fribse2011
I would like to have a tab showing up as private, unless people mark it otherwise.
Can I use auto-action to do this?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

12 years 4 months ago - 12 years 4 months ago #185808 by krileon
Replied by krileon on topic Re: Auto-action, can I mark tab as private?
If you mean in regards to adjusting the CB Privacy controls of the field then yes. Using a query action you can insert a privacy rule for a user for example.
REPLACE `#__comprofiler_privacy` ( `userid`, `type`, `xid`, `rule` ) VALUES ( [user_id], 'field', FIELD_ID, 99 );

With the above replace FIELD_ID with the actual ID of your field. I've used REPLACE encase a rule already exists as to avoid query errors, but you can change this to INSERT INTO if the above fails. I recommend using the after registration trigger so it sets their privacy directly after registering.


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: pepperstreet, fribse2011

Please Log in to join the conversation.

12 years 4 months ago - 12 years 4 months ago #186000 by fribse2011
Replied by fribse2011 on topic Re: Auto-action, can I mark tab as private?
Hi Krileon

Ok, I'll try and implement it.
The above is written as a field privacy setting, I would like to set a tab as 'invisible', how do I do that?
Also, which ACL should I set it for, so that it will fire for users just completing the registration?

Thanks
Fribse

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

12 years 4 months ago - 12 years 4 months ago #186033 by krileon
Replied by krileon on topic Re: Auto-action, can I mark tab as private?
The above sets a field as invisible. You don't change a tabs ACL based on an individual user because the tabs ACL is universal and will apply to everyone. You need to use CB Privacy to adjust individual privacy of tabs/fields. The value 99 in the query is the privacy level, which 99 is invisible. Below example for tabs privacy.
REPLACE `#__comprofiler_privacy` ( `userid`, `type`, `xid`, `rule` ) VALUES ( [user_id], 'tab', TAB_ID, 99 );

With the above replace TAB_ID with the actual ID of your tab.


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: pepperstreet

Please Log in to join the conversation.

12 years 4 months ago #186057 by fribse2011
Replied by fribse2011 on topic Re: Auto-action, can I mark tab as private?
Sorry, I'm writing it unclear, in the autoaction setting it asks me:

Access (Select access to auto action; only groups selected will have access. Parent groups such as Public Front-end will NOT fire for Registered users; exact groups must be selected.)

I'm not referring to the ACL settings for the TAB :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

12 years 4 months ago #186080 by krileon
Replied by krileon on topic Re: Auto-action, can I mark tab as private?
Ah, I see. You can select whatever access you want. Typically "Everybody" is the best option to go with.


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: 1.366 seconds

Facebook Twitter LinkedIn