PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

nested shortcodes and s2member

s2Member Plugin. A Membership plugin for WordPress®.

nested shortcodes and s2member

Postby oxwald » November 22nd, 2011, 3:08 pm

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
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: nested shortcodes and s2member

Postby Eduan » November 22nd, 2011, 3:22 pm

Have you tried uninstalling/deactivating the "Post Snippets" plugin?
And then use the s2Member conditionals.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: nested shortcodes and s2member

Postby oxwald » November 22nd, 2011, 5:29 pm

It works this way but I would like to use this plugin ;-)
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: nested shortcodes and s2member

Postby Eduan » November 22nd, 2011, 5:47 pm

Well I'm just saying that maybe it's causing an incompatibility with s2member conditionals.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: nested shortcodes and s2member

Postby oxwald » November 23rd, 2011, 4:02 am

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]
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: nested shortcodes and s2member

Postby adaum » December 5th, 2011, 11:52 pm

oxwald... you eve3r find a solution to this?

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

Thanks
User avatar
adaum
Registered User
Registered User
 
Posts: 2
Joined: December 5, 2011

Re: nested shortcodes and s2member

Postby adaum » December 6th, 2011, 12:55 am

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.
User avatar
adaum
Registered User
Registered User
 
Posts: 2
Joined: December 5, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 0 guests

cron