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.

3 How to stop this automatic redirection??

Home Forums Community Forum 3 How to stop this automatic redirection??

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

Topic Author Topic
Posted: Monday Oct 21st, 2013 at 10:37 am #60493
miranda rota
Username: tara2

I’m making a site that I’ve bought your S2M plugin for, for my client. The site is also using an events management plugin, Event Espresso. The client wants visitors to be able to read all the info about each event, including info that is after the ‘More’ tag. The only info they do not want the casual visitor to see, is the event registration form (they only want people to be able to register for events after they have become members and been checked out).

At the moment, if someone clicks on either the Events widget in the sidebar, or the Events and/or Forthcoming Events pages, they are immediately redirected to the Become a Member page.

http://gator3027.hostgator.com/~yep1/forthcoming-events/

I’m still new to your plugin and am suffering a bit of information overload but I know (somewhere!) I came across info saying that we could add a tag (not the More tag) on any page, after which visitors would not be able to see unless they are logged in.

My main question is how can I accomplish this on the event info pages made by Event Espresso – that visitor can read all the info but NOT see the registration form at the bottom of the page?

Many thanks for your time.

List Of Topic Replies

Viewing 12 replies - 1 through 12 (of 12 total)
Author Replies
Author Replies
Posted: Monday Oct 21st, 2013 at 7:53 pm #60506
cassel
Username: cassel

I am not familiar with Even Espresso, but I am somewhat familiar with protecting content. My favorite way to protect content is with Custom Capabilities, or shortcodes. In your example, it looks like it would be a simple matter of wrapping the content between shortcodes like these:

[s2If is_user_logged_in()]
   Content for anyone that is logged in - so the event details
[/s2If]

[s2If !is_user_logged_in()]
   here you can add some kind of "sale pitch" or link to where they can purchase/register, or prompt them to log in if they are already registered
   [/s2If] 

This means that the content you want, will be displayed to the logged in members, while something else will be shown to the not-logged in visitors/members.

Would that work?

Posted: Tuesday Oct 22nd, 2013 at 5:51 am #60525
miranda rota
Username: tara2

Oh Cassel, thank you so much! :)
Both for just responding and also because what you have given looks so promising! I will try it today and get back to you.

You are much appreciated :)

EDIT: Cassel, those shortcodes are both the same …the one for content to not be seen, and the one for content to be seen, like sales pitch, etc. ….should the shortcodes both be the same or is that a little mistake and the shortcodes should be different?

Many thanks for your time.

  • This reply was modified 3 years, 2 months ago by  miranda rota.
Posted: Tuesday Oct 22nd, 2013 at 5:59 am #60527
cassel
Username: cassel

Both shortcodes are similar, but notice the second one has a !, which means “not”.

You can find more ways to use conditionals under s2Member > API Scripting and I took that information under the “Simple/shortcode conditionals”.

Posted: Tuesday Oct 22nd, 2013 at 6:21 am #60528
miranda rota
Username: tara2

Big thank-you :)

Which country do you live in, btw?! Also, do you frequent this forum reasonably often? …I do hope so! ;)

Anyway, really grateful for your super assistance

Posted: Tuesday Oct 22nd, 2013 at 5:20 pm #60535
cassel
Username: cassel

I am in Canada. I visit this forum regularly (but not every day) simply to get help myself or to give back from all I have learned about this plugin. I have been using this plugin since 2 and a half years for my own site, so I have had many of the questions commonly asked in here, so when I can, I try to help out. But I am not a programmer, so I can only help on limited issues, like yours.

Posted: Wednesday Oct 23rd, 2013 at 6:29 am #60547

Cassel is awesome, I just wanted to add that comment. A great friend in this community, always looking out for others and always very nice when asking something. Thanks for helping everyone so much. :)

Miranda, conditionals are super powerful and versatile. We love them, that’s why we made them possible with WP shortcodes. And you can go even further with PHP conditionals, if you come up with more complicated conditions you’d like met in the future. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals[/hilite]

Posted: Wednesday Oct 23rd, 2013 at 7:38 am #60552
miranda rota
Username: tara2

Agreed! :) (re Cassel being awesome)

Cristian, many thanks for your informative reply which I will now investigate the info you’ve given!

First though, would you be able to tell me how I can ‘undo’ the automatic redirection to the ‘Become a Member’ page when someone clicks on any Event link? …so I can start work on implementing setting up in the pages which bits are to be hidden and which bits not – the present redirection means that I can’t see what I’m doing.

I have previously been using Wishlist Member, then installed wpmu-dev’s membership plugin (which seems to be uncannily like wishlists for some reason) and it’s like wp is still remembering what needs to be hidden – even though I’ve deleted both of those plugins.

Many thanks for your help, it really is much appreciated :) (I’m incredibly late delivering this website and panic level makes it difficult for my brain to function sometimes!)

Posted: Wednesday Oct 23rd, 2013 at 8:05 am #60553

Yeah, i can understand the panic part with projects. Been there years ago and still have the scars. :P

About the events redirection to become a member, it’d be best to first make sure it’s not something leftover from another plugin that you need to finish removing.

Make sure you have the s2Member deactivation safeguards enabled first: [hilite path]Dashboard -› s2Member® -› General Options -› Deactivation Safeguards[/hilite]

Then deactivate s2Member for a moment and test if you still have the redirection. If you do, then take care of that first with help from the developers of the plugin that seems to be doing it.

The s2Member restrictions would cause the user without enough access, to be redirected to the page you chose as the Membership Options Page. [hilite path]Dashboard -› s2Member® -› General Options -› Membership Options Page[/hilite]

Did you protect the event pages with one of s2Member’s restrictions?

The restrictions will always redirect the user without access to the page you designated for the Membership Options. You can customize that page any way you want, though. For example: having conditionals that will show different content depending on the user’s level, or the page he was trying to view.

These may be useful for those customizations:
[hilite path]Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants[/hilite]
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Membership Options Page Variables (MOP Vars)[/hilite]

I hope that helps. :)

Posted: Thursday Oct 24th, 2013 at 11:15 am #60585
miranda rota
Username: tara2

Cristian, thank you for the above which I’ve been going through.

I’ve carried out what you advised, de-activated the S2M plugin, and saw that most things were working well – the main one being that when logged out, I could read all the info about the event and at the end of this info it just had the text saying something like “to book an event, please login or register” with the ‘login’ and ‘register’ being linked to respective pages.

How can I keep everthing to work like this – without doing the page redirect? (to recap: as soon as a visitor clicks on ‘Forthcoming Events’, they immediately redirected to ‘Become a Member’ so can’t read what the event is about. )

If we can synchronize our time so that I de-activate S2M for a few minutes while you have a look, would you be willing to visit the site to understand what I mean?

I’ve been following all the sections you suggest I read but the amount of information that I would need to understand is pretty overwhelming and no way I can understand it all within a few days ;) I feel that the solution to what I need is probably a small and simple few steps to setup …which is why I’m asking you if you can help a bit more with this.

Many thanks for your time!
ps. This is the site: http://gator3027.hostgator.com/~yep1/forthcoming-events/

EDIT: How can I take ALL pages OUT of being hidden, so I can implement the shortcodes that Cassel gave above to just hide the event registration form?

  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
Posted: Friday Oct 25th, 2013 at 5:39 am #60599

To not have s2Member redirect users to the Membership Options Page, you need to remove the restrictions set that apply to those pages. [hilite path]Dashboard -› s2Member® -› Restriction Options[/hilite]

Also remember that s2Member will require the user to be logged in to view the page you chose as the Login Welcome Page. [hilite path]Dashboard -› s2Member® -› General Options -› Login Welcome Page[/hilite]

Posted: Friday Oct 25th, 2013 at 6:44 am #60600
miranda rota
Username: tara2

Cristian, thank you so much for responding. In the end I got it to work by not selecting any page in the

s2Member® General Options - Membership Options Page 

Thank you very much for your help :)

  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
  • This reply was modified 3 years, 2 months ago by  miranda rota.
Posted: Wednesday Oct 30th, 2013 at 8:15 am #60757

Right, that’d disable all restrictions because the Membershio Options page is a requirement for them to work.

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