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.

Scripting error

Home Forums Community Forum Scripting error

This topic contains 5 replies, has 2 voices. Last updated by  Eduan 3 years, 10 months ago.

Topic Author Topic
Posted: Saturday Feb 23rd, 2013 at 9:52 am #43041

Hi,

I am looking for a way to show an error message on my re-direct page for if a member clicks on a page that is restricted to his membership level and he gets redirected to the home page. On the top of the home page I’d like it to read “You don’t currently have access to this page”. I think that can be done through scripting, am I right?

I clicked on the scripting/API link in S2Member, but got the following error message:
syntax error, unexpected $end in /home/content/03/10128003/html/wp-content/plugins/s2member/includes/menu-pages/scripting.inc.php on line 877

How do I correct that? And what do I need to do to create that message on the top of the page in case someone doesn’t have access to a page?

Thanks! Femke

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Feb 23rd, 2013 at 5:16 pm #43065
Eduan
Username: Eduan
Moderator

Hello Femke,

Could you please try these common troubleshooting tips in order to fix that error:
Knowledge Base » Common Troubleshooting Tips

If none of these work, please try re-installing s2Member and s2Member pro. Make sure you have deactivation safeguards enabled, you can find them under Dashboard -› s2Member® -› General Options -› Deactivation Safeguards.

Regarding showing that “You don’t currently have access to this page” error. You would put this text in the membership options page, so it’s what the user sees if he tries to access content he can’t.

– Eduan

Posted: Saturday Feb 23rd, 2013 at 6:16 pm #43070

Hi!

Thanks, I re-installed and that did the trick.

With regards to the Memberships Options page: When someone’s signed in, they get automatically re-directed to the logged in homepage. On that page I’d like to show a message that they just tried to go to a page that was restricted to them, rather than send them to the memberships options page.

I’ve read through the scripting options, but not sure what to do. Could you send me in the right direction?

Cheers! Femke

Posted: Sunday Feb 24th, 2013 at 11:17 am #43113
Eduan
Username: Eduan
Moderator

Glad that solved the problem. :)

So basically, you mean, instead of sending them to the membership options page, simply do like a popup kind of thing?

– Eduan

Posted: Sunday Feb 24th, 2013 at 12:30 pm #43116

Yes, something like that. :)

Posted: Sunday Feb 24th, 2013 at 1:17 pm #43120
Eduan
Username: Eduan
Moderator

I’m afraid at this point s2Member can’t achieve this.

You would have to modify s2Member in order to achieve this effect, I’m afraid. :/

Viewing 5 replies - 1 through 5 (of 5 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.