Implement Ajax Login/Register System

Posted in: Newsmag
Post count: 30

Presently, the Ajax login system works well with the signin/signout link in the top menu. But If I click on signin, register or forgot password in bbpress, I’m being taken to the wordpress login page.
So, Kindly assist me with implementing the Ajax Login/register system for other links so that I won’t be taken to the wordpress default login page again.

Post count: 6600

Hi,

Sorry for the delay! Could you please let me know which bbpress login you refer too and also send your site’s URL so I can tested this.

Thanks

Post count: 28

Here’s how I did it:

1.) Create new folder in Newsmag theme directory called ‘bbpress’
2.) Find the form-reply.php file from bbpress plugin files
3.) Copy entire contents of form-reply.php and duplicate the file in the new bbpress directory you just created. Or, you can edit the file directly, but risk losing it if you update bbpress in future
4.) Find: <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>
5.) Replace with: <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must log in to reply to this topic.', 'bbpress' ); ?></p>

But remove the aterisks * in code. This forum kept making it an actual link despite using code tags around it, odd. This will activate the ajax signin/join modal from within bbpress topic threads. You can apply the same: a class="td-login-modal-js" href="#login-form" data-effect="mpf-td-login-effect" structure to other links throughout your site to activate the modal 🙂

Post count: 28

Blah! Can’t edit above anymore lol…

Create a link around the word you want and include class="td-login-modal-js" href="#login-form" data-effect="mpf-td-login-effect"

Post count: 30

@Lucian, I’m still working on the site on a localhost, thanx @ Lucas, I’ll give it a try.
Meanwhile can you guys assist me on how to change login location?
Here’s an example: If my wordpress website is abc.com, when someone visit abc.com/wp-login it takes them to the login page. Is there a way to disable this page from displaying when /wp-login or /admin is added?

FYI, I’ve googled it but no relevant answer.

Post count: 30

@Lucas, I found the file but I’m confused as to how to add the later for it to work well, I’m not so much a coder, I would appreciate if you can send me code in one piece, then I’ll see if I need to change anything else later.
I actually got stuck here:
Create a link around the word you want and include class=”td-login-modal-js” href=”#login-form” data-effect=”mpf-td-login-effect”

Post count: 28

This site keeps screwing with the code. Here’s the raw tutorial: http://pastebin.com/Q3Xuzz2K

  • This reply was modified 11 years by Lucas.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.