WordPress.org

Ready to get started?Download WordPress

Forums

Login With Ajax
[resolved] Either Remove Password OR White Branding (3 posts)

  1. webowner
    Member
    Posted 2 years ago #

    Hello,

    Awesome Plug-in. Very happy to find it, use it and it works well.

    However, please tell me - is there any way to remove the "Retreive Password link"

    Because my client does not want to see the relation to WordPress, or have emails from WordPress. If we can somehow change this to be from our company name - that would be better.

    OR, is there a way to perhaps add a "White Label Branding" to the Retreive Password Page?

    http://wordpress.org/extend/plugins/login-with-ajax/

  2. webowner
    Member
    Posted 2 years ago #

    Never Mind - Have figured it out

  3. Max625
    Member
    Posted 2 years ago #

    @webowner - Would you mind sharing how you accomplished this? I did not know how to manipulate the string data.error was outputting, so I just swapped in my own string ($mymessage). I'm thinking there is a better way to accomplish this.

    //Handle a AJAX call for Login, RememberMe or Registration
    	function lwaAjax( data, statusElement, prependTo ){
    		$('#LoginWithAjax_Loading').remove();
    		if( data.result === true || data.result === false ){
    			if(data.result === true){
    				//Login Successful
    				if( $('#'+statusElement).length > 0 ){
    					$('#'+statusElement).attr('class','confirm').html(data.message);
    				}else{
    					$('<span id="'+statusElement+'" class="confirm">'+data.message+'</span>').prependTo( prependTo );
    				}
    			}else{
    				//Login Failed
    				//If there already is an error element, replace text contents, otherwise create a new one and insert it
    				if( $('#'+statusElement).length > 0 ){
    					$mymessage = '<strong>ERROR</strong>: Invalid username. <a href="mylink" title="My help title">Need Help?</a>';
    					$('#'+statusElement).attr('class','invalid').html($mymessage);
    					/*$('#'+statusElement).attr('class','invalid').html(data.error);*/
    				}else{
    					$('<span id="'+statusElement+'" class="invalid">'+data.error+'</span>').prependTo( prependTo );
    				}
    				//We assume a link in the status message is for a forgotten password
    				$('#'+statusElement).click(function(event){
    					event.preventDefault();
    					$('#LoginWithAjax_Remember').show('slow');
    				});
    			}
    		}else{
    			//If there already is an error element, replace text contents, otherwise create a new one and insert it
    			if( $('#'+statusElement).length > 0 ){
    				$('#'+statusElement).attr('class','invalid').html('An error has occured. Please try again.');
    			}else{
    				$('<span id="'+statusElement+'" class="invalid">An error has occured. Please try again.</span>').prependTo( prependTo );
    			}
    		}
    	}

    For those of you having trouble getting started on this - you need to override the login-with-ajax.js file by creating a new one (if you haven't already) at wp-content/themes/yourtheme/plugins/login-with-ajax/ to make the change you implement update safe (this way you aren't touching the source code). See the readme file included with the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic