Page 1 of 1

nested shortcodes and s2member

PostPosted: November 22nd, 2011, 3:08 pm
by oxwald
Hello all,
I'm using the "post snippets" plugin (http://wpstorm.net/wordpress-plugins/post-snippets/) and would like to create a shortcode containing s2member conditions.

the shortcode woul look like :
Code: Select all
[hide_content].... protected content...[/hide content]


the corresponding s2member conditions looking like

Code: Select all
[s2If current_user_is(s2member_level1)]
... protected content .....
[/s2If]
[s2If !current_user_is(s2member_level1)]
.... static content if no access .......
[/s2If]


But i cannot make it work : the s2member conditions are not evaluated
Do you have any idea why ?
Thanks in advance

Re: nested shortcodes and s2member

PostPosted: November 22nd, 2011, 3:22 pm
by Eduan
Have you tried uninstalling/deactivating the "Post Snippets" plugin?
And then use the s2Member conditionals.

Re: nested shortcodes and s2member

PostPosted: November 22nd, 2011, 5:29 pm
by oxwald
It works this way but I would like to use this plugin ;-)

Re: nested shortcodes and s2member

PostPosted: November 22nd, 2011, 5:47 pm
by Eduan
Well I'm just saying that maybe it's causing an incompatibility with s2member conditionals.

Re: nested shortcodes and s2member

PostPosted: November 23rd, 2011, 4:02 am
by oxwald
yes, i understand but, in fact, i'm looking for a shortcode plugin to help editors post their article with protected content.
They would just have to type [some_kind_of_shortcode]....protected content...[/some_kind_of_shortcode] to have it protected like if they had typed :

Code: Select all
[s2If current_user_is(s2member_level1)]
... protected content .....
[/s2If]
[s2If !current_user_is(s2member_level1)]
.... static content if no access to ask users to register .......
[/s2If]

Re: nested shortcodes and s2member

PostPosted: December 5th, 2011, 11:52 pm
by adaum
oxwald... you eve3r find a solution to this?

If so, I'd appreciate knowing what it was.

Thanks

Re: nested shortcodes and s2member

PostPosted: December 6th, 2011, 12:55 am
by adaum
Oxwald... I used this conditional with "post snippets" and it worked;

Code: Select all
[s2If current_user_can(access_s2member_level1)]


Yall were using:

Code: Select all
[s2If current_user_is(s2member_level1)]


Lets users 1 and above view.