PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Content Dripping using wrong algorithm

s2Member Plugin. A Membership plugin for WordPress®.

Content Dripping using wrong algorithm

Postby martin » May 25th, 2010, 1:53 pm

Hello,

I just installed this plugin and it looks incredible. Anyway there seems to be a hiccup with the Content Dripping function.

The plugin uses wrong algorithm when deciding what to show to whom. From the s2Member API / Scripting page: Content Dripping is based on their original registration date.

The problem? Imagine this: I registered my name exactly one year ago and cancelled my subscription after the first (daily/weekly/monthly) payment. Now I decide to re-join. What do I get to see?

Everything released during the last 12 months. Is it correct? :idea:

So I would recommend that the plugin doesn't care about the registration date of the member's name. It should be based on something like days that this member has been a paying customer.

Also the function S2MEMBER_CURRENT_USER_REGISTRATION_DAYS should not relate to the original registration date. It would be better having a function like S2MEMBER_CURRENT_USER_DAYS_HAS_PAID / has been paying or whatever...

What do you think?
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010

Re: Content Dripping using wrong algorithm

Postby martin » May 27th, 2010, 3:08 pm

Don't you think this is a critical problem??
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010

Re: Content Dripping using wrong algorithm

Postby Elizabeth » May 27th, 2010, 3:28 pm

Hello Martin,

Thank you for your feedback.
You raise a very important point, that we have yet to address.

We are currently working on s2Member Pro.
However, we have added your valid point to the list for the next update.

We have duly noted your issue.
User avatar
Elizabeth
Moderator
Moderator
 
Posts: 160
Joined: May 12, 2010

Re: Content Dripping using wrong algorithm

Postby martin » May 28th, 2010, 2:33 am

Hello Elizabeth,

thank you for your reply.

I have also realized another issue with the algorithm: The plugin should not only care about how long the member has been a paying customer, but also how long he has been paying for his level of subscription.

E.g. I have been a paying customer for one year and then I upgrade to a higher membership level. Again - what content do I get to see? Correct me if I am wrong, but I would be able to see everything released on the higher level during the last 12 months, as I have been a paying customer.
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010

Re: Content Dripping using wrong algorithm

Postby miker75 » May 29th, 2010, 12:21 am

Hi,

I'm very interested in the content dripping feature, just wondering where I could get a crash course on how to select the content to drip. Is merely based on page ID? Can you drip videos or downloads as well? Colour me curious!
miker75
Guest User
Guest User
 

Re: Content Dripping using wrong algorithm

Postby martin » May 29th, 2010, 3:05 pm

Hi miker75,

the content dripping feature works with some PHP scripting. In order to use PHP scripting inside your Posts/Pages, you'll need to install a plugin like Exec-PHP.

The function you use on your page is S2MEMBER_CURRENT_USER_REGISTRATION_DAYS. You use it on a page or post like this:

Code: Select all
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>

    This is some content that will be displayed to all Registered Members.
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30){ ?>
        Drip content to Members who are more than 30 days old.
    <?php } ?>
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60){ ?>
        Drip content to Members who are more than 60 days old.
    <?php } ?>
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90){ ?>
        Drip content to Members who are more than 90 days old.
    <?php } ?>

<?php } ?>


Beware that the current Content Dripping feature doesn't care how long the customer has been a paying one ;) So even if you don't have a free membership, the date is derived from the registration date, not taking in question how long they have been a paying customer. So I can register and cancel after the first payment and then after a while initiate a payment and get everything released between my registration date and now ;)

And yes, you can add anything you want instead of the phrase Drip content to Members who are more than XX days old.. Like links to videos, another pages etc.

Regarding downloads there is a protected folder. You just upload restricted files to a security-enabled directory:
/wp-content/plugins/s2member-files

- Then, you can link to these restricted files using this special format:
http://www.example.com/?s2member_file_download=example-file.zip

I hope this crash course helps ;)
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010

Re: Content Dripping using wrong algorithm

Postby osteodoc » June 4th, 2010, 5:29 pm

I am completely lost on the content drip. Completely baffled, I am. :?

I am setting up a 13-week course with 3 payments; first payment is when customer registers (day zero), 2nd payment 1 month later (day 30), final payment 1 month later (day 60).

Total course is 90 days.

I want to deliver the course in modules over this time, following this pattern:

WEEK 1
Module 101a immediately after registration. (day 1)
Module 101b two days later. (day 3)
Module 101c three days later. (day 6)(end of first week's classes)

WEEK 2
Module 102a two days later, (day 8)
Module 102b two days later, (day 10)
Module 102c three days later, (day 13) (end of second week's classes)

WEEK 3, rinse and repeat, 7-day cycle.

It would be ideal for me to distribute the classes in this way. Is this possible, and how do I go about protecting them until they should be 'released'?

If it isn't possible, how can I release them a week-at-a-time? I could easily reformat my information to do that if I need to.

Also, where does the code go? What is the start and end point? I assume it goes somewhere inside each post depending on drip date... is that right? And if it is, what should it look like in the post?

(part of example Martin used...)
?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>
This is some content that will be displayed to all Registered Members.
< ?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30){ ?>
Drip content to Members who are more than 30 days old.
<?php } ? >
I assume I change to '30' and the '30 days' part to '2' and '2 days', etc. Is that correct?

I was excited to see Martin's Crash Course, but unhappily, I am missing some little tidbit here, and could really use just a little more detail or clarification.

Thank you in advance!
Warm regards,
Marty
User avatar
osteodoc
Registered User
Registered User
 
Posts: 5
Joined: May 28, 2010

Re: Content Dripping using wrong algorithm

Postby martin » June 6th, 2010, 4:42 am

Hello Marty,

you set up a member's page or post and inside it you put something like this:
Code: Select all
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>

Hello all Members. This course is 13 weeks long. Please come back to this page regularly as the new content will be displayed here.
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 0){ ?>
Module 101a and its content
    <?php } ?>
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 2){ ?>
Module 101b
    <?php } ?>
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 5){ ?>
Module 101c
    <?php } ?>

<?php } ?>


etc. I hope you get it.

Actually you can skip the line with 0 days or older, because it will be automatically displayed to all registered users.

You can also create a single page for every module if it is something lengthier. Then on the main page there would be only a link to this page and the content of the page would be coded between the php code. Let's look at the 101c module page:
Code: Select all
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>
   
    <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 5){ ?>
Module 101c and all its content on a single page.
    <?php } ?>
   
<?php } ?>


I hope it helps.

Dissection of the code

<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?> - this line is the beginning of conditioning

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 5){ ?> - this line states the condition of 5 days (or longer) membership

Module 101c and all its content on a single page. - this is where you put the content and everything. It won't be displayed until the condition of 5 days is met.

<?php } ?> - states the end of the condition of 5 days

<?php } ?> - states the end of conditioning

Good luck with your member's page!
Martin

PS: You can PM or e-mail me if you need some more help.
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010

Re: Content Dripping using wrong algorithm

Postby osteodoc » June 12th, 2010, 7:35 am

Martin, :D

You absolutely ROCK! Thank you - I think I get it now. Your example is
simple (and therefore elegant) and exactly what I needed to know.

I apologize that I didn't acknowledge you about this sooner, I got completely
side-tracked a week ago... I was so grateful to see your reply waiting for
me this morning!

Thank you again, Martin, this will be today's project for me! I can do this!

Marty
:D
User avatar
osteodoc
Registered User
Registered User
 
Posts: 5
Joined: May 28, 2010

Re: Content Dripping using wrong algorithm

Postby osteodoc » June 13th, 2010, 9:10 am

Martin! It works!

I ran into one last problem that was easy to fix - I was getting
an error message from a plugin - Exec-PHP. The WordPress 'WSYWYG editor'
needed to be turned 'off'; because the 'WSYWYG editor' breaks the php code.

Again, the fix is easy - I went to the 'Users - Your Profile' menu and ticked the
'Visual Editor' check-box and then 'saved settings'. I refreshed the post and page,
and everything was fine, fine, fine!

I pasted your sample code on a post, and then on a page, and it all works
the way it should. I am delighted! I spent the last couple of hours just playing
with it all, different variations, added some sample posts, etc. All Is Good!

Really, I appreciate you helping with this problem that was so big to me.

Moving forward again... I am hopeful of going 'live' in maybe 10 days or so.
Thanks again!
Marty
User avatar
osteodoc
Registered User
Registered User
 
Posts: 5
Joined: May 28, 2010

Re: Content Dripping using wrong algorithm

Postby martin » June 13th, 2010, 12:49 pm

I'm glad I could help you out, Marty. And thank you for your feedback regarding the error in Exec-PHP! I have no time to test the plugin throughly and I'm going live on Tuesday :) Wish me luck :D
User avatar
martin
Registered User
Registered User
 
Posts: 16
Joined: May 25, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron