Notifications
Clear all

wpForo 1.x.x [Solved] Which Files Contain Log In & Register Modal Code

10 Posts
4 Users
1 Likes
58.8 K Views
Jimmy George
Posts: 39
Topic starter
(@jimmy-george)
Eminent Member
Joined: 3 years ago

Hi,

I am looking to integrate a log in plugin with the forums so that its uniform across my site. Can the dev's or the mods tell me what file do I need to edit to change the login and register link sources that comes in the modal https://share.getcloudapp.com/E0uEz44N (see screenshot) I tried the option in the settings where you can enter your custom links but that is not working well for me because it will only take a hyperlink. The code I want to integrate is 

For Sign In 
<a href="#" data-toggle="modal" data-target="#sign-in-modal">Sign in</a>

For Register 
<a href="#" data-toggle="modal" data-target="#sign-up-modal">Register</a>

Forum Version: Latest

Forum link - https://malayali.ca/forums/

Any help will me immensely appreciated. 

9 Replies
Robert
Posts: 9912
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @jimmy-george,

You don't need to change any file. wpForo has options to change the login and registration URLs. Please follow to this support topic: https://wpforo.com/community/how-to-and-troubleshooting-2/change-forum-registration-page-to-website-registration/#post-19668

 

P.S. Please do a quick search in Google or in wpForo Community before spending time to open a new support topic.

Reply
Jimmy George
Posts: 39
Topic starter
(@jimmy-george)
Eminent Member
Joined: 3 years ago

Hi @robert,

I am already aware of these settings and have mentioned why it will not work for me. Those settings if I am correct only takes a hyperlink and will not take a code like below. That setting also does not work well in my case because after logging in, it is redirecting to another page by adding /2/ and this ends up at a 404 page in my case. Are you relling me that I can enter the code below in those fields ?

Please let me know if we are on the same page 

For Sign In 
<a href="#" data-toggle="modal" data-target="#sign-in-modal">Sign in</a>

For Register 
<a href="#" data-toggle="modal" data-target="#sign-up-modal">Register</a>

Reply
1 Reply
Robert
Admin
(@robert)
Joined: 7 years ago

Support Team
Posts: 9912

@jimmy-george

Ok, I see that. The only way to do this is changing in core /wpforo/wpf-includes/wpf-hooks.php file.

You can find and change the pop-up login/registration links in this function:

function wpforo_get_login_or_register_notice_text(){
return sprintf(
wpforo_phrase('Please %s or %s', FALSE),
'<a href="' . wpforo_login_url() . '">'.wpforo_phrase('Login', FALSE).'</a>',
'<a href="' . wpforo_register_url() . '">'.wpforo_phrase('Register', FALSE).'</a>'
);
}

 

In next version, we'll add a filter hook to allow you to do your changes in an update-safe way.  After wpForo update you should use 'wpforo_login_or_register_popup_message' filter hook. In next version, you'll just need to put this code in your current active theme functions.php file:

function custom_wpforo_login_register_message( $html ){
return 'Please <a href="#" data-toggle="modal" data-target="#sign-in-modal">Sign in</a> or <a href="#" data-toggle="modal" data-target="#sign-up-modal">Register</a>';
}
add_filter('wpforo_login_or_register_popup_message', 'custom_wpforo_login_register_message', 10);

How to Easily Add Custom Code in WordPress

Reply
Jimmy George
Posts: 39
Topic starter
(@jimmy-george)
Eminent Member
Joined: 3 years ago

Hi @robert,

Thanks a lot for pointing me in the right direction and would immensely appreciate if you can incorporate the hook in the next update. Any rough estimate or ETA about when the next update will be rolled out ? Thank you again!

Reply
Jimmy George
Posts: 39
Topic starter
(@jimmy-george)
Eminent Member
Joined: 3 years ago

Hi @robert, My developer was able to successfully integrate the site default modals  at https://malayali.ca/forums/ . I hope you would integrate this as a function in the next update. If that is not the case, then an update will overwrite the changes but I hope it will be integrated in the next update as you said. Thanks a lot again!

Reply
1 Reply
Martin
Moderator
(@martin)
Joined: 6 years ago

Support Team
Posts: 868

@jimmy-george

It's already added in core, so it'll be 100% available in next version.

Reply
Page 1 / 2