A A A
Forum Scope


Match



Forum Options



Min search length: 3 characters / Max search length: 84 characters
Forum Login
Lost password?
coding-topic
Change Login / Register button links
Avatar
Michael Montague
Brisbane, Australia
20 Posts
(Offline)
1
Oct 18, 2015 - 8:10 pm
Print

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

19448 Posts
(Offline)
2
Oct 18, 2015 - 8:15 pm
Print

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

sp_Check
This post answers the topic
Avatar
Michael Montague
Brisbane, Australia
20 Posts
(Offline)
3
Oct 18, 2015 - 8:21 pm
Print

Excellent, thanks for the fast response!!

Avatar
Mr Papa
Simi Valley, CA

19448 Posts
(Offline)
4
Oct 18, 2015 - 8:35 pm
Print

np. glad to help!

Avatar
Michael Montague
Brisbane, Australia
20 Posts
(Offline)
5
Oct 20, 2015 - 11:35 am
Print

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

16436 Posts
(Offline)
6
Oct 20, 2015 - 11:46 am
Print

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
20 Posts
(Offline)
7
Oct 20, 2015 - 12:10 pm
Print

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
2086 Posts
(Offline)
8
Oct 20, 2015 - 2:39 pm
Print

Good stuff, thanks for letting us know!

Avatar
Michael Montague
Brisbane, Australia
20 Posts
(Offline)
9
Oct 27, 2015 - 2:06 am
Print

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

16436 Posts
(Offline)
10
Oct 27, 2015 - 5:27 am
Print

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: America/New_York
All RSSShow Stats
Administrators: Blues Dancer, Simple Press, SP Community Support, Marcus (Simple:Press)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 630
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Newest Members:
Lorena Affleck
samantardh
PatrickAlawl
Hannelore Gaither
Margarito Nowacki
Elwood Mcclendon
samantaerx
Larue Cordeaux
Jerrold Stockman
Forum Stats:
Groups: 7
Forums: 17
Topics: 10071
Posts: 79393

 

Member Stats:
Guest Posters: 608
Members: 16976
Moderators: 0
Admins: 4

Most Users Ever Online
1170
Currently Online
Guest(s)
1
Currently Browsing this Page

1 Guest(s)