Support Forum

Register button / change directory

TJ tjalling
tjalling
Member

Hi, 

I would like the register button of simple press to link to the register page of my theme.  

How can i do this.

Thanks

http://www.cannabismarijuana-seeds.com/forum/

25 Answers

New Answer

TJ tjalling
tjalling
Member

also i would like to change the directory of the lost pasword link. 

Thanks

MP Mr Papa
Mr Papa
Member

http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_registerbutton/

http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_loginform/

the codex is your friend… 

TJ tjalling
tjalling
Member

I see that the file sp-common-view-functions.php is not included in my costum theme

Will the changes in this file be overiden by a update ? 

Thanks

YS Yellow Swordfish
Yellow Swordfish
Member

sp-common-view-functions.php is NOT a theme file so it has no business in the theme folders.

TJ tjalling
tjalling
Member

Oke zo that means that the file will not be overriden by a update ?

MP Mr Papa
Mr Papa
Member

why do you want to edit or change that file???

I pointed you to the codex about those functions… those functions are called from your sp theme… the codex tells you how to alter the function calls in your sp theme to achieve the desired operation…  you do NOT need to modify those files… just call them differently…  you will find the calls in spHead.php template file in your sp theme..

TJ tjalling
tjalling
Member

Zo with call you mean the way the fille is used and not the name of the file i supose ?

In the sphead.php i find this rule : 

sp_RegisterButton(‘tagClass=spButton spRight’, __sp(‘Register’), __sp(‘Register’));

Only i still dont understand how to change. 

It seems like the codex dus not explain how to make use of it. Atleas not if you dont have any coding skils. 

Thanks

 

MP Mr Papa
Mr Papa
Member

answering from email so dont remember all you wanted to change… but think you said the register page… so

change to

sp_RegisterButton(‘tagClass=spButton spRight&link=http://mysite.com/myregister’, __sp(‘Register’), __sp(‘Register’));

of course changing http://mysite.com/myregister to what you want…

these template functions are just like those in a wp theme… coding skills not needed, but you just pass the arguments and options you want…

TJ tjalling
tjalling
Member

Oke i managed to change the register link. 

Also i would like to change the lostpassword link. When i search the sphead.php file the only thing i can find is 

‘labelLostPass’ => __sp(‘Lost password?’),

 

Can i ad my own link to this line ?

thanks

MP Mr Papa
Mr Papa
Member

did you look at the codex article I referenced for this one? http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_loginform/

It gives you all the valid arguments that you can pass…

so you want to add what you want for:

‘passwordLink’ => site_url(‘wp-login.php?action=lostpassword’, ‘login’), # link to use for the lost password link

replace the

site_url(‘wp-login.php?action=lostpassword’, ‘login’),

with what you want… > Simple:Press Support > Saturday, January 19, 2013 1:15 PM > >postbox-contact-2.jpg

TJ tjalling
tjalling
Member

Aah almost. 

When i read the codex and what you said this is houw i make it

== 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?’),
‘labelSubmit’ => __sp(‘Log In’),
‘showRegister’ => 1,
‘showLostPass’ => 1
);
‘passwordLink’ => http://www.cannabismarijuana-seeds.com/password-recovery/ # link to use for the lost password link

Also when i remove :  # link to use for the lost password link. From the code still my forum gives an error.

What is going rong ?

Thanks

 

 

MP Mr Papa
Mr Papa
Member

you have to put it in the form array…

$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?’), ‘labelSubmit’ => __sp(‘Log In’), ‘showRegister’ => 1, ‘showLostPass’ => 1, ‘passwordLink’ => ‘http://www.cannabismarijuana-seeds.com/password-recovery’, );

TJ tjalling
tjalling
Member

aah finaly. 

Can you admit that the codex did not cover all that i asked. Ore is it me ?

Thanks

MP Mr Papa
Mr Papa
Member

lol. It does cover it, but would admit the second part, adding the array element is a bit more tricky… ;)

there is a bit of an assumption that if you are tweaking an sp theme, you are at least familiar with how a wp theme works…

but hey, we are here to help…