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.

Creating User Content Custom Login Pages

Home Forums Community Forum Creating User Content Custom Login Pages

This topic contains 7 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 1 month ago.

Topic Author Topic
Posted: Monday Nov 26th, 2012 at 9:19 pm #32653

Hi,

Is it possible to create user specific custom content on a user by user case basis ?

I only want a user to have access to specific content that is relavant ONLY to them ?

Not by level but ONLY to a few items within my entire video library.

UPDATE: I am reading that you can do what I am asking about, but the documentation is from the perspective of a user that hasn’t been added yet. What I am asking about is a user that as the admin you add and you want to grant specific privs to see only what you want them to see. Is this possible ?

Miles.

  • This topic was modified 4 years, 1 month ago by  miles tangos.

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Tuesday Nov 27th, 2012 at 7:29 am #32688

Hi Miles.

You could probably do that with custom capabilities. Please watch these, as they may give you an idea on how to accomplish what you want:

Video » s2Member (Custom Capabilities)
Video » s2Member (Client Portals?)

I hope that helps. :)

Posted: Tuesday Nov 27th, 2012 at 1:18 pm #32721

Cristián,

Thank you for the ‘ahem’ clarity ;-) ….moving right along:

However, we still haven’t addressed my issue: EXISTING USERS!

I have 90+ users that are ALREADY in the system, I think it would be woefully inefficient make my entire user base walk back thru a sign up process, because I’ve created a new button that makes them all go sign up AGAIN, and then pay me more money, when they’ve already done that once already.

Let me try to be a little clearer this time:

1.) I have 90+ users that have already paid me, and that are ALREADY in the user system. Your first video and partially the 2nd video talks about users that don’t exist yet, that will come to the site and at the time of user creation you’ll set roles and permissions for them. What about users that have already been created, the existing user base ? How do we re-set roles and permissions for THOSE users ? Or users that I create on the fly that go thru the external registration process but that I add manually ?

2.) I have well over 300+ pages of content that I need to repackage on a global basis for those 90+ users. While I can easily see using either one of these methods I will have to either go thru each and every page and add/change a user level (which is what I did for the first 50, and then as I added more I added in the user levels at the time of creation), is there a way to set up a group of pages so that only a specific user has access to them ?

3.) The example that Jason gives in the 2nd video talks about the user ‘MaryJane’ and the permission set of ‘MaryJane’. While this is all fine and good, and sort of solves my problem, the solution would mean that I would have to go and create 90+ pages for each and every user, and then within each of those user pages post content for each and every user. Again, woefully inefficient, in my opinion. My question is really after creating ONE page for MULTIPLE users, where the content on that page is user specific based on a set of parameters that I set globally, not individually.

For Example:

MaryJane logs in, and she sees 2 videos (#12, #92) in her account that she has access to.
BobDavis logs in, and he sees 5 videos (#14, #34, #57, #76, #92) in his account that he has access to.
DanMeehan logs in, and he sees 4 videos (#34, #57, #75, #92) in his account that he has access to.

Note that #92 is common to all 3, #34 and #57 are common to BobDavis and DanMeehan.

Miles.

  • This reply was modified 4 years, 1 month ago by  miles tangos.
Posted: Wednesday Nov 28th, 2012 at 6:49 am #32757

You can edit the existing users to give them the ccaps you want, either editing their profiles manually or editing them in bulk with the User Export and Import tools. [hilite path]Dashboard -› s2Member® -› Import/Export -› User[/hilite]

About the pages, you could give each page a unique ccap and then give the users the ccaps for the pages they would have access to. So in your example: MaryJane could have ccaps video12 and video92.

The page for each video would be protected with the ccap for that video, and the video file itself could be protected too. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Custom Capability and Member Level Files[/hilite]

Does that help?

Posted: Wednesday Nov 28th, 2012 at 9:11 am #32774

Cristián,

Your solution solves the existing user issue! Cool!!
Your solution also solves the page permission & packaging issue! Cool!

So that’s 3!

However, it doesn’t address the primary: A single custom, dynamic, page for all users!

While I believe I ‘may’ be able to achieve that with logical IF THEN ELSE statements from within S2’s logic. I am wondering if there is a far simpler method! Is it possible to pull the user record (CCAP values) dynamically, then display those pages as links that they have access to…dynamically ?

And if so, does S2 have a custom capability for that somewhere ?

Miles.

  • This reply was modified 4 years, 1 month ago by  miles tangos.
Posted: Wednesday Nov 28th, 2012 at 4:03 pm #32808
Raam Dev
Username: Raam
Staff Member

Hi Miles,

There is not currently any feature for displaying a list of pages the user has access to, however, as you mentioned, you can achieve that with the IF THEN ELSE logic, creating a single page that checks what the user has access to and then displays links to those things.

If you wanted to do this dynamically, you could certainly write some PHP code that loops through all the WordPress pages on your site, checking the required Custom Capability and then checking if the user has access to it, showing a link to the page if they do have access. However, this code is something that you’d need to write and maintain, as it’s not part of s2Member.

Posted: Wednesday Nov 28th, 2012 at 6:39 pm #32837

Raam,

Thanks for the response. However, the IF THEN ELSE logic is woefully inefficient.

Correct me if I am wrong, but doesn’t S2 pull the user ID ?
Does it not also pull the user’s capabilities and embedded in that response is the page id ?
And isn’t there code that’s already been written to allow for this ?

Can it not be repurposed for exactly what I am talking about ?

You mean to tell me that the vast codex library (http://www.s2member.com/codex/) doesn’t contain anything remotely like what I am yapping about ? Someone, somewhere has to have written this, I am certainly not the only one that has requested this feature set. It’s actually a logical progression of the set up.

???

Miles.

Posted: Thursday Nov 29th, 2012 at 7:28 am #32893

No, others have just done the if/else code, since they only had a few links to check, not as many as you.

If you query the database, you could get all the s2Member ccap capabilities the user has, and link to the pages based on that. Since each ccap would match a single page, it’s easy to know what pages to link to. s2Member ccaps are regular WP capabilities with the prefix [hilite mono]access_s2member_ccap_[/hilite].

Your solution solves the existing user issue! Cool!!
Your solution also solves the page permission & packaging issue! Cool!

Great. :)

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