Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-06T00:31:20-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2968 2011-04-06T00:31:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9193#p9193 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
Let me know when you finally get this set up the way you wanted it. And also ask if you have any other questions.

Good luck with the exam! :)

Statistics: Posted by Cristián Lávaque — April 6th, 2011, 12:31 am


]]>
2011-04-05T23:41:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9191#p9191 <![CDATA[Re: Is This Why New Member Reports No Access?]]> ) - I tried the first block of php code, and probably if I played with it enough I could figure out how to make it work. But after some trying I failed, and because I'm behind on studying for the Google Adwords Exam Certification, time constraints mean I have to stop playing with code and start studying.

But, what I did do, is - I decided to make the first bootcamp link "live" and a "tease" as you put it, the tease of course being to non-members who click but only land on the sales letter page.

I also used the pretty link plugin to disguise that links' actual URI (I'll probably do that for the others, but not sure if that's really necessary since those won't be "public".

I did a site: search and found that indeed, I had used the Core Tweaks plugin to create a sitemap which, sure enough, was indexed - and even though it's not publicly accessible, a sharp member could find it, gain access to all the pages that are supposed to be dripped out to them later - so I trashed that page and told Google Webmaster Tools to remove that URL from their index.

I feel bad for not utilizing your so-nicely provided code! - yet! - and as much as I really want to tinker with that code and make it work (or maybe I'll ask one of the php developers at work to explain it to me ;) ) that Adwords Exam awaits, and I've got to get studying!

Thanks again SO much for all your help! :D

David

Statistics: Posted by justawizard — April 5th, 2011, 11:41 pm


]]>
2011-04-05T17:29:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9172#p9172 <![CDATA[Re: Is This Why New Member Reports No Access?]]>

Yes, that was my concern, that someone may guess your URLs and just get to the content. By the way, it's not just guessing, finding out may be a better way of saying it. Someone could Google your website to find it, or check out your sitemap. Make sure you're not giving them away there. Also there's the chance of one member sharing the URL with another.

Anyway, it'd be an extra layer of protection to add the conditional wrapping the content to be dripped.

Code:
<?php
$stage 
= 2
$stage_day 
= ($stage - 1) x 10;
if (S2MEMBER_CURRENT_USER_REGISTRATION_DAYS > 10) { ?>

    Here goes the content for this stage.

<?php } else {
    echo 'This stage will be available to you';
    $days_left = ($stage_day + 1) - S2MEMBER_CURRENT_USER_REGISTRATION_DAYS;
    if ($days_left == 1)
        echo 'tomorrow.';
    else
        echo 
'in', $days_left, 'days.';
}
?>


Or something like that.

You can use that same code for all the other stages, just change $stage to the another number and the rest of the variable should update from it.

By the way, this is all untested code, but you already knew that, I guess. I'll be happy to help you until it works. :)

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 5:29 pm


]]>
2011-04-05T16:57:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9169#p9169 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
This sentence I'm not 100% sure I understand:
"By the way, you'll have to protect the content in the dripping sequence because if you just rely on level to prevent access to the page, someone that guess the URL will see it, so wrap the body of your post with the same condition checking the days."
If you mean my URIs (page names) could be guessed and accessed by any member because I'm only using Level 1 in s2member, I did name my URIs in a unique way, they're not /bootcamp1, /bootcamp2, etc. - was that the concern you were raising?

Thanks again, and I'll try out that code you so nicely provided :) on my site later today!
David

Statistics: Posted by justawizard — April 5th, 2011, 4:57 pm


]]>
2011-04-05T16:36:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9164#p9164 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
If you check if days > 0, it'll always be true, I assume, not sure how the first day is considered, if 1 or 0. But you want to give access immediately to those that page, so why even check?

You can do the rest using the code I gave you if you want to avoid repetitive code and being able to update it with less lines in the future.

Thinking about it, you could also have the other stages shown in the list, although not linked.

Code:
<p><a href="http://www.mywebsite.com/member-home-page/">Member Home Page</a></p>
<p><strong>Seminar Success Boot Camp</strong></p>
<ul class="stages">
<li class="available"><a href="http://www.mywebsite.com/bootcamp1/" alt="Boot Camp Level 1">Boot Camp Level 1</a></li>
<?php
$stages 
= array (
    'Boot Camp Level 2' => 'http://www.mywebsite.com/bootcamp2/',
    'Boot Camp Level 3' => 'http://www.mywebsite.com/bootcamp3/',
    'Boot Camp Level 4' => 'http://www.mywebsite.com/bootcamp4/',
    'Boot Camp Level 5' => 'http://www.mywebsite.com/bootcamp5/',
    'Boot Camp Level 6' => 'http://www.mywebsite.com/bootcamp6/',
    'Boot Camp Level 7' => 'http://www.mywebsite.com/bootcamp7/',
    'Boot Camp Level 8' => 'http://www.mywebsite.com/bootcamp8/',
);
$stage_day = 10;
foreach ($stages as $stage_name => $stage_url) {
    if (S2MEMBER_CURRENT_USER_REGISTRATION_DAYS > $stage_day) {
        echo '<li class="available"><a href="', $stage_url, '" alt="', $stage_name, '" />', $stage_name, '</li>';
    else
        echo 
'<li class="pending">', $stage_name, '</li>';
    $stage_day += 10;
}
?>
</ul>


The $stages array lets you use any names and URLs for them, if the only thing that changed in them were the number, the could would be even shorter because it just needs a counter. By the way, I added classes to the stages list and the items in it so you could style them.

Just change the names and the URLs in that code and try it. Let me know if works for you. :)

By the way, you'll have to protect the content in the dripping sequence because if you just rely on level to prevent access to the page, someone that guess the URL will see it, so wrap the body of your post with the same condition checking the days.

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 4:36 pm


]]>
2011-04-05T15:58:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9160#p9160 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
Unfortunately, I don't know how to code php, but know a little about code, so I used the code provided in s2member about "drip content" and created this in the sidebar for the links to drip out (i didn't copy/paste all 8 boot camps, only first 3 here should reveal my scheme, and also the URLs are not actual):


Code:
<p><a href="http://www.MyWebsite.com/member-home-page/">Member Home Page</a></p>
<p><strong>Seminar Success Boot Camp</strong></p>
<p><?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 1){ ?>
        <a href="http://www.MyWebsite.com/bootcamp1/">Boot Camp Level 1</a>
    <?php ?>
</p>
<p><?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 11){ ?>
        <a href="http://www.MyWebsite.com/ bootcamp2/">Boot Camp Level 2</a>
    <?php ?>
</p>
<p><?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 21){ ?>
        <a href="http://www.MyWebsite.com/ bootcamp3/">Boot Camp Level 3</a>
    <?php ?>
</p>


So, I think the problem is with the first php snippet, correct? If I change that to zero, would it solve my problem? - actually, I take that back - what I should do is just post the link to boot camp 1 "live", and so even though the general public can see it, when they click they can't access it; members will see the boot camp 1 page. And just leave 2-8 intact?

Thanks!
David

Statistics: Posted by justawizard — April 5th, 2011, 3:58 pm


]]>
2011-04-05T15:34:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9158#p9158 <![CDATA[Re: Is This Why New Member Reports No Access?]]>

As you see, everthing there is enclosed by the condition that the person can access Level 1 content. If the person doesn't have that access, he'll not be shown that at all. He'd be sent to the Membership Options Page if he actually clicked on the link to one of the protected pages, but he wouldn't have the link shown to him without the proper access anyway.

By the way, I assumed you used Level 1, but this could be done checking for a custom capability or another level.

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 3:34 pm


]]>
2011-04-05T15:05:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9155#p9155 <![CDATA[Re: Is This Why New Member Reports No Access?]]> - question - if I don't have something there for stage 1 (and there is a link to see that page), then any website visitor can see the link? - oh wait, but unless they're a member they won't go to the actual stage 1 page, they'll just see the "become a member" page? Yikes! Clearly I'm not clear ;)
Thanks!
David

Statistics: Posted by justawizard — April 5th, 2011, 3:05 pm


]]>
2011-04-05T14:31:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9151#p9151 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
Maybe something like this:

Code:
if (current_user_can('access_s2member_level1')) {
    echo '<ul><li><a href="http://yoursite.com/stage1" alt="Stage 1">Stage 1</a></li>';
    $stages = array (
        'Stage 2' => 'http://yoursite.com/stage2',
        'Stage 3' => 'http://yoursite.com/stage3',
        'Stage 4' => 'http://yoursite.com/stage4',
        'Stage 5' => 'http://yoursite.com/stage5',
        'Stage 6' => 'http://yoursite.com/stage6',
        'Stage 7' => 'http://yoursite.com/stage7',
        'Stage 8' => 'http://yoursite.com/stage8',
    );
    $stage_day = 10;
    foreach ($stages as $stage_name => $stage_url) {
        if (S2MEMBER_CURRENT_USER_REGISTRATION_DAYS < $stage_day)
            break;
        echo '<li><a href="', $stage_url, '" alt="', $stage_name, '" />', $stage_name, '</li>';
        $stage_day += 10;
    }
    echo '</ul>';
}
 


I hope that helps. :)

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 2:31 pm


]]>
2011-04-05T10:38:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9134#p9134 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
Should I set that to zero instead of 1? How can I make sure that boot camp stage one link shows up right away using that code?

Thanks! : D
David

Statistics: Posted by justawizard — April 5th, 2011, 10:38 am


]]>
2011-04-05T01:22:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9088#p9088 <![CDATA[Re: Is This Why New Member Reports No Access?]]>
Does that help? :)

Statistics: Posted by Cristián Lávaque — April 5th, 2011, 1:22 am


]]>
2011-04-05T00:52:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2968&p=9087#p9087 <![CDATA[Is This Why New Member Reports No Access?]]> <?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 1){ ?>
so that certain content is released to new members - but a new member says they can't see the link to the content - is this because I should set the day number to zero for new members? - I'm dripping content out and they should have immediate access after paying....

Thanks!
David

Statistics: Posted by justawizard — April 5th, 2011, 12:52 am


]]>