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™

Better Patch Instructions?

s2Member Plugin. A Membership plugin for WordPress®.

Better Patch Instructions?

Postby akhanukov » November 15th, 2011, 4:25 pm

I justinstalled v11105 and after I tried to run the Multisite Wordpress Patch Automatically, I received an error that said the files could not be written to, so I want to manually patch the files. However, the instructions just say:

Patch #1 ( /wp-login.php )

case 'register' :
if ( is_multisite() ) {
// Multisite uses wp-signup.php
// Modified for full plugin compatiblity.
//wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) );
//exit;
}

Patch #2 ( /wp-includes/load.php )

// Modified for full plugin compatiblity.
//if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) )
if ( empty( $active_plugins ) || ( defined( 'WP_INSTALLING' ) && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
return $plugins;

Patch #3 ( /wp-admin/user-new.php )

// Modified for full plugin compatiblity.
//wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ) );

Patch #4 ( /wp-includes/ms-functions.php )

// Modified for full plugin compatiblity.
//return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
return apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup), get_defined_vars());

Don't forget to patch these files again, each time you upgrade the WordPress® core.


So I would like to know:

1. Do I throw each bit of code at the end of each file? OR
2. So I find the area of the file where the case or code exists and insert the new code there?
3. How and where does the auto patcher put this? Thanks!
User avatar
akhanukov
Registered User
Registered User
 
Posts: 2
Joined: November 15, 2011

Re: Better Patch Instructions?

Postby akhanukov » November 15th, 2011, 10:33 pm

OK. I'm pretty embarrassed now. I basically went into each file and replaced the very similar lines. Duh. I guess having that one extra line of instructions would clarify this problem for dummies like me. :)
User avatar
akhanukov
Registered User
Registered User
 
Posts: 2
Joined: November 15, 2011

Re: Better Patch Instructions?

Postby Eduan » November 16th, 2011, 8:15 am

Good work on figuring it out!
Just for future reference, where did you place it?
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron