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
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 ?
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
OK the probleme was in what I commented!
instead of commenting it, replace it by :
$SQL .= " ORDER BY display_name ASC LIMIT " . $sql_limit;