Page 1 of 1

Is this even possible ?

PostPosted: February 8th, 2011, 10:04 pm
by Chris
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

Re: Is this even possible ?

PostPosted: February 9th, 2011, 12:02 am
by Cristián Lávaque
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!