Support Forum

Register redirection not working.

VT vikash tiwary
vikash tiwary
Member

I made a custom page for registration using  wislhlist  .

and add this page url into forum >> login & registration  >> Registration redirect: “http:…..”

but forum register button still redirect to the wordpress registration page.

please help.

9 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

As it says, this option setting is for handling redirection AFTER the registration process.

To enable the use of a custom registration form, you will need to add the argument to the SP theme call that handles the registration button.

The template function is in the spHead.php template of your SP theme. By default it will be:

sp_RegisterButton('tagClass=spButton spRight', __sp('Register'), __sp('Register'));

You need to add an argument to the argument list – in this case the argument ‘link’. So that it becomes:

sp_RegisterButton('tagClass=spButton spRight&link=http://your-registration-page-url', __sp('Register'), __sp('Register'));

Note the ampersand before the link argument.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

VT vikash tiwary
vikash tiwary
Member

thanks, this process is working well.

but i think this is a type of hardcoding. if we need to change the registration url again & again.

we have to change in spHead file every time.

is there any way to change from the admin section.

means like  registration redirect.

MP Mr Papa
Mr Papa
Member

no, the having it a template tag offers more flexibility…   and why would the registration url change that often??

ST Salina Tam
Salina Tam
Member

Yellow Swordfish said
As it says, this option setting is for handling redirection AFTER the registration process.

To enable the use of a custom registration form, you will need to add the argument to the SP theme call that handles the registration button.

The template function is in the spHead.php template of your SP theme. By default it will be:

sp_RegisterButton('tagClass=spButton spRight', __sp('Register'), __sp('Register'));

You need to add an argument to the argument list – in this case the argument ‘link’. So that it becomes:

sp_RegisterButton('tagClass=spButton spRight&link=http://your-registration-page-url', __sp('Register'), __sp('Register'));

Note the ampersand before the link argument.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

Hi,

I’m new to Simple-Press and the above has helped me solve my registration button problem. But when I click on the Log In button in the forum, there are the registration link and the lost password links, and both of them still direct to the original WP pages. Can you please advice how I can direct both to a specific log in and lost password pages?

For instance, when users click the registration link, I would like them to be directed to this page: http://www.moderndragons.com/register/ instead of http://www.moderndragons.com/wp-login.php?action=register

And for the lost password link, I would like them to be directed to this page: http://www.moderndragons.com/recover-password/ instead of http://www.moderndragons.com/wp-login.php?action=lostpassword

Thank you very much in advance!

Salina

YS Yellow Swordfish
Yellow Swordfish
Member

That’s a jolly good question.

In the very same spHead template – right at the top – you will see a section named ‘In-line Login Form – Object Definition’.

You will need to add two extra items to this list. Please note carefully that each item must end in a comma with the exception of the last line in the list. You can add your two new lines wherever you like within the list.

The first much be called: ‘registerLink’ and the second called ‘passwordLink’. Note the capitalisation.

Then after the => sign just enter the full, appropriate  url.

And that should do the trick.

ST Salina Tam
Salina Tam
Member

Hi,

Thank you for the advice. I found the section that you mentioned and made the modification below accordingly (see the orange texts):

# == IN-LINE LOGIN FORM – OBJECT DEFINITION ====================
$loginForm = array(
‘tagClass’ => ‘spForm’,
‘controlFieldset’ => ‘spControl’,
‘controlInput’ => ‘spControl’,
‘controlSubmit’ => ‘spSubmit’,
‘controlIcon’ => ‘spIcon’,
‘controlLink’ => ‘spLink’,
‘iconName’ => ‘sp_LogInOut.png’,
‘labelUserName’ => __sp(‘Login name’),
‘labelPassword’ => __sp(‘Password’),
‘labelRemember’ => __sp(‘Remember me’),
‘labelRegister’ => __sp(‘Register’),
‘labelLostPass’ => __sp(‘Lost password?’),
‘registerLink’ => http://www.moderndragons.com/register/,
‘passwordLink’ => http://www.moderndragons.com/recover-password/,
‘labelSubmit’ => __sp(‘Log In’),
‘showRegister’ => 1,
‘showLostPass’ => 1

However after I made the edits and refresh the page, the forum can’t be displayed. Please see http://www.moderndragons.com/forums/

Did I do something wrong?

Thanks again,

Salina

YS Yellow Swordfish
Yellow Swordfish
Member

Nothing serious, Those urls need to have quote marks around them is all.