Home › Forums › Community Forum › Content dripping – timesstamp – ccaps
This topic contains 25 replies, has 5 voices. Last updated by cassel 4 years, 2 months ago.
Topic Author | Topic |
---|---|
Posted: Tuesday Sep 25th, 2012 at 2:20 pm #26459 | |
|
|
I am seeking suggestions from the support staff. Here is my current situation: – i have several products, all protected by ccaps, and all independant of each other (all Level 1) I would like to offer the “element” course to new customers in a drip content manner, so they can have a set number of lessons upon purchase (ex: 20) and then, see new content dripped weekly. So a new customer would get access to lessons 1-20 at the time of purchase, then 21 next week, 22 the week after and so on, even though, the current members of the “element” course are already at lesson 60. Could i use a Level 2 for the new members and assign a dripping schedule while making sure they do not access all the content for Level 1 (which has ccaps)? |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Wednesday Sep 26th, 2012 at 4:23 am #26525 | |
![]() |
|
Yes, if Level 1 content is already restricted using ccaps, then any Level 2 members who signup without those ccaps will not have access to the Level 1 content. I’m fairly certain that answers your question, but I suggest just creating a Level 2 user manually and then testing things on your live site to see if they work as you expect. |
|
Posted: Wednesday Sep 26th, 2012 at 6:17 am #26533 | |
|
|
This answers part of the question and yes, i thought so, since Cristian already tested that part for another question. But now, if the content is currently restricted with ccaps, how can THAT content be dripped to a Level 2 member? Is it possible? I dont want to have to replicate hundreds of pages just to have a set for Level1 and a set for Level2 (unless there is really no other way around). And how to get the dripping based on the time of the PURCHASE and not the registration, as they might differ? |
|
Posted: Thursday Sep 27th, 2012 at 4:50 am #26656 | |
![]() |
|
If the Level 2 members don’t have the Custom Capabilities that you’ve restricted the content to, then it’s not possible to give them access to it or drip it to them. You’d need to first assign them the Custom Capability so they have access.
Please see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants and S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME. |
|
Posted: Thursday Sep 27th, 2012 at 6:25 am #26662 | |
|
|
Do you mean that i can give the same ccaps to the Level2 members as Level1 members cirrently have AND drip that content too?
Considering that i would, in this case, have only ONE Level2 kind of product, i think it could work, but i guess if i was to create a different product with a different dripping schedule or for different pages, i would have to use yet another level if the same member MIGHT be purchasing more than one? |
|
Posted: Thursday Sep 27th, 2012 at 7:50 pm #26767 | |
![]() |
|
Yes. Content Dripping relies on the conditional that you use to drip the content. Once the user passes the conditional, they will need to have access to the content before they can actually see it.
I’m not sure I understand what you’re asking, but the main thing to remember is that content dripping is entirely controlled by the conditionals that you create. You can make your conditionals check for any combination of things (Custom Capabilities, Levels, Time Since Registration, Time Since First Payment, etc.). |
|
Posted: Thursday Sep 27th, 2012 at 9:20 pm #26779 | |
|
|
All my content is currently protecte with a conditional called “Element”, and it is for my Level1 members. |
|
Posted: Friday Sep 28th, 2012 at 7:57 am #26825 | |
|
|
Yes, you can add a condition that checks for the level in combination with the first payment time for that level. In the same page you could have the conditionals to drip to level 1 and level 2. Here you can see an example of the code to get the first time at each level. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Content Dripping -> Very Advanced[/hilite] |
|
Posted: Friday Sep 28th, 2012 at 8:35 am #26837 | |
|
|
Thanks. Off to study. |
|
Posted: Sunday Sep 30th, 2012 at 7:27 pm #27029 | |
|
|
I am just a bit unsure now, how to code the php. I want the content to be dripped weekly, so i would use multiple of 7 days (unless there is a way to use weeks?). So far, i figured how to set up the basic of the time but where do i include the ccaps? Or do i have to since all those pages will have the same ccap?
I am using Level 2 to drip content as it is currently available for members on level 1 where the content was naturally dripped as i was adding it weekly. So the questions are: is that setting things up properly? (it is hard to test) and what do i do with the ccaps as i want only the pages currently protected with a specific ccaps to be dripped? |
|
Posted: Monday Oct 1st, 2012 at 6:24 pm #27141 | |
![]() |
|
You can include a ccaps check by changing the following:
to:
That will check if the user paid you at any point in the past AND (&&) if they have access to the free_gift ccap. You could move that ccap check in the nested conditional that checks the Level 2 time if you want. |
|
Posted: Monday Oct 1st, 2012 at 7:13 pm #27154 | |
|
|
Oh thanks for pointing that detail. I knew it had to be added somewhere. |
|
Posted: Tuesday Oct 2nd, 2012 at 6:19 am #27188 | |
|
|
Can you put an example using just the ccap for dripping content? |
|
Posted: Tuesday Oct 2nd, 2012 at 3:45 pm #27247 | |
|
|
Raam’s second code line in his last post is that: [hilite pre_code]0 && current_user_can("access_s2member_ccap_free_gift")){ ?> [/hilite] You just change the [hilite mono]0[/hilite] to something higher if you want to delay the access. If you just use the ccap part of the condition, without the time, then it’s not dripping. |
|
Posted: Saturday Oct 6th, 2012 at 1:40 pm #27668 | |
|
|
OK i am in the process of updating my page to allow for dripping. I am currently using a test page, and using this code i have the preview visible with the link IF the member meets the time requirement, and the preview without the link IF the member does not meet the requirement. Or at least, that is the plan. The “problem” right now, is how to i test it? I have a few “test members” but they dont PAY, so if it is based on the start of the PAYING process, my test members will never be as a regular member should be. Can it be coded in minutes or hours, even if just for the testing? Can i just replace the “days” mention to “minutes” or “hours”? But again, how do i test it with a test member that is not paying if the pay process is the trigger for that? |
|
Posted: Monday Oct 8th, 2012 at 3:10 am #27770 | |
![]() |
|
Yes, you can just change things to minutes/hours to make things faster to test. If you want to really test real-world paying users, to see what actual paying members would see, then I suggest signing up on your own site with PayPal for a small amount (e.g., $0.01) and then using that account to test things. That’s what I do on my personal site. |
|
Posted: Monday Oct 8th, 2012 at 8:36 am #27787 | |
|
|
Thanks. It will help with the testing. Do i HAVE to have a paid membership to test those? Also, if the PAID part is the trigger, how can i have a member who would be given a free membership (either manually or by other mean) and still have the content dripped? Or if anything is not automatically set, how can i manually set it (if it is even possible)? While at it, i currently have this code (not active yet):
And this will drip content to Level 2 members with the “element” ccaps. Will this ONLY drip content to the Level 2 and leave anyone with Level 1 alone, or do i have to also add that everyone with Level 1 and “element” (no matter the time they registered or paid) can access all that content (since i am adding stuff every week, it is dripping anyways)? How should the code look like?
|
|
Posted: Tuesday Oct 9th, 2012 at 3:19 am #27850 | |
![]() |
|
To check for Level 2, you should use current_user_can(“access_s2member_level2”). Please see Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals. If you want to drip content to non-paying members, you’ll need to use the S2MEMBER_CURRENT_USER_REGISTRATION_TIME constant instead of the paid registration time constant, since non-paying members won’t have a paid registration time. Please see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants. |
|
Posted: Tuesday Oct 9th, 2012 at 6:28 am #27874 | |
|
|
OK, i’ll try that. Thanks. |
|
Posted: Wednesday Oct 10th, 2012 at 9:58 pm #28061 | |
|
|
Getting there (i think). My developper is currently not available so i ‘ll try to figure this one out myself. How is this for a code:
I have to get away from the PAID time in case i need to GIVE one membership for free. But since that is the ONLY membership i have at Level 2, i think it would work. What do you think? However in this example, i dont see the unit for the 7; it is days? weeks? hours? I used the examples in the s2Member PHP/API Constants. Can you correct it? |
|
Posted: Wednesday Oct 10th, 2012 at 10:26 pm #28067 | |
![]() |
|
Hello again Cassel, You’ve got a parse error in your above code. Try this:
You can use strtotime() to find how many days it is away. s2member_paid_registration_time() returns a timestamp.
|
|
Posted: Wednesday Oct 10th, 2012 at 10:39 pm #28071 | |
|
|
Cani use the registration time and not the PAID registration time? If i want to give a free membership to someone, the PAID part would not trigger the dripping. 90% of the time it will be paid memberships, but occasionally, it might not be. I had copied the wrong code and had paid_registration…. can i use just registration instead?
|
|
Posted: Wednesday Oct 10th, 2012 at 10:45 pm #28074 | |
![]() |
|
You could check first to see if the user is a ‘subscriber’ before starting your Assuming you just want to drip content no matter the level, you can use |
|
Posted: Wednesday Oct 10th, 2012 at 10:58 pm #28075 | |
|
|
Maybe it was not obvious in the code i made but here is the “English translation” for it: Is that what the code was saying? |
|
Posted: Thursday Oct 11th, 2012 at 12:43 am #28077 | |
![]() |
|
Hi cassel,
Yes that’s correct. |
|
Posted: Thursday Oct 11th, 2012 at 6:14 am #28092 | |
|
|
Do you mean that my code was correct? |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.