function b_wp_authors_show($options, $wp_num = "") { $with_count = empty($options[0]) ? 0 : $options[0]; $show_rss2_icon = empty($options[1]) ? 0 : $options[1]; global $wpdb, $siteurl, $wp_id, $wp_inblock, $user_cache; $id = 1; $use_cache = 1; if ($wp_num == "") { $wp_id = $wp_num; $wp_inblock = 1; require dirname(__FILE__) . '/../wp-config.php'; $wp_inblock = 0; } $optioncount = $with_count == 1; $exclude_admin = false; $show_fullname = false; $hide_empty = true; $feed = $show_rss2_icon == 1 ? 'rss2' : ''; $feed_image = $show_rss2_icon == 1 ? $siteurl . '/wp-images/rss-mini.gif' : ''; ob_start(); list_authors($optioncount, $exclude_admin, $show_fullname, $hide_empty, $feed, $feed_image); $block['content'] = ob_get_contents(); ob_end_clean(); return $block; }
function wp_list_authors($args = '') { parse_str($args, $r); if ( !isset($r['optioncount']) ) $r['optioncount'] = false; if ( !isset($r['exclude_admin']) ) $r['exclude_admin'] = true; if ( !isset($r['show_fullname']) ) $r['show_fullname'] = false; if ( !isset($r['hide_empty']) ) $r['hide_empty'] = true; if ( !isset($r['feed']) ) $r['feed'] = ''; if ( !isset($r['feed_image']) ) $r['feed_image'] = ''; list_authors($r['optioncount'], $r['exclude_admin'], $r['show_fullname'], $r['hide_empty'], $r['feed'], $r['feed_image']); }
} if ($notice_count && $notice_count != 0) { $author_list .= "<td onmousedown=\"document.location='./catalog.php?categ=search&mode=0&etat=aut_search&aut_id={$author_id}';\">" . $notice_count . "</td>"; } else { $author_list .= "<td> </td>"; } $author_list .= "</tr>"; } $url_base = $url_base . "&type_autorite=" . $type_autorite . '&authority_statut=' . $authority_statut; if (!$last_param) { $nav_bar = aff_pagination($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true); } else { $nav_bar = ""; } // affichage du résultat list_authors($user_input, $author_list, $nav_bar, $type_autorite); } else { // la requête n'a produit aucun résultat auteur::search_form($type_autorite); error_message($msg[211], str_replace('!!author_cle!!', stripslashes($user_input), $msg[212]), 0, './autorites.php?categ=auteurs&sub=&id='); } function list_authors($cle, $author_list, $nav_bar, $type_autorite) { global $authors_list_tmpl; global $charset; $authors_list_tmpl = str_replace("!!cle!!", htmlentities(stripslashes($cle), ENT_QUOTES, $charset), $authors_list_tmpl); $authors_list_tmpl = str_replace("!!list!!", $author_list, $authors_list_tmpl); $authors_list_tmpl = str_replace("!!nav_bar!!", $nav_bar, $authors_list_tmpl); auteur::search_form($type_autorite); print pmb_bidi($authors_list_tmpl); }