Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Stathis G.

    (@osios)

    Καλησπέρα σας,

    Σας έχει αποσταλλεί το domain στο info σας. Ευχαριστώ.

    • This reply was modified 2 years, 4 months ago by Stathis G..

    Hello there, I had the same problem and I managed to find a work around.

    1) In the wp-modal-login/includes/class-wp-modal-login.php, in function modal_login_btn and line 548 change:

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';
    to:

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';

    2) In file wp-modal-login/js/wp-modal-login.js make the following changes (WP uses minified version, so change to that first):

    a) After Line 7 add: login_id = ‘#login-box’;

    b) In Line 38 add:

    $('#loginbox1').click(function(e) {
    		// Remove any messages that currently exist.
    		$('.wpml-content > p.message').remove();
    
    		// Get the link set in the href attribute for the currently clicked element.
    		var form_field = '#login';
    
    		//alert(form_field);
    		$('.wpml-content').hide();
    		$('.section-container ' + form_field).fadeIn('fast');
    
    		e.preventDefault();
    
    		if(form_field === '#register') {
    			$(this).parent().fadeOut().removeClass().addClass('hide-login');
    		} else {
    			$('a[href="#login"]').parent().removeClass().addClass('inline').fadeOut();
    		}
    	});

    3) Then you can add to header.php or in any other template php this piece of code:

    <a href="#register">Register</a>

    This should do the job.

    Happy Coding Everybody!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Hello there, I had the same problem and I managed to find a work around.

    1) In the wp-modal-login/includes/class-wp-modal-login.php, in function modal_login_btn and line 548 change:

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';
    to:

    $link .= '<a href="#login-box" id="loginbox1" class="login wpml-btn login-window">' . sprintf( _x( '%s', 'Login Text', 'geissinger-wpml' ), sanitize_text_field( $login_text ) ) . '</a></li>';

    2) In file wp-modal-login/js/wp-modal-login.js make the following changes (WP uses minified version, so change to that first):

    a) After Line 7 add: login_id = ‘#login-box’;

    b) In Line 38 add:

    $('#loginbox1').click(function(e) {
    		// Remove any messages that currently exist.
    		$('.wpml-content > p.message').remove();
    
    		// Get the link set in the href attribute for the currently clicked element.
    		var form_field = '#login';
    
    		//alert(form_field);
    		$('.wpml-content').hide();
    		$('.section-container ' + form_field).fadeIn('fast');
    
    		e.preventDefault();
    
    		if(form_field === '#register') {
    			$(this).parent().fadeOut().removeClass().addClass('hide-login');
    		} else {
    			$('a[href="#login"]').parent().removeClass().addClass('inline').fadeOut();
    		}
    	});

    3) Then you can add to header.php or in any other template php this piece of code:

    <a href="#register">Register</a>

    This should do the job.

    Happy Coding Everybody!

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)