• ZeZeN_wp

    (@zezen_wp)


    hi,

    I would like to know why the popups seems to open but not onto my theme I just can see the top part of the window just behind the page.
    It is maybe because of my theme (Radiate)

    an other probleme is that today I have 5 users of the site and I can see just one user in the listing (and it’s not me…) What can I do to fix this issue ?

    sorry for my english, I’m a french user …
    I modified a bit the code of the plugin to fit a bit more with my language and use of it… if modifications are not too big please could you give them to me…

    thank’s !!!

    https://wordpress.org/plugins/wp-user-listing-and-searching/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ZeZeN_wp

    (@zezen_wp)

    The issue for the users shown is resolved. I went into the wp_user_listing.php and commented those lines:

    $SQL .= " AND
            (mt6.meta_key = 'wp_capabilities' AND CAST(mt6.meta_value AS CHAR) LIKE '%Subscriber%')
          ORDER BY display_name ASC LIMIT " . $sql_limit;

    it’s around lines 63…

    Before it was looking for suscribers, now it looks for all users.

    The other issue is not resolved yet. I’ll try to do that with a “classic popup” in php (with the code onclick…) instead of the “native” thickbox.

    don’t forget to help me if possible !!!

    regards

    Thread Starter ZeZeN_wp

    (@zezen_wp)

    OK, I did something else!

    I integrated this in the begining of the code :

    <script>
        function toggledisplay(elementID)
        {
            (function(style) {
                style.display = style.display === 'none' ? '' : 'none';
            })(document.getElementById(elementID).style);
        }
        </script>

    and replaced the link (with TB_inline…) by this one:

    <a href="#<?php echo $i;?>" onclick="toggledisplay('user_full_info_<?php echo $i;?>');">More info...</a>

    with the $i which increments alone in the foreach…

    then I have something beautiful and usable.

    no popup but do we realy need it ?

    Thread Starter ZeZeN_wp

    (@zezen_wp)

    Ok, now I can’t have the pagination working!

    When I change the number of users that have to be shown in the option page, I get the good number of pages but :

    I have all my users shown on each page!!!

    The options are not well filled ?

    to give you the ability to help me I post here a part of my code witch could maybe be interesting for this issue:

    <?php
    
        require_once('paging.class.php');
    
        $paging = new paging;
    
        $SQL = "SELECT distinct(wp_users.ID) as ID,display_name FROM wp_users";
    
        if (isset($_POST['search_name']) && trim($_POST['search_name']) != '') {
            $SQL .= " INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id)
       INNER JOIN wp_usermeta AS mt1 ON (wp_users.ID = mt1.user_id) ";
        }
    
        $SQL .= " INNER JOIN wp_usermeta AS mt6 ON (wp_users.ID = mt6.user_id) WHERE 1=1 ";
    
        if (isset($_POST['search_name']) && trim($_POST['search_name']) != '') {
    
            $SQL .= "AND
        (
            (wp_usermeta.meta_key = 'first_name' AND CAST(wp_usermeta.meta_value AS CHAR) LIKE '%" . $_POST['search_name'] . "%')
            OR
            (mt1.meta_key = 'last_name' AND CAST(mt1.meta_value AS CHAR) LIKE '%" . $_POST['search_name'] . "%')
        ) ";
        }
    
        $TSQL            = $SQL . " AND
            (mt6.meta_key = 'wp_capabilities' AND CAST(mt6.meta_value AS CHAR) LIKE '%Subscriber%')
          ORDER BY display_name ASC ";
        $t_record        = $wpdb->get_results($SQL);
        $total_records   = count($t_record);
        $record_per_page = get_option('wp_user_plugin_record_per_page');
        $paging->assign(get_permalink(), $total_records, $record_per_page);
        $sql_limit = $paging->sql_limit();
    
        /* //pour filtrer sur les suscribers seulement... pas besoin moi je veux tout le monde !
        $SQL .= " AND
            (mt6.meta_key = 'wp_capabilities' AND CAST(mt6.meta_value AS CHAR) LIKE '%Subscriber%')
          ORDER BY display_name ASC LIMIT " . $sql_limit;
          **/
    
        $fivesdrafts = $wpdb->get_results($SQL);

    if someone can help… thank’s

    Thread Starter ZeZeN_wp

    (@zezen_wp)

    OK the probleme was in what I commented!

    instead of commenting it, replace it by :

    $SQL .= " ORDER BY display_name ASC LIMIT " . $sql_limit;

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘popup false listing’ is closed to new replies.