Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Change Login / Register button links
Avatar
Michael Montague
Brisbane, Australia
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2015 - 8:10 pm

Hi, I'm looking to integrate the UserPro membership plugin into my site. I will be using the reboot theme. I want to use the UserPro login/registration forms rather than the SP ones. How can I change the hyperlink for these buttons? I dug around a bit but couldn't find the code.

I'm also contemplating removing these buttons and just using the login/register buttons on another part of my site, since SP should sync everything up fine with wordpress' user membership too correct? How can I remove both these buttons from the header in that case?

Thanks! 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2015 - 8:15 pm

see these for how to replace the urls to yours:

https://simple-press.com/docum.....outbutton/

https://simple-press.com/docum.....terbutton/

to remove, just remove those template function calls from your sp theme... they are in the spHead.php template file...  as always, before editing a theme, we suggest making a child theme or creating your own theme...

Avatar
Michael Montague
Brisbane, Australia
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2015 - 8:21 pm

Excellent, thanks for the fast response!!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2015 - 8:35 pm

np. glad to help!

Avatar
Michael Montague
Brisbane, Australia
Member
Free Members
sp_UserOfflineSmall Offline
Oct 20, 2015 - 11:35 am

I've removed the login/register buttons by commenting out the code in spHeadDesktop.php (in a child theme). When I view the site on my iPhone there is the Actions drop down box for Log In, Register and Search. I can't find where to remove this code... 

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 20, 2015 - 11:46 am

As you would have found the spHeadDesktop.php file in the 'desktop' folder of the theme so there is an spHeadMobile.php in an equivalent 'mobile' folder. You just need to give it the same treatment.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Michael Montague
Brisbane, Australia
Member
Free Members
sp_UserOfflineSmall Offline
Oct 20, 2015 - 12:10 pm

Thanks, I had done that actually, cache must not have been clearing properly, tried another browser and it was refreshed. Cheers!

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 20, 2015 - 2:39 pm

Good stuff, thanks for letting us know!

Avatar
Michael Montague
Brisbane, Australia
Member
Free Members
sp_UserOfflineSmall Offline
Oct 27, 2015 - 2:06 am

Hi, I decided to add the login URL back into my site button, but I can't get it to display correctly using the API. I'm a bit confused about the quote characters and the argument options, do they need to be nested? If someone could clarify would be great!

With this code the forum doesn't load in the page:

sp_LogInOutButton('tagClass=spButton spRight','logInLink'='http://panorev.com/profile/login','logOutLink'='http://panorev.com/profile/logout', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out')); 

With this code, it loads, but the button displays the text logOutLink'='http://panorev.com/profile/logout as seen in this pic: Image Enlarger

 

sp_LogInOutButton('tagClass=spButton spRight','logInLink=http://panorev.com/profile/login','logOutLink=http://panorev.com/profile/logout', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

It would be clearer if you provided an example on the Codex. Thanks 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 27, 2015 - 5:27 am

There IS an example in the codex just here. However - I do see that this particular example only passes one argument.

The method that ALL Simple:Press display functions use to pass arguments is the same as the method that WordPress uses. That is that all the function arguments are sent as one, long string of text using name=value pairs with each pair separated by an ampersand.

So - using your own code from above that would be sent as:

sp_LogInOutButton('tagClass=spButton spRight&logInLink=http://panorev.com/profile/login&logOutLink=http://panorev.com/profile/logout', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

Hope that helps.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 647
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79598