Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello Mikko,

    Thank you for your reply,

    I’ve tested the above code and it’s still not working, I’m creating the search query on WordPress as an API (while loading WordPress inside it of course).

    All WordPress functions work flawlessly, you think this might be the issue?

    Let me know,

    Hello Gioni,

    Thanks for getting in touch,

    I found the “disable traffic inspection” feature and It worked but I forgot to update this thread. However, well noted for explaining the “Request whitelist” feature. I’ll definitely check it out.

    Again, thanks for this great plugin, It replaced many other plugins (and tweaked functions) I usually use.

    Keep up the good work,
    Cheers!

    Hello,

    I’ve been having the same problem on WP 4.4.2, thus I got the plugin finally working and I think the main problem is with the admin_footer hook used.
    Anyway change the username_check.php file in the plugin directory to the following:

    add_action('wp_head', 'usercheck');
    
    function usercheck() {
        ?>
        <script type="text/javascript" >
            var xhr = 0;
            jQuery(document).ready(function ($) {
                $('#user_login, input[name="user_login"]')
                        .after('<span class="uc_disp" id="uc_ajax_loader">'
                                + '<img src="<?php echo plugin_dir_url(__FILE__) . 'ajax-loader.gif'; ?>" width=16 height=16 title="Loading..."/></span>')
                        .after('<span class="uc_disp" id="uc_valid">'
                                + '<img src="<?php echo plugin_dir_url(__FILE__) . 'valid.png'; ?>" width=16 height=16 title="Valid"/></span>')
                        .after('<span class="uc_disp" id="uc_invalid">'
                                + '<img src="<?php echo plugin_dir_url(__FILE__) . 'invalid.png'; ?>" width=16 height=16 title="Invalid"/></span>')
                $('.uc_disp').hide();
                $('#user_login').bind('keyup change', function () {
                    var data = {
                        action: 'check_username',
                        username: $('#user_login').val(),
                    };
                    $('.uc_disp').hide();
                    $('#uc_ajax_loader').show();
                    if (xhr)
                        xhr.abort();
                    xhr = $.ajax({
                        url: ajaxurl,
                        type: 'get',
                        async: true,
                        data: data,
                        success: function (response) {
                            $('.uc_disp').hide();
                            if (response == 0) {
                                $('#uc_valid').show();
                                $('input[type="submit"]').removeClass("disabled");
                                $('input[type="submit"]').prop("disabled", false);
                            } else {
                                $('#uc_invalid').show();
                                $('input[type="submit"]').addClass("disabled");
                                $('input[type="submit"]').prop("disabled", true);
                                $('input[type="submit"]').attr("title", "the username entered is not available");
                            }
                            ;
                        },
                    });
                });
    
            });
        </script>
        <?php
    }
    
    //echo 0 si n'existe pas
    add_action('wp_ajax_check_username', function() {
        if (username_exists($_GET['username']) == null)
            echo 0;
        else
            echo 1;
        die();
    });

    This will also work on Woocommerce username field in the registration form (I double checked).

    In addition I added a disabled attribute, a disabled class, an info title to the register button whenever an unavailable username is chosen.

    I hope that helps and best of luck,
    Cheers!

    Maroun Melhem

    (@marounmelhem)

    Hello Enrico and thank you for your reply,

    Please note that I’m displaying the map using the shortcode generated and after manually adding the library it’s working good (perhaps a 4.3.1 compatibility issue?).

    Thus, the pop functionality whenever you click on any specific location is still not working even though no errors are showing in the console.

    any recommendations?

    Maroun Melhem

    (@marounmelhem)

    Problem solved, I had to download and include the vectormap jquery library 🙂
    However, the popup is not showing whenever i click on any location on the map even though i added content in the map edit page.
    Thanks again

    Working 🙂 Thank you Ipstenu!

    Working great thanks a lot 🙂

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