</a></p> <?php } ?> <h3><?php if (0 == $wp_user_search->first_user && $wp_user_search->total_users_for_query <= 50) { printf(__('%3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); } else { printf(__('%1$s – %2$s of %3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); } ?> </h3> <?php if ($wp_user_search->results_are_paged()) { ?> <div class="user-paging-text"><p><?php $wp_user_search->page_links(); ?> </p></div> <?php } ?> <form action="" method="post" name="updateusers" id="updateusers"> <?php wp_nonce_field('bulk-users'); ?> <table class="widefat"> <?php
<?php endif; ?> <?php if ( $wp_user_search->get_results() ) : ?> <?php if ( $wp_user_search->is_search() ) : ?> <p><a href="users.php"><?php _e('« Back to All Users'); ?></a></p> <?php endif; ?> <h3><?php if ( 0 == $wp_user_search->first_user && $wp_user_search->total_users_for_query <= 50 ) printf(__('%3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); else printf(__('%1$s – %2$s of %3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query); ?></h3> <?php if ( $wp_user_search->results_are_paged() ) : ?> <div class="user-paging-text"><p><?php $wp_user_search->page_links(); ?></p></div> <?php endif; ?> <form action="" method="post" name="updateusers" id="updateusers"> <?php wp_nonce_field('bulk-users') ?> <table class="widefat"> <?php foreach($roleclasses as $role => $roleclass) { uksort($roleclass, "strnatcasecmp"); ?> <tbody> <tr> <?php if ( !empty($role) ) : ?> <th colspan="7"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th> <?php else : ?>
function WP_members_list_list() { global $wp_roles, $getWP, $tern_wp_msg, $tern_wp_members_defaults, $current_user, $notice; get_currentuserinfo(); $o = $getWP->getOption('tern_wp_members', $tern_wp_members_defaults); $wps = new WP_User_Search($_GET['query'], $_GET['userspage'], $_GET['role']); $paging_text = paginate_links(array('total' => ceil($wps->total_users_for_query / $wps->users_per_page), 'current' => $wps->page, 'base' => 'admin.php?page=members-list-edit-members-list&%_%', 'format' => 'userspage=%#%', 'add_args' => $args)); if ($paging_text) { $paging_text = sprintf('<span class="displaying-num">' . __('Displaying %s–%s of %s') . '</span>%s', number_format_i18n(($wps->page - 1) * $wps->users_per_page + 1), number_format_i18n(min($wps->page * $wps->users_per_page, $wps->total_users_for_query)), number_format_i18n($wps->total_users_for_query), $paging_text); } ?> <div class="wrap"> <div id="icon-users" class="icon32"><br /></div> <h2>Members List</h2> <?php if (!empty($notice)) { ?> <div id="notice" class="error"><p><?php echo $notice; ?> </p></div><?php } ?> <p>Here you are able to select which of your members you'd like to show or hide in your members list. By default all members are showm.</p> <?php if (!empty($tern_wp_msg)) { echo '<div id="message" class="updated fade"><p>' . $tern_wp_msg . '</p></div>'; } ?> <div class="filter"> <form id="list-filter" action="" method="get"> <ul class="subsubsub"> <?php $l = array(); $a = array(); $u = get_users_of_blog(); $t = count($u); foreach ((array) $u as $c) { $d = unserialize($c->meta_value); foreach ((array) $d as $e => $v) { if (!isset($a[$e])) { $a[$e] = 0; } $a[$e]++; } } unset($u); $current_role = false; $class = empty($role) ? ' class="current"' : ''; $l[] = "<li><a href='admin.php?page=members-list-edit-members-list'{$class}>" . sprintf(__ngettext('All<span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $t), number_format_i18n($t)) . '</a>'; foreach ($wp_roles->get_names() as $s => $name) { if (!isset($a[$s])) { continue; } $class = ''; if ($s == $role) { $current_role = $role; $class = ' class="current"'; } $name = translate_with_context($name); $name = sprintf(_c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $a[$s]); $l[] = "<li><a href='admin.php?page=members-list-edit-members-list&role={$s}'{$class}>{$name}</a>"; } echo implode(" |</li>\n", $l) . '</li>'; unset($l); ?> </ul> </form> </div> <form class="search-form" action="" method="get"> <p class="search-box"> <label class="hidden" for="user-search-input">Search Users:</label> <input type="text" class="search-input" id="user-search-input" name="query" value="" /> <input type="hidden" id="page" name="page" value="<?php echo $_REQUEST['page']; ?> " /> <input type="submit" value="Search Users" class="button" /> </p> </form> <form id="posts-filter" action="" method="get"> <div class="tablenav"> <?php if ($wps->results_are_paged()) { ?> <div class="tablenav-pages"><?php echo $paging_text; ?> </div> <?php } ?> <div class="alignleft actions"> <select name="action"> <option value="" selected="selected">Bulk Actions</option> <option value="show">Show</option> <option value="hide">Hide</option> </select> <input type="submit" value="Apply" name="doaction" id="doaction" class="button-secondary action" /> </div> <br class="clear" /> </div> <table class="widefat fixed" cellspacing="0"> <thead> <tr class="thead"> <th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th> <th scope="col" id="username" class="manage-column column-username" style="">Username</th> <th scope="col" id="name" class="manage-column column-name" style="">Name</th> <th scope="col" id="email" class="manage-column column-email" style="">E-mail</th> <th scope="col" id="role" class="manage-column column-role" style="">Role</th> <th scope="col" id="displayed" class="manage-column column-displayed" style="">Displayed</th> </tr> </thead> <tfoot> <tr class="thead"> <th scope="col" class="manage-column column-cb check-column" style=""><input type="checkbox" /></th> <th scope="col" class="manage-column column-username" style="">Username</th> <th scope="col" class="manage-column column-name" style="">Name</th> <th scope="col" class="manage-column column-email" style="">E-mail</th> <th scope="col" class="manage-column column-role" style="">Role</th> <th scope="col" id="displayed" class="manage-column column-displayed" style="">Displayed</th> </tr> </tfoot> <tbody id="users" class="list:user user-list"> <?php // $c = 0; //foreach($m as $u) { foreach ($wps->get_results() as $u) { $u = new WP_User($u); $r = $u->roles; $r = array_shift($r); if (!empty($_REQUEST['role']) and $_REQUEST['role'] != $r) { continue; } $d = is_float($c / 2) ? '' : ' class="alternate"'; $nu = $current_user; $e = $u->ID == $nu->ID ? 'profile.php' : 'user-edit.php?user_id=' . $u->ID . '&wp_http_referer=' . wp_get_referer(); ?> <tr id='user-<?php echo $u->ID; ?> '<?php echo $d; ?> > <th scope='row' class='check-column'><input type='checkbox' name='users[]' id='user_<?php echo $u->ID; ?> ' class='administrator' value='<?php echo $u->ID; ?> ' /></th> <td class="username column-username"> <?php echo get_avatar($u->ID, 32); ?> <strong> <a href="<?php echo $e; ?> "><?php echo $u->user_nicename; ?> </a> </strong><br /> <div class="row-actions"> <span class='edit'><a href="admin.php?page=members-list-edit-members-list&users%5B%5D=<?php echo $u->ID; ?> &action=show&_wpnonce=<?php echo wp_create_nonce('tern_wp_members_nonce'); ?> ">Show</a> | </span> <span class='edit'><a href="admin.php?page=members-list-edit-members-list&users%5B%5D=<?php echo $u->ID; ?> &action=hide&_wpnonce=<?php echo wp_create_nonce('tern_wp_members_nonce'); ?> ">Hide</a></span> </div> </td> <td class="name column-name"><?php echo $u->first_name . ' ' . $u->last_name; ?> </td> <td class="email column-email"><a href='mailto:<?php echo $u->user_email; ?> ' title='e-mail: <?php echo $u->user_email; ?> '><?php echo $u->user_email; ?> </a></td> <td class="role column-role"><?php echo $r; ?> </td> <td class="role column-displayed"><?php if (!empty($o['hidden']) and in_array($u->ID, $o['hidden'])) { echo 'no'; } else { echo 'yes'; } ?> </td> </tr> <?php $c++; } ?> </tbody> </table> <div class="tablenav"> <div class="alignleft actions"> <select name="action2"> <option value="" selected="selected">Bulk Actions</option> <option value="show">Show</option> <option value="hide">Hide</option> </select> <input type="hidden" id="page" name="page" value="members-list-edit-members-list" /> <input type="hidden" id="_wpnonce" name="_wpnonce" value="<?php echo wp_create_nonce('tern_wp_members_nonce'); ?> " /> <input type="submit" value="Apply" name="doaction2" id="doaction2" class="button-secondary action" /> </div> <br class="clear" /> </div> </form> </div> <?php }
function manage_avatar_cache() { global $wpdb; $msg = ''; // Show commenter avatars too? $all = @$_GET['act'] == 'all'; // Check table updates... if (isset($_GET['user_id'])) { $msg = __('User Photo', 'avatars') . ' ' . (empty($_GET['avatar']) ? __('removed', 'avatars') : __('updated', 'avatars')) . '.'; update_user_meta($_GET['user_id'], 'avatar', $_GET['avatar']); update_user_meta($_GET['user_id'], 'twitter_id', $_GET['twitter_id']); } // Check form submission and update options... if (isset($_POST['submit'])) { $options_update = array('size' => $_POST['size'], 'scale' => $_POST['scale'], 'resize' => $_POST['resize'], 'upsize' => $_POST['upsize'], 'snapshots' => $_POST['snapshots'], 'in_posts' => $_POST['in_posts'], 'credit' => $_POST['credit'], 'twitter' => $_POST['twitter'], 'default' => $_POST['default'], 'upload_dir' => $_POST['upload_dir'], 'url_wrap' => $_POST['url_wrap'], 'name' => $_POST['name'], 'location' => $_POST['location'], 'legacy' => $_POST['legacy'], 'widget_enabled' => $_POST['widget_enabled'], 'upload_allowed' => $_POST['upload_allowed']); if ($this->networked) { update_site_option('plugin_avatars', $options_update); } else { update_option('plugin_avatars', $options_update); update_option('show_avatars', $_POST['show_avatars'] == 'on' ? 1 : 0); update_option('avatar_rating', $_POST['avatar_rating']); update_option('avatar_default', $_POST['wavatar']); } $msg = __('Options saved', 'avatars'); } // Get options and set form action var if ($this->networked) { $this->avatar_options = get_site_option('plugin_avatars'); $form_action = $_SERVER['PHP_SELF'] . '?page=add_local_avatar&updated=true'; } else { $this->avatar_options = get_option('plugin_avatars'); $wavatar = get_option('avatar_default'); $form_action = $_SERVER['PHP_SELF'] . '?page=' . basename(__FILE__) . '&updated=true'; } // Output any action message (note, can only be from a POST or GET not both). if (!empty($msg)) { echo "<div id='message' class='updated fade'><p>", $msg, "</p></div>"; } ?> <script language="Javascript"> function set_input_values(num) { var h = document.getElementById('href-' + num); h.href = h.href + '&avatar=' + document.getElementById('avatar-' + num).value; h.href = h.href + '&twitter_id=' + document.getElementById('twitter_id-' + num).value; } </script> <div class="wrap"> <span id='icon-users' class='icon32'></span><h2><?php _e('User Photo Settings', 'avatars'); ?> </h2> <h3><?php _e('User Photos', 'avatars'); ?> </h3> <?php // Do not show the table of this site's users/commentors if Avatars are disabled, instead place a hyperlink for them to enable it. if (!get_option('show_avatars')) { _e('Photos / Avatars have been disabled for this site. Enable avatars under <a href="/wp-admin/options-discussion.php">Settings > Discussion</a>', "avatars"); } else { $user_search = new WP_User_Search('', $_GET['userspage'], ''); // Do we have to page the results? if ($user_search->total_users_for_query > $user_search->users_per_page) { if ($this->networked) { $paging_base = basename($this->requestURI) . '&%_%'; } else { $paging_base = 'users.php?page=profiles.php&%_%'; } $user_search->paging_text = paginate_links(array('total' => ceil($user_search->total_users_for_query / $user_search->users_per_page), 'current' => $user_search->page, 'base' => $paging_base, 'format' => 'userspage=%#%')); } // How many per page (for commenters, if shown)? $per_page = $user_search->users_per_page; if ($user_search->results_are_paged()) { ?> <div class="tablenav"> <div class="tablenav-pages"><?php $user_search->page_links(); ?> </div> </div> <?php } ?> <table class='widefat'> <thead> <tr> <th><?php _e('Username', 'avatars'); ?> </th> <th><?php _e('Name (Nickname)', 'avatars'); ?> </th> <th><?php _e('e-Mail', 'avatars'); ?> </th> <th><?php _e('Twitter ID', 'avatars'); ?> </th> <th><?php _e('Local', 'avatars'); ?> </th> <th style="text-align: center;"><?php _e('Photo', 'avatars'); ?> </th> <th><?php _e('Type', 'avatars'); ?> </th> <th><?php _e('Action', 'avatars'); ?> </th> </tr> </thead> <tbody> <?php $i = 0; foreach ($user_search->get_results() as $id) { $user = new WP_User($id); printf('<tr%s>', $i % 2 == 0 ? " class='alternate'" : ""); printf('<td><a href="user-edit.php?user_id=%s">%s</a></td>', $id, $user->user_login); printf('<td>%s %s%s</td>', $user->first_name, $user->last_name, empty($user->nickname) ? '' : ' (' . $user->nickname . ')'); printf('<td><a href="mailto:%1$s">%1$s</a></td>', $user->user_email); printf('<td><input type="text" value="%s" id="twitter_id-%d" /></td>', $user->twitter_id, $i); printf('<td><input type="text" value="%s" size="35" id="avatar-%d" /></td>', $user->avatar, $i); printf('<td style="text-align: center;">%s</td>', get_avatar($id)); printf('<td>%s</td>', $this->get_avatar_type()); printf('<td><a href="%1$s&user_id=%2$s" class="edit" onclick="set_input_values(%3$d);" id="href-%3$d">%4$s</a></td>', $this->requestURI, $id, $i, __('Update', 'avatars')); echo "</tr>\n"; $i++; } ?> </tbody> </table> <?php if ($user_search->results_are_paged()) { ?> <div class="tablenav"> <div class="tablenav-pages"><?php $user_search->page_links(); ?> </div> </div> <?php } ?> <p><?php if (!$all) { echo __("Not showing photos for commenters.", 'avatars'), " <a href='" . $this->requestURI . "&act=all'>", __('Click here', 'avatars'), '</a> ', __("to show commenter avatars.", 'avatars'); } else { echo __("Showing avatars for commenters.", 'avatars'), " <a href='" . $this->requestURI . "'>", __('Click here', 'avatars'), '</a> ', __("to hide commenter photos.", 'avatars'); } ?> </p> <?php $com_page = isset($_GET['comspage']) ? $_GET['comspage'] : 1; if ($all) { $total = $wpdb->get_var("select count(distinct comment_author_email) from {$wpdb->comments} where comment_author_email != ''"); $limit_start = ($com_page - 1) * $per_page; $coms = $wpdb->get_results("select comment_author_email EML, comment_author ATH, count(comment_content) CNT from {$wpdb->comments} where comment_author_email != '' group by comment_author_email order by CNT DESC limit {$limit_start}, {$per_page}"); if ($total > $per_page) { $paging_text = paginate_links(array('total' => ceil($total / $per_page), 'current' => $com_page, 'base' => 'users.php?page=profiles.php&act=all&%_%', 'format' => 'comspage=%#%')); } if ($coms) { ?> <h3><?php _e('Commenter Photos', 'avatars'); ?> </h3> <?php if ($paging_text) { ?> <div class="tablenav"> <div class="tablenav-pages"><?php echo $paging_text; ?> </div> </div> <?php } ?> <table class='widefat'> <thead> <tr><th><?php _e('Name', 'avatars'); ?> </th><th><?php _e('e-Mail', 'avatars'); ?> </th><th style="text-align: center;"><?php _e('Comments', 'avatars'); ?> </th><th style="text-align: center;"><?php _e('Photo', 'avatars'); ?> </th></tr> </thead> <tbody> <?php $i = 0; foreach ($coms as $com) { if (!empty($com->EML)) { printf('<tr%s>', $i % 2 == 0 ? " class='alternate'" : ""); printf('<td>%s</td>', $com->ATH); printf('<td><a href="mailto:%1$s">%1$s</a></td>', $com->EML); printf('<td class="num">%s</td>', $com->CNT); printf('<td style="text-align: center;">%s</td>', get_avatar($com->EML)); echo "</tr>\n"; $i++; } } ?> </tbody> </table> <?php if ($paging_text) { ?> <div class="tablenav"> <div class="tablenav-pages"><?php echo $paging_text; ?> </div> </div> <?php } } } ?> <?php } // end if ?> <h3><?php _e('Photo Options', 'avatars'); ?> </h3> <form method="post" action="<?php echo $form_action; ?> "> <table class='form-table'> <?php // Do not repeat Settings > Discussion options in networked mode. if (!$this->networked) { ?> <tr> <td><label for="show_avatars"><?php _e('Show avatars:', 'avatars'); ?> </label><br /><small><?php _e('Repeated from <i>Settings » Discussion</i>', 'avatars'); ?> </small></td> <td><input type="checkbox" name="show_avatars" <?php echo get_option('show_avatars') ? 'checked' : ''; ?> /></td> <td><small><?php _e('Enable Photos.', 'avatars'); ?> </small></td> </tr> <tr> <td><?php _e('Photo rating:', 'avatars'); ?> <br /><small><?php _e('Repeated from <i>Settings » Discussion</i>', 'avatars'); ?> </small></td> <td> <input type='radio' name='avatar_rating' value='G' <?php echo get_option('avatar_rating') == 'G' ? 'checked="checked"' : ''; ?> /> G <br /> <input type='radio' name='avatar_rating' value='PG' <?php echo get_option('avatar_rating') == 'PG' ? 'checked="checked"' : ''; ?> /> PG<br /> <input type='radio' name='avatar_rating' value='R' <?php echo get_option('avatar_rating') == 'R' ? 'checked="checked"' : ''; ?> /> R <br /> <input type='radio' name='avatar_rating' value='X' <?php echo get_option('avatar_rating') == 'X' ? 'checked="checked"' : ''; ?> /> X </td> <td> <small>- <?php _e('Suitable for all audiences', 'avatars'); ?> </small><br /> <small>- <?php _e('Possibly offensive, usually for audiences 13 and above', 'avatars'); ?> </small><br /> <small>- <?php _e('Intended for adult audiences above 17', 'avatars'); ?> </small><br /> <small>- <?php _e('Even more mature than above', 'avatars'); ?> </small> </td> </tr> <?php } ?> <tr> <td><label for="idAvatarSize"><?php _e('Size:', 'avatars'); ?> </label></td> <td style="width: 70px;"><select id="idAvatarSize" name='size'><?php for ($i = 10; $i <= 100; $i = $i + 10) { echo "<option value='{$i}'"; if ($i == $this->avatar_options['size']) { echo " selected"; } echo ">{$i}</option>"; } ?> </select></td> <td><label for="idAvatarSize">px</label></td> </tr> <?php if (class_exists('SimpleXMLElement')) { ?> <tr> <td><label for="idTwitter"><?php _e('Twitter Photo:', 'avatars'); ?> </label></td> <td><input type="checkbox" id="idTwitter" name="twitter" <?php echo $this->avatar_options['twitter'] == 'on' ? 'checked' : ''; ?> /></td> <td><small><label for="idTwitter"> <?php _e('Try to use <a href="http://twitter.com/" target="_blank">Twitter</a> avatar if no local is avatar defined.', 'avatars'); echo ' ', __('Order of precedence is; <i>Local</i>, <i>Twitter</i>, <i>Global</i>.', 'avatars'); ?> </label></small></td> </tr> <?php } if (!$this->networked) { ?> <tr> <td><?php _e('Gravatar default:', 'avatars'); ?> <br /><small><?php _e('Enhanced repeat from <i>Settings » Discussion</i>', 'avatars'); ?> </small></td> <td><?php echo get_avatar($wavatar, $this->avatar_options['size'], $wavatar); ?> </td> <td> <select name='wavatar'> <?php $avatar_defaults = array('custom' => __('none', 'avatars'), 'mystery' => __('Mystery Man'), 'blank' => __('Blank'), 'gravatar_default' => __('Gravatar Logo'), 'identicon' => __('Identicon'), 'wavatar' => __('Wavatar'), 'monsterid' => __('MonsterID'), 'retro' => __('Retro')); $avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults); $avatar_list = ''; foreach ($avatar_defaults as $default_key => $default_name) { $selected = $wavatar == $default_key ? 'selected' : ''; $avatar_list .= "\n\t<option value='" . esc_attr($default_key) . "' {$selected} >" . $default_name . "</option>"; } echo apply_filters('default_avatar_select', $avatar_list); ?> </select> <br /> <small><?php _e('Give users without Global or Local avatars a unique avatar.', 'avatars'); ?> </small> </td> </tr> <?php } ?> <tr> <td><label for="idAvatarDefault"><?php _e('Default image:', 'avatars'); ?> </label></td> <td><?php echo get_avatar('', '', $this->avatar_options['default']); ?> </td> <td> <input type='text' name='default' id="idAvatarDefault" value='<?php echo $this->avatar_options['default']; ?> ' size='70' /> <br /> <small><?php _e('The default avatar (a working URI) for users without Global or Local avatars. Used for trackbacks.', 'avatars'); ?> </small> </td> </tr> <tr> <td><label for="idAvatarSnapshots"><?php _e('Use Snapshots:', 'avatars'); ?> </label></td> <td><input type="checkbox" id="idAvatarSnapshots" name="snapshots" <?php echo $this->avatar_options['snapshots'] == 'on' ? 'checked' : ''; ?> /></td> <td><label for="idAvatarSnapshots"><small><?php _e('If you have enabled', 'avatars'); ?> <a href="http://www.snap.com">snapshots</a>, <?php _e('clearing this will disable them for avatar links.', 'avatars'); ?> </small></label></td> </tr> <tr> <td><label for="idAvatarInPosts"><?php _e('Photos in posts:', 'avatars'); ?> </label></td> <td><input type="checkbox" name="in_posts" id="idAvatarInPosts" <?php echo $this->avatar_options['in_posts'] == 'on' ? 'checked' : ''; ?> /></td> <td><label for="idAvatarInPosts"><small><?php _e('Replaces', 'avatars'); ?> </small><code><!-- avatar <b>e-mail</b> --></code><small> <?php _e('with an avatar for that email address in post content.', 'avatars'); ?> </small></label></td> </tr> <tr> <td><label for="idAvatarUploadAllowed"><?php _e('User uploads:', 'avatars'); ?> </label></td> <td><input type="checkbox" id="idAvatarUploadAllowed" name="upload_allowed" <?php echo $this->avatar_options['upload_allowed'] == 'on' ? 'checked' : ''; ?> /></td> <td> <input type='text' id="idAvatarUploadDir" name='upload_dir' value='<?php echo $this->avatar_options['upload_dir']; ?> ' size='70' /> <br /> <small><label for="idAvatarUploadDir"><?php _e('If allowed, use this directory for user avatar uploads, e.g.', 'avatars'); ?> <code>/avatars</code>. <?php _e('Must have write access and is relative to ', 'avatars'); ?> <code><?php echo $this->avatar_root(); ?> </code>.</label></small> <br /> <label for="idAvatarLegacy">Or, use legacy (v7.3 and lower) <code>$_SERVER['DOCUMENT_ROOT']</code> method </label><input type="checkbox" id="idAvatarLegacy" name="legacy" <?php echo $this->avatar_options['legacy'] == 'on' ? 'checked' : ''; ?> />, <?php _e('this option often helps when using sub-domains.', 'avatars'); ?> </td> </tr> <tr> <td><label for="idAvatarResize"><?php _e('Resize uploads:', 'avatars'); ?> </label></td> <td><input type="checkbox" id="idAvatarResize" name="resize" <?php if ($this->avatar_options['upload_allowed'] != 'on') { echo 'disabled="true"'; } ?> <?php echo $this->avatar_options['resize'] == 'on' ? 'checked' : ''; ?> /></td> <td> <label for="idAvatarResize"><small><?php _e('Non-square uploads will be cropped.', 'avatars'); ?> </small></label> <br /> <input type="checkbox" id="idAvatarUpsize" name="upsize" <?php echo $this->avatar_options['upsize'] == 'on' ? 'checked' : ''; ?> /> <label for="idAvatarUpsize"><?php _e('pad images smaller than <i>resize</i> set below with a white background? This option stops small images becoming pixelated.'); ?> </label> </td> </tr> <tr> <td><label for="idAvatarResizeSize"><?php _e('Resize uploads size:', 'avatars'); ?> </label></td> <td><select name='scale' id="idAvatarResize" <?php if ($this->avatar_options['resize'] != 'on' || $this->avatar_options['upload_allowed'] != 'on') { echo 'disabled="true"'; } ?> ><?php if (empty($this->avatar_options['scale'])) { $def = true; } else { $def = false; } for ($i = $this->avatar_options['size']; $i <= 200; $i = $i + 10) { echo "<option value='{$i}'"; if ($i == $this->avatar_options['scale'] || $def && $i == SCALED_SIZE) { echo " selected"; } echo ">{$i}</option>"; } ?> </select></td> <td><label for="idAvatarResize">px</label></td> </tr> <tr> <?php if (file_exists(ABSPATH . '/wp-content/plugins/profile/avatars-widget.php')) { ?> <td><?php _e('Enable user profile widget:', 'avatars'); ?> </td> <td><input type="checkbox" name="widget_enabled" <?php echo $this->avatar_options['widget_enabled'] == 'on' ? 'checked' : ''; ?> /></td> <td><small><?php _e('Enable the user profile widget; configure the widget at <i>Appearance » Widgets</i>.', 'avatars'); ?> </small></td> <?php } else { ?> <td colspan="3"></td> <?php } ?> </tr> <tr> <td><label for="idWrapAvatar"><?php _e('Wrap Photos with URL:', 'avatars'); ?> </label></td> <td><input type="checkbox" id="idWrapAvatar" name="url_wrap" <?php echo $this->avatar_options['url_wrap'] == 'on' ? 'checked' : ''; ?> /></td> <td><small><label for="idWrapAvatar"><?php _e("Wrap Photo with URL (from User's profile or Comment form data).", 'avatars'); ?> </label></small></td> </tr> <tr> <td><label for="idNickName"><?php _e('Nickname:', 'avatars'); ?> </label></td> <td><input type="checkbox" name="name" <?php echo $this->avatar_options['name'] == 'on' ? 'checked' : ''; ?> id="idNickName" /></td> <td> <input type='text' name='location' value='<?php echo empty($this->avatar_options['location']) ? 'website' : $this->avatar_options['location']; ?> ' size='10' id="idNickLocation" /> <br /> <small><label for="idNickLocation"><?php _e("User's nickname used for avatar titles (tooltip).", 'avatars'); ?> </label></small> </td> </tr> </table> <p class="submit"><input type="submit" name="submit" class="button-primary" value="<?php _e('Update Photo Options', 'avatars'); ?> " /></p> </form> </div> <style type="text/css"> table.form-table td { border-bottom: 1px solid #e3e3e3; padding-bottom: 1.25em !important; vertical-align: top; } </style> <?php }