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/
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/
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…
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
sp-common-view-functions.php is NOT a theme file so it has no business in the theme folders.
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..
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
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…
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
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 > >
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
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’, );
aah finaly.
Can you admit that the codex did not cover all that i asked. Ore is it me ?
Thanks
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…