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.

[Reverse] Content Dripping

Home Forums Community Forum [Reverse] Content Dripping

This topic contains 6 replies, has 3 voices. Last updated by  Russ Crowley 3 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 19th, 2013 at 12:41 am #45120

I posted this on an older post, but no-one has responded in the 7 days it has been on there….

…I’m trying to implement a ‘reverse drip’: where content is available on login, and then becomes unavailable after a specified period of time: great for introductory offers.

For example using your code (from S2MemberAPI ScriptingContent Dripping (I removed the tags otherwise this message system strips it out):

php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30)
Drip content to Members that started paying you at least 30 days ago.
php }

This Drips content to Members that started paying you at least 30 days ago.

I tried reversing this to:

php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS <= 30
Stop displaying this content when the member has been registered for over 30 days
php }

However, it didn't work. The content is still visible.

Can anyone assist?

Thanks,

Russ

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Wednesday Mar 20th, 2013 at 5:36 am #45208

Hi Russ.

Sorry about the other post, I don’t visit the community forum so I had not noticed it.

About your code, what you wrote should work, not sure why it didn’t.

[hilite pre_code]

Show only during first month.

[/hilite]

Was the test account you tried it with, older than 30 days? What do you get if you echo the constant?

[hilite pre_code]

[/hilite]
Posted: Wednesday Mar 20th, 2013 at 6:00 am #45213

Thanks Cristian,

I implemented the code you gave above, and ran the echo constant, it read 27. I then set the number of days <= 1, refreshed the browser 3 or 4 times, and the content still shows.

Regards,
Russ

Posted: Wednesday Mar 20th, 2013 at 7:11 am #45218

I’d like to take a look. Could you submit your site’s info? Please include the name of the page you’re testing this in, and let me know when you sent it. Thanks. s2Member® » Private Contact Form

Posted: Wednesday Mar 20th, 2013 at 7:34 am #45223

I have just sent it Christian, Thanks.

Posted: Thursday Mar 21st, 2013 at 4:08 pm #45386
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

I took a look at your installation, and your Content Dripping appears to be working as expected. I used the code from your original post:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS > 30) { ?>
Show only during first month.
<?php } ?>

The Administrator account you sent us data to was created 1 day ago, so the content did not show, but when I changed your code to this, it showed up just fine:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS < 30) { ?>
Show only during first month.
<?php } ?>

I left the draft that I created in your Posts list. You can see the code that I used there.

I implemented the code you gave above, and ran the echo constant, it read 27. I then set the number of days <= 1, refreshed the browser 3 or 4 times, and the content still shows.

This could perhaps be a caching issue. I notice you have Quick Cache installed. Try clearing the cache, and see if that fixes your issue here.

Let us know if problems persist.

Posted: Thursday Mar 21st, 2013 at 8:35 pm #45423

Hi Bruce,

How bizarre! Nevertheless, I’m pleased it is working correctly, and thanks for taking the time to look at this for me.

Regards,

Russ

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.