Community Support Forums — WordPress® ( Users Helping Users ) — 2011-04-07T19:55:57-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2420 2011-04-07T19:55:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=9316#p9316 <![CDATA[Re: How to specify a different registration page]]> /wp-content/mu-plugins/s2-hacks.php
Code:
<?php
if 
(strpos ($_SERVER["REQUEST_URI"], "wp-login.php") !== false && $_GET["action"] === "register")
    {
        header ("Location: http://www.example.com/my-registration-page/"); exit ();
    }
?>
* Please make sure there are no spaces/tabs/line breaks before or after <?php ?>.
Also, please make sure you upload all PHP files in ASCII mode with your FTP client. I recommend FileZilla.


Also, for the registration fields what are the name="" info for each of the required info as well as custom fields?

Code:
ws_plugin__s2member_custom_reg_field_first_name
ws_plugin__s2member_custom_reg_field_last_name
ws_plugin__s2member_custom_reg_field_{your custom registration field id}
( ex: ws_plugin__s2member_custom_reg_field_country_code )

Statistics: Posted by Jason Caldwell — April 7th, 2011, 7:55 pm


]]>
2011-04-06T10:06:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=9211#p9211 <![CDATA[Re: How to specify a different registration page]]>
Also, for the registration fields what are the name="" info for each of the required info as well as custom fields?

Statistics: Posted by hardline — April 6th, 2011, 10:06 am


]]>
2011-03-31T06:24:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=8687#p8687 <![CDATA[Re: How to specify a different registration page]]> ( i.e. line breaks, tabs, null bytes, or just simple spaces ), you will see header errors like you've reported here.

Here are some related articles:
http://www.opencart.com/index.php?route ... &path=7_65
http://www.hongkiat.com/blog/wordpress- ... formation/
http://www.tech-recipes.com/rx/1489/sol ... eady-sent/

Statistics: Posted by Jason Caldwell — March 31st, 2011, 6:24 am


]]>
2011-03-29T23:13:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=8597#p8597 <![CDATA[Re: How to specify a different registration page]]> <?php or after the ?>.

Statistics: Posted by Cristián Lávaque — March 29th, 2011, 11:13 pm


]]>
2011-03-29T22:38:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=8596#p8596 <![CDATA[Re: How to specify a different registration page]]>
On my first stab at this, it yielded the following complaint:

Warning: Cannot modify header information - headers already sent by (output started at /hermes/.../mac/wp-content/mu-plugins/s2-hacks.php:1) in /hermes/.../mac/wp-content/mu-plugins/s2-hacks.php on line 3


With some poking around, I modified your initial suggestion by incorporating a suggestion from nickohrm found at http://stackoverflow.com/questions/1976781/redirecting-wordpresss-login-register-page-to-a-custom-login-registration-page. As a result, I added the following into a plug-in:
Code:
add_action('init','tmm_redirect');
function tmm_redirect() {
              global $pagenow;
              if( 'wp-login.php' == $pagenow && $_GET["action"] === "register") {
                         wp_redirect('http://www.example.com/my-registration-page/');
                         exit();
               }
}

Statistics: Posted by dwdutch — March 29th, 2011, 10:38 pm


]]>
2011-03-06T08:45:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=7442#p7442 <![CDATA[Re: How to specify a different registration page]]>
dwdutch wrote:
I have a custom registration page and prefer to use it rather than the S2member's page. What's necessary to specify use of an alternative registration page?

With s2Member Pro, configured to work with PayPal Pro and/or Authorize.Net, you can use the built-in Registration and/or Checkout Forms provided by s2Member. This will allow you to build them into your theme by adding Shortcodes to a Post/Page in WordPress.

That being said, if you want to redirect requests for this page:
/wp-login.php?action=register

You can do something like this.
  • Create this directory:
    /wp-content/mu-plugins/
  • Create this file:
    /wp-content/mu-plugins/s2-hacks.php
    ( file name is not important, you can name it whatever you like )
  • Inside the file, add this PHP code:
    Code:
    <?php
    if(strpos($_SERVER["REQUEST_URI"], "wp-login.php") !== false && $_GET["action"] === "register"){
        header("Location: http://www.example.com/my-registration-page/"); exit();
    }
    ?>
TIP: When creating custom registration forms, if those custom registration forms are also being processed by your own custom routines, be sure that your custom registration routines always make a call to this function: wp_create_user(), or wpmu_create_user() on a Multisite Network. This way the right Hooks/Filters are processed internally by s2Member. If that is not possible, then make sure your custom routine is at least firing this Hook after it creates an account: do_action("user_register", $user_id);

Statistics: Posted by Jason Caldwell — March 6th, 2011, 8:45 am


]]>
2011-02-21T00:22:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2420&p=6964#p6964 <![CDATA[How to specify a different registration page]]>
What's necessary to specify use of an alternative registration page?

Statistics: Posted by dwdutch — February 21st, 2011, 12:22 am


]]>