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™

What I desperatly need.

s2Member Plugin. A Membership plugin for WordPress®.

Re: What I desperatly need.

Postby twaycaster » September 3rd, 2011, 11:27 am

I just cannot figure out what I am doing wrong, I upload these files with the correct links and pages and it still puts my website down and out. I simply get "This page cannot be displayed"

The minute I remove s2-hacks.php or remove the code from functions.php my website is back up to full speed. I know it is something I am doing wrong, but for the life of me I cannot figure it out.

The only thing I can think of is that I am using word for editing my php, could this be the problem?
User avatar
twaycaster
Registered User
Registered User
 
Posts: 24
Joined: August 17, 2011

Re: What I desperatly need.

Postby Cristián Lávaque » September 3rd, 2011, 11:50 am

That would cause a problem. You have to use a text editor, not text processor. A good free one is PSPad. http://www.pspad.com/en/download.php
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: What I desperatly need.

Postby twaycaster » September 3rd, 2011, 1:01 pm

well sadly even when using the notepad that you suggested it still puts my website out of commission. I feel stuck. I just dont know what is causing it.
User avatar
twaycaster
Registered User
Registered User
 
Posts: 24
Joined: August 17, 2011

Re: What I desperatly need.

Postby twaycaster » September 3rd, 2011, 9:19 pm

The website cannot display the page
HTTP 500
Most likely causes:
•The website is under maintenance.
•The website has a programming error.

What you can try:
Refresh the page.

Go back to the previous page.

More information
User avatar
twaycaster
Registered User
Registered User
 
Posts: 24
Joined: August 17, 2011

Re: What I desperatly need.

Postby twaycaster » September 4th, 2011, 12:56 pm

I FIGURED IT OUT!!!!

The last statement the else wpredirect was causing a internal forever loop and not letting anything move forward. I removed the else wpredirect and am now cruising along very nicely
User avatar
twaycaster
Registered User
Registered User
 
Posts: 24
Joined: August 17, 2011

Re: What I desperatly need.

Postby Cristián Lávaque » September 5th, 2011, 12:37 am

You mean the one that points to http://holistic-living-today.com/detox- ... gar-detox/? That page doesn't seem to even exist, I get a 404.

I'm glad you got it working, though. Well done. :)

You could just protect the pages that require the ccap, using the s2Member meta box in the edit page. Then the hack would not need to check for it and it can just be:

Code: Select all
<?php
add_action 
('template_redirect', 'my_s2_custom_capabilities');
function my_s2_custom_capabilities()
{
    $drips = array(
        7  => array(3, 4, 5),
        14 => array(6, 7, 8),
        21 => array(9, 10, 11),
        28 => array(12),
    );
    foreach ($drips as $drip_day => $drip_pages)
    {
        if (S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS < $drip_day && is_page($drip_pages))
        {
            wp_redirect('http://example.com/not-yet-available-to-you/');
            exit;
        }
    }
}
?>


Let me know if that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Previous

Return to s2Member Plugin

Who is online

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

cron