Page 1 of 1

content dripping and custom packages.

PostPosted: August 20th, 2011, 1:02 pm
by twaycaster
I need some help on a basic level. I finally got the advanced conditionals and packages figured out, but with content dripping, I just look at the code and do not understand where I put in which pages to drip with the time is right. I need to SEE a example first that shows something like

add action template redirect my custom capabilities
function my custom capabilites

if tags music !current user can ccap music
else if s2member current user paid registration days = 7
drop pages 7, 8, 9

else if s2 member current paid registration days = 14
drip pages 10 11 12

else if s2 member current paid regsitration days 21
drip pages 13 14 15

else if s2 member curretn paid reg 28 days
drip pages 16


header location s2members options page url
exit

I hope this makes sense and someone can help me with getting this base figured out .

Re: content dripping and custom packages.

PostPosted: August 20th, 2011, 10:03 pm
by Cristián Lávaque
Could you post the code with brackets, please? :)

Re: content dripping and custom packages.

PostPosted: August 21st, 2011, 3:06 pm
by twaycaster
Code: Select all
/**
 * My Custom Routines.
 */

add_action ("template_redirect""my_custom_capabilites");

function 
my_custom_capabilities ()
     {

    if(
has_tag("client group a") && !current_user_can ("access_s2member_ccap_client group a"))
        {
            
header ("Location: "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
                         (
access_s2member_ccap_client group a_registration_days >= 7)
                         
drip pages 1,2,3
                         
(access_s2member_ccap_client group a_registration_days >= 14)
                         
drip pages 4,5,6
                         
(access_s2member_ccap_client group a_registration_days >= 21)
            
drip pages 7,8,9
                         
(access_s2member_ccap_client group a_registration_days >= 28)
                         
drip pages 10 
                         
exit ();
        }

    
     } 


is this correct?

Re: content dripping and custom packages.

PostPosted: August 22nd, 2011, 10:24 pm
by Cristián Lávaque
Thanks for posting the code. I'm not sure yet where you're using it and what you're trying to achieve. Is it for the navigation?

By the way, I suggest you don't use spaces in the custom capability's name, use underscores instead: access_s2member_ccap_client_group_a.