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.

Free but approval based file download access

Home Forums Community Forum Free but approval based file download access

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

Topic Author Topic
Posted: Monday Feb 27th, 2012 at 8:23 am #6511
Andrew Lock
Username: dsmusic

Hi guys!

Just trying to make sure I do this in the right way (also in a way that, you know, works…)

Previously spoke in the pre-sales here – has some background: http://www.s2member.com/forums/topic/converting-from-wishlist-pre-sales/?nc40#post-5815

Our website is here: http://www.dsmusic.com.au

Here’s the situation:

We sell books. When you buy a book (not right now being sold from our website but through bookstores and amazon etc.) you have access to online resources to support that book. One of those resources is a .pdf copy (soon to be .epub as well). There are also a series of online lessons and, files and links to support the lesson content in the book. All of these memberships (for the website portion) are free, and are effectively packaged with the physical book purchase.

So what we require is a way to:
1. Approve memberships based on submission of a code (we can also tell which book has been purchased by the code submitted)
2. Grant file download access to a specific file for specific members (who may have more than one code/book)
3. Grant access to the digital resources page/section of the website for those that have the qualifying book

The ways I think we can do these things are:
1. Do this manually. Easy enough to add a required field for the code in the registration and shoot that through to us to verify. I’d like to automate this at some point in the future but manual is OK for now. My thought here is that we open Free access to Level 0, then approve and upgrade members to Level 1

2. This is the trickier one – I’m tempted to just email them the damn file manually since it’s a far simpler process and doesn’t require any tricky coding for now, however it seems that I should be able to do this with Custom Capabilities, so:
– User registers, submits code
– Upon verification of code, we apply appropriate custom capabilities to the user
– We have files stored on the website protected by custom capabilities; we email them a link or send them to a page showing them different links for their appropriate capabilities

3. Level 1 user gets access to the online resources section on the website. Easy. Once we add more resource sections dedicated to supporting more books, we segregate this access using Custom Capabilities.

The real trick seems to be getting CCaps to work for free users. I believe I can use the form generator to create a form that will give a user certain custom capabilities, however this seems to be automatic and not subject to approval. Can I create a form that will attach custom capabilities that will still require Level 1 membership?
So: User signs up with their code, and is granted Level 0 with CCap “book1”. They *don’t* have access to the “book1” CCap protected materials until they are moved up to Level 1 – does it work like that? Or to CCaps effectively exist outside levels? (I’ve watched the videos but still find these questions a bit unclear, sorry!)
The other issue with using CCaps to control this access is managing it, specifically adding them to the users – there doesn’t seem to be a good way to do it using the control panel other than drilling right into the user and typing it in the field, however I suspect that when we code up the process and automate the approval we can add that automatically…

I don’t want to go on too long so will leave this there – please let me know if you can help me get these setups right!

Thanks,

– Andrew

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Monday Feb 27th, 2012 at 4:57 pm #6561

Hi Andrew.

I think the idea of getting them registered at Level 0 and then manually upgraded to 1 after review, would be your best option.

If you wanted to add ccaps then, manually, you can too. Look further down in the profile page and you’ll find the field for them.

I hope that helps. :)

Posted: Tuesday Feb 28th, 2012 at 9:32 am #6664
Andrew Lock
Username: dsmusic

Hi Cristián,

Thanks for your reply – much appreciated.

What I’m going to do is let anyone register at Level 0, requiring input of the code in the form, which we will then manually review and upgrade access appropriately. What I’d like to do for the file downloads is protect the files at Level 0 with CCaps, and apply the appropriate CCap to the user after review, so those that qualify get access to the restriction section of the page, others can simply download the file if they have the right code.

I do remember seeing a guide on setting up download folders based on CCaps but can’t find it anywhere – are you able to help me there, please?

The other thing I’d like to figure out is – can I change the descriptions of the standard fields on the user registration form? For example, changing “Username ( lowercase letters and/or numbers ) *” to say “please use your email address” or something similar – is there somewhere in s2 to control this? Or is it the built in form for WordPress?

Thanks!

– Andrew

Posted: Tuesday Feb 28th, 2012 at 9:58 am #6667
Andrew Lock
Username: dsmusic

Another question for you!

Can a checkbox be placed into a registration form that will assign CCaps based on the checked items?

So, box has options 1, 2, 3, 4, 5 – user ticks 1, 3, 5 and is assigned CCaps “1,3,5” accordingly upon registration?

Posted: Wednesday Feb 29th, 2012 at 2:04 am #6730

Can a checkbox be placed into a registration form that will assign CCaps based on the checked items?

Not really, but you could try hacking this after registration.

You can get the option’s values the user picked using something like get_user_field.
http://www.primothemes.com/forums/viewtopic.php?f=4&t=6501

Based on those values, you can then give the ccaps via PHP.
Knowledge Base » Changing Roles/Capabilities via PHP

You can trigger it using a hook after registration, or using the s2Member notification for registrations.
[hilite path]Dashboard -› s2Member® -› API / Notifications -› Registration Notifications[/hilite]

Posted: Wednesday Feb 29th, 2012 at 2:15 am #6731

I do remember seeing a guide on setting up download folders based on CCaps but can’t find it anywhere – are you able to help me there, please?

To use ccaps for download protection, here’s the documentation:
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Custom Capability & Member Level Files[/hilite]

Posted: Wednesday Feb 29th, 2012 at 2:39 am #6733

The other thing I’d like to figure out is – can I change the descriptions of the standard fields on the user registration form? For example, changing “Username ( lowercase letters and/or numbers ) *” to say “please use your email address” or something similar – is there somewhere in s2 to control this? Or is it the built in form for WordPress?

That’s actually WordPress, not s2Member.

Did a search and found this:

http://wordpress.stackexchange.com/questions/6096/change-labels-on-nickname-and-biographical-info-in-user-edit-php

I hope it helps. :)

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