Notifications
Clear all

wpForo 1.x.x [Solved] Where can I find and edit the file with login/register links on the JS popup

5 Posts
2 Users
1 Likes
2,532 Views
Posts: 16
Topic starter
(@moenagy)
Eminent Member
Joined: 5 years ago

Hi , im aware that you can setup custom login/register links in the members admin of wpforo.

my question is , if I’m not logged in and click on add new topic it comes with the JS pop up saying “please login or register” where can I find that file and that code to edit manually. 

 I have a POP UP login / register modal plugin , the login link for that modal is a CSS class and not an actual link .. so basically my question is , how can I add that CSS class to the login link of ONLY the Js pop up of wpforo, or just tell me where that file is please and ill code it myself.

4 Replies
Posts: 16
Topic starter
(@moenagy)
Eminent Member
Joined: 5 years ago

this image to give you a better understanding ,
I made a minor change in Chrome inspeact element to <span class="lrm-login">Login</span> ... and it it is able to load the login window I want.  Where is that file, can't find it anywhere at all !! I'm only able to find the CSS related to the message box, I need to edit the box it self, not the CSS !!

please don't tell me there is no way to do that, then I can't use this software ! 

Sofy
Posts: 4233
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi @moenagy,

Please follow the steps:

1. Install the Simple Custom CSS and JS plugin: https://wordpress.org/plugins/custom-css-js/

2.  Add the following JS code via the plugin 

jQuery(document).ready(function(){
jQuery('#wpf-msg-box a[href$="?wpforo=signin"]').replaceWith('<span class="lrm-login">Login</span>');
});

This works after the page loading. 

 If you remove the #wpf-msg-box selector from the code above, it'll replace all login links (wpForo). 

Another way is changing the add_footer_html() function in wp-content/plugins/wpforo/wpf-includes/class-template.php file. 

The second one is not the update safe way. 

Posts: 16
Topic starter
(@moenagy)
Eminent Member
Joined: 5 years ago

I’ll try that as soon as I get back home, I shall do the same to the register link too with another JS code via that plugin to replace the register link?

Posts: 16
Topic starter
(@moenagy)
Eminent Member
Joined: 5 years ago

it sure works !!! thank you so much for the help 🙂