[SOLVED] Photo Gallery Tab Access

6 years 11 months ago - 6 years 11 months ago #294133 by highonryan
[SOLVED] Photo Gallery Tab Access was created by highonryan
Hello,

I am trying to figure out a solution to a problem, and I don't know where to begin.

I have four tiers of access to my site. Public, Registered, Member 1 and Member 2.

Member 2 have the ability to create a photo gallery, and there is a link to that photo gallery on their forum sidebar. I created that link using CB_Forum plugin Parameters > Forums > Sidebar... and the link goes to the user's profile and the gallery tab by using a link format: userprofile&user=[user_id]&tab=24.

All other tiers should see the link in the forum sidebar, can click it, but goes to a different page that says "Please Upgrade to Member 2"

Currently, Member 2 clicks link, they see Gallery Tab.

All other tiers click link, and they go to the next available tab, bypassing the gallery tab all together.

This is a three part question:

1) is it possible to open just the Gallery Tab as it's own page, with no other tabs available? A better way to link to the photo gallery tab.

2) Can there be a way to show a message on that tab to non-Member 2 asking them to upgrade?

3) Is there some other way to accomplish what I am wanting (if it makes sense)? A different component maybe? I'll take suggestions.

I have the Gallery Tab set to "CBSubs Fields Tabs Protect" Viewer's CB Controls visibility set to Member 2.

Please let me know if what I am asking does not make sense.

Thanks,
HighOnRyan

Please Log in to join the conversation.

6 years 11 months ago #294148 by krileon
Replied by krileon on topic Photo Gallery Tab Access
It'd probably be easier to just condition the link. CBSubs Content plugin combined with its system plugin allows you to use substitutions to condition based off subscription. Content plugins however don't work in those parameters so you'll need to add the CBSubs substitutions to a Custom HTML field with prepare content enabled under its parameters tab then substitute in the Custom HTML field. Example as follows.

[cbsubs:if plan="PLAN_ID_HERE" status="A"]LINK TO GALLERY[/cbsubs:if]

The above should only show the link to the gallery if that users subscription to PLAN_ID_HERE is active. Everyone else would simply display nothing. Move the Custom HTML field to a tab in a not shown on profile position for it to be used only for substitution purposes. You can also handle situations of not actively subscribed using an else usage as follows.

[cbsubs:if plan="PLAN_ID_HERE" status="A"]LINK TO GALLERY[cbsubs:else]LINK TO SUBSCRIBE[/cbsubs:else][/cbsubs:if]

Note the conditions are based off the user being displayed and not the user viewing. If you need to condition against the user viewing you'd just specify the user parameter as needed.


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.

6 years 11 months ago #294178 by highonryan
Replied by highonryan on topic Photo Gallery Tab Access
Krileon,

First thanks again for your amazing help, and quickness to answer.

I am a bit confused, thought. You're saying that CBSubs Content will not work under the CB_Forum sidebar override?

I have other substitutions there like [cb:if cb_member_registry="1"]Link to something[/cb:if] and that works, but CBSubs [cbsubs:if plan="PLAN_ID_HERE"]Link[ /cbsubs:if] will not work?

How do I add Custom HTML Field with prepare content to the sidebar through CB_Forums?

Thanks,
HighOnRyan

Please Log in to join the conversation.

6 years 11 months ago #294182 by krileon
Replied by krileon on topic Photo Gallery Tab Access

I am a bit confused, thought. You're saying that CBSubs Content will not work under the CB_Forum sidebar override?

Its substitutions won't because it's a Joomla content plugin usage, which are not ran for the sidebar in CB Forums at this time.

I have other substitutions there like [cb:if cb_member_registry="1"]Link to something[/cb:if] and that works, but CBSubs [cbsubs:if plan="PLAN_ID_HERE"]Link[ /cbsubs:if] will not work?

Correct, which is why you need to put CBSubs usages in a Custom HTML field and enable content prepare under its parameters tab.

How do I add Custom HTML Field with prepare content to the sidebar through CB_Forums?

You'd add your CBSubs substitutions to the Custom HTML field and enable content prepare under its parameters tab then verify it's displaying as intended on the users profile. Next substitute it into CB Forums sidebar parameter using [cb:userfield field="FIELD_NAME" /] usage. Now you can move the field to a tab in the not shown on profile position.


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.

6 years 11 months ago #294225 by highonryan
Replied by highonryan on topic Photo Gallery Tab Access
Krileon,

Thanks again for the help.

I apologize for being so daft, but I'm not sure if what you are explaining is the solution.

The link comes from the forum sidebar to the Gallery Tab.

Currently, I have a Check Box (Single) field called "cb_member_gallery" where 1 equal having a gallery. Which is located on a "Create Gallery" custom tab. The CB_Gallery is conditional on that checkbox.

Meaning, I have set the CB_Gallery Tab conditional on the "cb_member_gallery" field. If "cb_member_gallery" is checked then the Gallery Tab is viewable in the user's profile edit and photos can be uploaded. The CB_Gallery Tab is set to Nested Tab Menu so there are no tabs on the profile.

I have a substitution in the forum sidebar what shows a link to the CB_Gallery if there is one for the forum user:
[cb:if cb_member_gallery="1"]<li>LINK TO GALLERY TAB</li>[/cb:if]

It seems to me that your solution would be: if "cb_member_gallery"="1" then show link in forum sidebar, then link would go to another tab, where if any usergroup not Member 2, would see some HTML, but Member 2 would see another link to CB_Gallery tab?

I'm not sure if that would fly with my client. Having a double click like that, unless you are meaning something else.

It is from the link in the forum sidebar I need conditional link. If the viewer is Member 2, they go to the CB_Gallery tab. If anything any other usergroup, they go to a page asking them to upgrade.

I remember from another post that no additional fields can be added to the CB_Gallery tab, so I can't put the Custom HTML there, Can I?

I guess I don't understand how the Custom HTML CBSubs Content would work with the CB_Gallery.

Also, I tried on the forum sidebar to add a substitution like
[cb:if usergroup includes "14"]<li>[cb:if cb_member_gallery="1"]Link 1[/cb:if]</li>[cb:else]<li>[cb:if cb_member_registry="1"]Link 2[/cb:if][/cb:else]</li>[/cb:if]
and
[cb:if cb_member_gallery="1"]<li>[cb:if viewaccesslevel !includes "8"]Link 1[cb:else]Link 2[/cb:else][/cb:if]</li>[/cb:if]

Neither worked.

Thanks,
HighOn Ryan

Please Log in to join the conversation.

6 years 11 months ago #294239 by krileon
Replied by krileon on topic Photo Gallery Tab Access
My suggestion doesn't care where your link goes. It can go to the gallery tab if you want. My suggestion was that instead of using a checkbox field to toggle it you'd simply directly condition against their subscription, but that can only work by using a Custom HTML field since content plugins don't work in the sidebar usage at this time. See my reply below regarding this usage.

www.joomlapolis.com/forum/255-developer-members-support/236671-photo-gallery-tab-access#294148

Usergroup, View Access Level, or a field that you toggle based off subscription would also work fine to condition against. So you could have a checkbox field that you toggle to 1 on subscription activate and toggle to 0 on subscription deactivate using CBSubs Fields. Then condition against the checkbox field as you're already doing. Then you'd have the below usage.

[cb:if cb_member_gallery="1"]LINK TO GALLERY[cb:else]LINK TO SUBSCRIBE[/cb:else][/cb:if]

It's entirely up to you which approach you take and which best fits your needs.


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

Facebook Twitter LinkedIn