latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Access Level Script Question

Home Forums Community Forum Access Level Script Question

This topic contains 4 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Mar 13th, 2012 at 6:04 pm #8059

Hi s2member,

I am wondering if there is a script where I can provide two different access levels depending on user level. At the moment I want the 1-6 members to only access 1-6 however, with the upgrade I want the members from 7-12 to access the premium content.

Is there a easy script to use for that – I tried this version but it didn’t work – I am not sure if I did it correct:

[s2If current_user_can(access_s2member_level1-6)]

Content for levels 1 to 6

[/s2If] [s2If current_user_can(access_s2member_level7-12)]

Content for levels 7 to 12

[/s2If]

Looking forward hearing from you.

Sincerely,
Rita

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Wednesday Mar 14th, 2012 at 4:11 am #8092

Maybe this?

[hilite pre_code]
[[s2If current_user_can(access_s2member_level1) AND current_user_cannot(access_s2member_level7)]
Content for levels 1 to 6
[/s2If]]

[[s2If current_user_can(access_s2member_level7)]
Content for levels 7 to 12
[/s2If]]
[/hilite]

I hope it helps. :)

Posted: Wednesday Mar 14th, 2012 at 4:21 am #8093

Thank you for your response! I figured out a way to do it – un-patient as I am – but I am still going to try your method. Trying to keep it as code-clean as possible. How is it with e-mails? Just got a few sign-ups through our website but for some reason the return sign-up e-mails get stuck in the spam folder for the recipients.

Sorry to bother you for another question. Really appreciate all the responses that you share!

Sincerely,
Rita

Posted: Wednesday Mar 14th, 2012 at 4:22 am #8094

Another question – while I have you accessible – how do I create a simple login for individuals on a frontpage of the site without using the s2member widget?

Posted: Wednesday Mar 14th, 2012 at 5:40 am #8102

You’re welcome. :)

I figured out a way to do it – un-patient as I am – but I am still going to try your method. Trying to keep it as code-clean as possible.

If you know PHP, you can also write conditionals using [hilite mono]S2MEMBER_CURRENT_USER_ACCESS_LEVEL[/hilite].
[hilite path]Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants[/hilite]

How is it with e-mails? Just got a few sign-ups through our website but for some reason the return sign-up e-mails get stuck in the spam folder for the recipients.

The problem is that your emails are, for some reason, being considered spam by the customer’s filters. There are many things that spam filters look at. I’m guessing that the problem may be with the IP your server has, if it’s shared, maybe another person in that same server has not been careful with his email practices.

This article may help:
Knowledge Base » Troubleshooting Email Delivery Problems

Another question – while I have you accessible – how do I create a simple login for individuals on a frontpage of the site without using the s2member widget?

You can Google that, there should be tutorials to do that with WordPress. Now, you can use the widget inside the page, not just in widget areas.
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Pro Login Widget (via PHP)[/hilite]

Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.