Skip to Content Skip to Menu

[SOLVED] Hide Content depending on CBsubs Plan

12 years 1 month ago #197965 by pixelkraft
Replied by pixelkraft on topic Re: Hide Content depending on CBsubs Plan
Thank you!

I already tried to get it work with a RegEx but it didn't work out.

{cb:[cb:if cb_subscription =~ "3"]You are in Plan 3[/cb:if]}


But this does not work either?!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
12 years 1 month ago #197972 by krileon
Replied by krileon on topic Re: Hide Content depending on CBsubs Plan
REGEX needs a delimiter. You also don't use spaces for REGEX, that's only for the includes operator. Example as follows.

{cb:[cb:if cb_subscription=~"/3/"]You are in Plan 3[/cb:if]}


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.

12 years 1 month ago #197976 by pixelkraft
Replied by pixelkraft on topic Re: Hide Content depending on CBsubs Plan
It works! Thanks! I see I have to be concerned with RegEx a bit more :)

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

12 years 1 month ago - 12 years 1 month ago #198503 by pixelkraft
Replied by pixelkraft on topic Re: Hide Content depending on CBsubs Plan
I encountered the problem that I am able to hide single words or a <span> with that code but not a larger amount of text/code.
Code:
{cb:[cb:if cb_subscription=~"/2/"]<span class="blue">This works: </span>[/cb:if]}

This works!

I tried how many characters the if-query can handle and found out: When it includes more than 330 characters (or 380 with space), then this results in a php Stack overflow error!!

Is this a bug of the plugin or maybe a config-issue? I am running this joomla 1.5.26 web on an IIS!

Any idea?
Last edit: 12 years 1 month ago by pixelkraft.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
12 years 1 month ago #198526 by krileon
Replied by krileon on topic Re: Hide Content depending on CBsubs Plan
As far as I am aware there is no limitation of text. Please enable debug mode and maximum error reporting in Joomla global configuration then retry whatever string caused an error and provide the full error displayed.


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.

12 years 1 month ago #198563 by pixelkraft
Replied by pixelkraft on topic Re: Hide Content depending on CBsubs Plan
Hi!

That`s the problem. In Firefox I don`t get an error message. The browser is trying to load the page and then after some minutes just stops. No Joomla error messages! The php stack overflow message I get in IE with compatibility mode on a blank page. No Joomla debug reports :-/

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn