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™

Is this even possible ?

s2Member Plugin. A Membership plugin for WordPress®.

Is this even possible ?

Postby Chris » February 8th, 2011, 10:04 pm

I just wanted to take a moment and send a quick thank you for all the help in resolving my issue below. Subject: Display Client Page Link in Header. It is working nicely.

I have a photography blog in development and my goal is this.

1) allow open registration to for users to join and become part of community etc. (Subscribers ?)
2) have a client portal for clients to view/proof their recent photo's from paid sessions, once they login with the user/pass I have created it takes them to their own "gallery" page. (currently level 0).

I have a redirection setup using %%current_user_login%% to acheive #2, but the problem is that any NEW USER(not a client) is directed to a 404 page after registration, because of the variable above. Obviously, that is not what I want to happen.

Is there a way to redirect "clients" to their specific page, yet redirect normal "users" to index ?
Something along the lines if "page doesn't exist - redirect to index.php" or such. Both groups need only Read access. As well, I would not need normal users to have a "My Page" or "Member Home" page/link.

Should I be looking at different membership levels and permissions ?

I am sure it's possible, but just don't know where or what to adjust.
Any direction or advice is greatly appreciated
Chris
User avatar
Chris
Registered User
Registered User
 
Posts: 7
Joined: February 2, 2011

Re: Is this even possible ?

Postby Cristián Lávaque » February 9th, 2011, 12:02 am

No problem. I'm glad I could help with that. :)

Well, I'm not sure I understood exactly what you want, but from what I got...

You could use Level 0 for the general members, open registration; and Level 1 would be the clients, paid members.

For the user galleries, I see, you're using the redirection s2Member allows for Login Welcome. Let me think...

OK, here's an idea that may work. Use a redirection with the replacement code for the member's level %%current_user_level%% and login name %%current_user_login%%.

The URL you'll use would be to a custom PHP file that'll redirect the person to the right login welcome depending on his level. If Level 1, he'll be redirected to his gallery page, customized with his login name.

The URL for the redirection would be something like
http://yourwebsite.com/loginwelcome.php?level=%%current_user_level%%&login=%%current_user_login%%

The code for loginwelcome.php could probably be something like

Code: Select all
<?php

if 
(isset($_GET['level']) && $_GET['level']) == '1' && isset($_GET['login']))
    header('Location: /gallery/' . $_GET['login']);
else
    header('Location: /welcome');

?>


If your user gallery URLs use member IDs, then change login to id.

Hope it helps!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot] and 0 guests

cron