A Dynamic Custom Welcome Page

Hi,

Wondering if anyone, and I am imagining that SOMEONE out there, has done what I am about to suggest:

If I want a custom login page for a user, I have to manually create the page with that users name, then add specific content for that user that is relevant to THAT specific user. There are several ways to do this, one of which is at the time of purchase of resources to write a php script and then fire off the script to record the transactions…which then translate to resources. And then on the back side when that specific users page is loaded ONLY that code runs to check to see what the transactions are for that user.

I have a wild and crazy idea folks: This is a data driven tool, right ? How about we create ONE page and DYNAMICALLY populate the page with the users transactions and capabilities ?

Why isn’t that possible ?

Miles.

Who says it isn’t possible? See http://s2member.com/kb-article/customizing-your-login-welcome-page/

Tim,

Perhaps you’re not seeing the finer points of what I asked, because I can easily see how my last message may have been misinterpreted to create a lack of clarity around this ‘issue’.

Let’s assume the scenario where I have 20 pages where I am protecting content with s2Member through a series of IF->ELSE conditionals. One part of the page says YES YOU CAN SEE THIS, the other part of the page says NO YOU CAN’T – SHOW PURCHASE BUTTON. Got it ?

Now we assume that an end user purchases the access so that they can see this page. Great! And they do this wiht a number of pages, over and over and over so that they build up a series of links and purchases, a library if you will. Some time passes and they’ve forgotten what they purchased, and when they come back to the welcome page, wouldn’t it be nice to show they what they’ve purchased ? To show them the links they have access to ?

The way s2Member is set up right now, to get this functionality:

a.) I would have to manually create the page with that users name,

Scroll down in the link you sent me, that’s the USERNAME feature …

b.) then add the specific links/content for that user that is relevant to THAT specific user.

This means, that every time that a user buys a product, that I have to go in and edit their page, manually so that they now have access to a product. If they want to come back to the site at a later point in time, and be able to find the links that they have access to, the site manager (me) has to go in and modify their specific user page, adding their new purchase for just that link going forward. This works just fine for 5 or 10 users and if you have time to do that…but when you when you’re dealing with hundreds of users say 4 or 5 HUNDRED, this methodology is NOT practical going forward and becomes rather unwieldy very quickly with larger user bases. I have 473 paying customers right now and that’s expected to grow considerably in the next year. This methodology that has been suggested either by username, or level isn’t practical.

My question is aimed at, is there a way to

a.) dynamically generate a list of accesses for a specific user.
b.) present that list to the user with links.

Clearer ?

Miles.

Surely that’s what the [s2If current_user_can(access_s2member_levelxx)] constants are for. You don’t need to know the user’s name; they get to see what they have access to.

[s2If current_user_can(access_s2member_levelxx)] … ummm no.

Tim…ahem…again, that would mean that I would have to a.) create a page for them, b.) populate said login/welcome page with the packages that they have purchased. c.) keep going back each and every time they purchase or delete or they’re access expires, and then update it, and then do that for 478 users every day, every year. And again, creating 478 +going forward, more pages each and every time a new user shows up or removes their access. Again this is not practical. It’s tedium.

Dynamic means that I only have to code it once, on ONE page, with the right or proper variables and any one of those 478 users can show up, see what they’ve purchased and then be directed to those resources.

This is thing is supposed to make things easier…not harder.

Thank your for your response but I believe that you are employing an IF THEN ELSE strategy when I am asking for realtime variables that must either be created, or set somehow and I have the feeling that they don’t exist because S2Member doesn’t save or store those values (when in fact it should).

Thanks.

Ahem … no it wouldn’t!

That’s the whole point of the can syntax. But evidently you don’t want to know, so I’ll stop wasting my time.

1 Like

Well clearly I do, sir.

So why not enlighten me as a sample of what you mean ?

Because I see your solution as this:

1st create these pages:

http://www.example.com/johndoe22-account-page
http://www.example.com/maryjane-account-page
etc and then duplicate that 471 more times for my site.

Then on each page do the following…

[s2If current_user_can(access_s2member_levelxx)]

paste links and purchases here for every customer

[endif]

and then having to update the page each time one of them makes a change to their services.

If that’s not what you meant, then please do sir, enlighten me.

Miles.

Well, there’s a way to ask. You started off by telling.

Then I pointed you to the right place. But you didn’t ask how that helped. You just told me it didn’t. And got snarky – which would be fine if there was something to get snarky about.

I’m happy to help anyone who genuinely wants to be helped. But I’m not volunteering my time for it to be wasted.

On the footing that you actually do want to be helped, let’s take it step by step.

s2Member is about managing members’ access to post and pages. It does that by means of user roles and custom capabilities.

Let’s stick with roles, because it will make what you want to do easier. Roles are hierarchical, so level 4 can access level 4 content and all the content in levels below.

So, if you use [s2If current_user_can(access_s2member_levelxx)] conditionals, you can put there the links to all level 0, 1, 2, 3, and 4 content within them. No need for individualized links at all. If the member has the credentials, they get access links.

Then repeat for every other level.

In other words, once you’ve set this up, the only time you’ll need to make a change is if/when you add a new level. You need to make no changes for each user.

1 Like

Tim,

First and foremost, thank you for the refresher education information on how s2Member operates.

But again you misunderstanding the question that I have spelled out 3 different times now. And my apologies sir (note the honorifics here in the last 2 messages, if I were being ‘snarky’ then I wouldn’t put them there to clarify the LACK of ‘snarkiness’) for notating this to you but you seem to not quite be understanding what it is that I am after.

I understand how s2Member works, and have for the last 3 years, I understand have operated under the guise that it is capable to protecting pages and posts in the manner in which you describe. That not specifically what I am wanting it to do.

Again: Here we go:

User comes to my site, purchases X, Y, and Z.
At the end of those purchases, they leave. Capice ?
Now later on when they return to the site on THEIR individual welcome page
they should see a list of what they’ve purchased and what they have access to on THEIR welcome page.

According to the page that you directed me to, which I had seen previously and thank you for pointing out to me again, and it was the reason for which I asked my primary question to begin with sir. This solution would allow me to customize S2Member using the USERNAME. In specific: s2Member’s solution is to create individual welcome pages for each user and then to modify those pages individually with the logic you suggest above.

This is NOT practical when you’re dealing with hundreds of users.

So my question asks why not create ONE page with said logic that looks at the user profile and then shows the places that the end user has access to now by showing the links.

Miles.

Not only do I capice, I actually do this! So good luck to you!

Let me get this straight Tim, you have hundreds of users, and you have hand coded each welcome page, and every time they add or remove a service you go in and modify the transaction of their welcome page ? and manage your site like that ?

No, I haven’t hand-coded anything! I actually use the conditionals I suggested.

I use conditionals to redirect users to the right links. But I just use the regular Login Welcome Page to do it. You know: “the one page with said logic” that you said you were after. Because that page is dynamic.

1 Like

Ok, then if you would be so kind as to show me your code for that page please ?

Just to clarify when "User comes to my site, purchases X, Y, and Z. "

How do they purchase? Via s2member or another ecommerce solution?

Sonja

Via S2Member’s Implimentation of PayPal or whatever payment gateway the admin user has engaged.

Miles