function description() { if (is_home() || is_front_page()) { echo trim(of_get_option('site_description')); } elseif (is_category()) { $description = strip_tags(category_description()); echo trim($description); } elseif (is_single()) { if (get_the_excerpt()) { echo get_the_excerpt(); } else { global $post; $description = trim(str_replace(array("\r\n", "\r", "\n", " ", " "), " ", str_replace("\"", "'", strip_tags($post->post_content)))); echo mb_substr($description, 0, 220, 'utf-8'); } } elseif (is_search()) { echo '“'; the_search_query(); echo '”为您找到结果 '; global $wp_query; echo $wp_query->found_posts; echo ' 个'; } elseif (is_tag()) { $description = strip_tags(tag_description()); echo trim($description); } else { $description = strip_tags(term_description()); echo trim($description); } }
function widget($args, $instance) { ?> <div class="sidebar-section search"> <form class="cf searchform" method="get" action="<?php echo esc_url(home_url('/')); ?> "> <div> <label class="assistive-text" for="s"><?php _e('Search for:', OP_SN); ?> </label> <div class="search-text-input"><input type="text" value="<?php the_search_query(); ?> " name="s" id="s" /></div> <input type="submit" id="searchsubmit" value="<?php esc_attr_e('Search', OP_SN); ?> " /> </div> </form> </div> <?php }
function the_breadcrumb() { echo '<div class="e-breadcrumbs">'; echo '<a href="'; echo get_option('home'); echo '">'; bloginfo('name'); echo "</a>"; if (is_category() || is_single()) { echo " » "; the_category(' • '); if (is_single()) { echo " » "; the_title(); } } elseif (is_page()) { echo " » "; echo the_title(); } elseif (is_search()) { echo " » Search Results for... "; echo '"<em>'; echo the_search_query(); echo '</em>"'; } echo '</div>'; }
function widget($args, $instance) { extract($args); $categories = get_categories(); echo $before_widget; ?> <div class="widget"> <h4><?php echo apply_filters('widget_title', $instance['heading']); ?> </h4> <form action="<?php echo esc_url(home_url('/')); ?> " method="get"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="s" value="<?php the_search_query(); ?> "> <span class="input-group-btn"> <button class="btn" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> <?php echo $after_widget; }
function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $getimage = $instance['fotos_search_bg']; $getsearchbtn = $instance['fotos_search_btn']; $bgimage = $getimage ? sprintf('style="background:url(\'%s\') no-repeat;"', $getimage) : false; if (!empty($title)) { echo $before_title . $title . $after_title; } printf('<div class="fotos-custom-search-widget" %s>', $bgimage); ?> <form action="/" method="get" class="fotos-custom-search-form"> <fieldset> <input type="text" name="s" id="search" placeholder="search" value="<?php the_search_query(); ?> " /> <input type="image" alt="Search" src="<?php echo $getsearchbtn; ?> " /> </fieldset> </form> <?php printf('</div>'); echo $after_widget; }
function search_widget() { ?> <li id="search_widget" class="widget widget_search"> <?php if (!is_dynamic_sidebar()) { ?> <h2><?php _e('Etc', 'depo-masthead'); ?> </h2><?php } ?> <form method="get" id="searchform" action="<?php bloginfo('url'); ?> /"> <label class="hidden" for="s"><?php _e('Search for:'); ?> </label> <div><input type="text" value="<?php the_search_query(); ?> " name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form></li><?php }
function widget($args, $instance) { extract($args); echo $before_widget; $search_type = yit_get_option('search_type'); if (!is_shop_installed() && $search_type == 'product') { $search_type = 'post'; } ?> <form action="<?php echo home_url('/'); ?> " method="get" class="search_mini"> <input type="text" name="s" id="search_mini" value="<?php the_search_query(); ?> " placeholder="<?php if (is_shop_installed()) { _e('search for products', 'yit'); } else { _e('search for...', 'yit'); } ?> " /> <input type="hidden" name="post_type" value="<?php echo $search_type; ?> " /> <input type="submit" value="Search" id="mini-search-submit" /> </form> <?php echo $after_widget; }
function widget($args, $instance) { extract($args); echo $before_widget; $search_type = yit_get_option('search_type'); if (!is_shop_installed() && $search_type == 'product') { $search_type = 'post'; } ?> <a href="#" class="search_mini_button"></a> <div class="search_mini_content"> <span class="dropdown_arrow"></span> <?php if (defined('YITH_WCAS')) { ?> <?php echo do_shortcode('[yith_woocommerce_ajax_search]'); ?> <?php } else { ?> <form action="<?php echo home_url('/'); ?> " method="get" class="search_mini"> <input type="text" name="s" id="search_mini" value="<?php the_search_query(); ?> " placeholder="<?php if (is_shop_installed()) { _e('search for products', 'yit'); } else { _e('search for...', 'yit'); } ?> " /><input type="submit" value="" id="mini-search-submit" /> <input type="hidden" name="post_type" value="<?php echo $search_type; ?> " /> </form> <?php } ?> </div> <?php echo $after_widget; }
function widget($args, $instance) { extract($args); echo $before_widget; $search_for_product = apply_filters('yit_search_for_prod_label', __('search for products', 'yit')); $search_for = apply_filters('yit_searc_for_prod_label', __('search for...', 'yit')); $placeholder = is_shop_installed() ? $search_for_product : $search_for; if (defined('YITH_WCAS')) { ?> <?php echo do_shortcode('[yith_woocommerce_ajax_search]'); ?> <?php } else { $search_type = yit_get_option('search_type'); if (!is_shop_installed() && $search_type == 'product') { $search_type = 'post'; } ?> <form action="<?php echo home_url('/'); ?> " method="get" class="search_mini"> <input type="text" name="s" id="search_mini" value="<?php the_search_query(); ?> " placeholder="<?php echo $placeholder; ?> " /> <input type="hidden" name="post_type" value="<?php echo $search_type; ?> " /> <input type="submit" value="<?php _e('Search', 'yit'); ?> " id="mini-search-submit" /> </form> <?php } echo $after_widget; }
function the_qa_search_form() { ?> <form method="get" action="<?php echo qa_get_url('archive'); ?> "> <input type="text" name="s" value="<?php the_search_query(); ?> " /> <button><?php _e('Search', QA_TEXTDOMAIN); ?> </button> </form> <?php }
function rd_search($atts, $content) { extract(shortcode_atts(array('t_color' => '', 'bg_color' => '', 'b_color' => '', 'h_color' => '', 'placeholder' => 'Search', 'margin_top' => '0', 'margin_bottom' => '0', 'animation' => '', 'width' => '', 'radius' => '0'), $atts)); ob_start(); $id = RandomString(20); global $rd_data; if ($t_color == '') { $t_color = $rd_data['rd_content_text_color']; } if ($b_color == '') { $b_color = $rd_data['rd_content_border_color']; } if ($bg_color == '') { $bg_color = $rd_data['rd_content_bg_color']; } if ($h_color == '') { $h_color = $rd_data['rd_content_hover_color']; } if ($placeholder == '') { $placeholder = "Search"; } if ($width !== '') { echo '<style>#rd_' . $id . ' {width:' . $width . 'px;}</style>'; } echo '<style>#rd_' . $id . ' {margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px;}#rd_' . $id . ' #search input[type=text]{background:' . $bg_color . '; border:1px solid ' . $b_color . '; color:' . $t_color . '; border-radius:' . $radius . 'px;}#rd_' . $id . ' #search input[type=submit]{color:' . $t_color . '}#rd_' . $id . ' #search input[type=submit]:hover{color:' . $h_color . '}</style>'; echo '<div class="rd_search_sc ' . $animation . '" id="rd_' . $id . '"><div id="search">'; ?> <form method="get" action="<?php echo esc_url(home_url("")); ?> "><input type="text" name="s" placeholder="<?php echo esc_attr($placeholder); ?> " class="search" value="<?php echo the_search_query(); ?> "/><input type="submit" id="searchsubmit" value=""></form> </div></div> <?php $output_string = ob_get_contents(); ob_end_clean(); return $output_string; }
function wootique_header_search() { global $woo_options; ?> <div id="search-top"> <form role="search" method="get" id="searchform" class="searchform" action="<?php echo home_url(); ?> "> <label class="screen-reader-text" for="s"><?php _e('Search for:', 'woothemes'); ?> </label> <input type="text" value="<?php the_search_query(); ?> " name="s" id="s" class="field s" placeholder="<?php _e('Search for products', 'woothemes'); ?> " /> <input type="image" class="submit btn" name="submit" value="<?php _e('Search', 'woothemes'); ?> " src="<?php echo get_template_directory_uri(); ?> /images/ico-search.png"> <?php if ($woo_options['woo_header_search_scope'] == 'products') { echo '<input type="hidden" name="post_type" value="product" />'; } else { echo '<input type="hidden" name="post_type" value="post" />'; } ?> </form> <div class="fix"></div> </div><!-- /.search-top --> <?php }
function widget_chaostheory_search($args) { extract($args); if (empty($title)) { $title = __('Search', 'chaostheory'); } ?> <?php echo $before_widget; ?> <?php echo $before_title; ?> <label for="s"><?php echo $title; ?> </label><?php echo $after_title; ?> <form id="searchform" method="get" action="<?php echo home_url(); ?> "> <div> <input id="s" name="s" type="text" value="<?php the_search_query(); ?> " size="10" /> <input id="searchsubmit" type="submit" value="<?php esc_attr_e('Find »', 'chaostheory'); ?> " /> </div> </form> <?php echo $after_widget; ?> <?php }
function display($args) { extract($args); echo $before_widget; ?> <form method="get" id="searchform" action="<?php bloginfo('home'); ?> /"> <input class="text" type="text" value="<?php the_search_query(); ?> " name="s" id="s" /> <input class="button-secondary" type="submit" id="searchsubmit" value="<?php _e('Search', 'guangzhou'); ?> " /> </form> <?php echo $after_widget; }
function section_template() { if(is_category() || is_archive() || is_search()): ?> <div class="current_posts_info"> <?php if(is_search()):?> <?php _e("Search results for ", 'pagelines');?> <strong>"<?php the_search_query();?>"</strong> <?php elseif(is_category()):?> <?php _e("Currently viewing the category: ", 'pagelines');?> <strong>"<?php single_cat_title();?>"</strong> <?php elseif(is_tag()):?> <?php _e("Currently viewing the tag: ", 'pagelines');?> <strong>"<?php single_tag_title(''); ?>"</strong> <?php elseif(is_archive()):?> <?php if (is_author()) { global $author; global $author_name; $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); _e('Posts by:', 'pagelines'); ?> <strong><?php echo $curauth->display_name; ?></strong> <?php } elseif (is_day()) { ?> <?php _e('From the daily archives:', 'pagelines'); ?> <strong><?php the_time('l, F j, Y'); ?></strong> <?php } elseif (is_month()) { ?> <?php _e('From the monthly archives:', 'pagelines'); ?> <strong><?php the_time('F Y'); ?></strong> <?php } elseif (is_year()) { ?> <?php _e('From the yearly archives:', 'pagelines'); ?> <strong><?php the_time('Y'); ?></strong> <?php } else {?> <?php _e("Viewing archives for ", 'pagelines');?> <strong>"<?php the_date();?>"</strong> <?php } ?> <?php endif;?> </div> <?php endif; }
/** @see WP_Widget::widget */ function widget( $args, $instance ) { extract($args); $title = $instance['title']; $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ($title) echo $before_title . $title . $after_title; ?> <form role="search" method="get" id="searchform" action="<?php echo home_url(); ?>"> <div> <label class="screen-reader-text" for="s"><?php _e('Search for:', 'jigoshop'); ?></label> <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Search for products', 'jigoshop'); ?>" /> <input type="submit" id="searchsubmit" value="<?php _e('Search', 'jigoshop'); ?>" /> <input type="hidden" name="post_type" value="product" /> </div> </form> <?php echo $after_widget; }
function the_breadcrumb() { echo '<a href="'; echo home_url(); echo '" rel="nofollow">Home'; echo "</a>"; if (is_category() || is_single()) { echo " » "; the_category(' • '); if (is_single()) { echo " » "; the_title(); } } elseif (is_page()) { echo " » "; echo the_title(); } elseif (is_search()) { echo " » Search Results for... "; echo '"<em>'; echo the_search_query(); echo '</em>"'; } }
/** * bf_widget_search() - Search Widget Function * * Replaces the default search widget. * * @since 0.5.2 * @param mixed $args Widget options */ function bf_widget_search($args) { extract($args, EXTR_SKIP); echo $before_widget; echo $before_title . 'Search' . $after_title; ?> <form method="get" id="widgetsearch" action="<?php bloginfo('url'); ?> /"> <input type="text" value="<?php the_search_query(); ?> " name="s" id="s" size="20" onfocus="this.value=''" class="text" /> <input type="submit" id="searchsubmit" class="submit" value="<?php _e('Search', 'buffet'); ?> " /> </form> <?php echo $after_widget; }
_e('Not Found', 'plaintxtblog'); ?> </h2> <div class="entry-content"> <p><?php _e('Apologies, but we were unable to find what you were looking for. Perhaps the search box will help.', 'plaintxtblog'); ?> </p> </div> </div><!-- #post-0 .post --> <form id="error404-searchform" method="get" action="<?php bloginfo('home'); ?> "> <div> <input id="error404-s" name="s" type="text" value="<?php the_search_query(); ?> " size="40" /> <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Search', 'plaintxtblog'); ?> " /> </div> </form> </div><!-- #content .hfeed --> </div><!-- #container --> <?php get_sidebar(); get_footer();
function nggallery_manage_gallery_main() { global $ngg, $nggdb, $wp_query; //Build the pagination for more than 25 galleries if (!isset($_GET['paged']) || $_GET['paged'] < 1) { $_GET['paged'] = 1; } $start = ($_GET['paged'] - 1) * 25; $gallerylist = $nggdb->find_all_galleries('gid', 'asc', TRUE, 25, $start, false); $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => $nggdb->paged['max_objects_per_page'], 'current' => $_GET['paged'])); ?> <script type="text/javascript"> <!-- function checkAll(form) { for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") { if(form.elements[i].checked == true) form.elements[i].checked = false; else form.elements[i].checked = true; } } } } function getNumChecked(form) { var num = 0; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) num++; } } return num; } // this function check for a the number of selected images, sumbmit false when no one selected function checkSelected() { var numchecked = getNumChecked(document.getElementById('editgalleries')); if(numchecked < 1) { alert('<?php echo esc_js(__('No images selected', 'nggallery')); ?> '); return false; } actionId = jQuery('#bulkaction').val(); switch (actionId) { case "resize_images": showDialog('resize_images', '<?php echo esc_js(__('Resize images', 'nggallery')); ?> '); return false; break; case "new_thumbnail": showDialog('new_thumbnail', '<?php echo esc_js(__('Create new thumbnails', 'nggallery')); ?> '); return false; break; } return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s galleries \n \n 'Cancel' to stop, 'OK' to proceed.", 'nggallery')), "' + numchecked + '"); ?> '); } function showDialog( windowId, title ) { var form = document.getElementById('editgalleries'); var elementlist = ""; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) if (elementlist == "") elementlist = form.elements[i].value else elementlist += "," + form.elements[i].value ; } } jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val()); jQuery("#" + windowId + "_imagelist").val(elementlist); // now show the dialog jQuery( "#" + windowId ).dialog({ width: 640, resizable : false, modal: true, title: title }); jQuery("#" + windowId + ' .dialog-cancel').click(function() { jQuery( "#" + windowId ).dialog("close"); }); } function showAddGallery() { jQuery( "#addGallery").dialog({ width: 640, resizable : false, modal: true, title: '<?php echo esc_js(__('Add new gallery', 'nggallery')); ?> ' }); jQuery("#addGallery .dialog-cancel").click(function() { jQuery( "#addGallery" ).dialog("close"); }); } //--> </script> <div class="wrap"> <?php screen_icon('nextgen-gallery'); ?> <h2><?php echo _n('Gallery', 'Galleries', 2, 'nggallery'); ?> </h2> <form class="search-form" action="" method="get"> <p class="search-box"> <label class="hidden" for="media-search-input"><?php _e('Search Images', 'nggallery'); ?> :</label> <input type="hidden" id="page-name" name="page" value="nggallery-manage-gallery" /> <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php _e('Search Images', 'nggallery'); ?> " class="button" /> </p> </form> <form id="editgalleries" class="nggform" method="POST" action="<?php echo $ngg->manage_page->base_page . '&paged=' . $_GET['paged']; ?> " accept-charset="utf-8"> <?php wp_nonce_field('ngg_bulkgallery'); ?> <input type="hidden" name="page" value="manage-galleries" /> <div class="tablenav"> <div class="alignleft actions"> <?php if (function_exists('json_encode')) { ?> <select name="bulkaction" id="bulkaction"> <option value="no_action" ><?php _e("Bulk actions", 'nggallery'); ?> </option> <option value="delete_gallery" ><?php _e("Delete", 'nggallery'); ?> </option> <option value="set_watermark" ><?php _e("Set watermark", 'nggallery'); ?> </option> <option value="new_thumbnail" ><?php _e("Create new thumbnails", 'nggallery'); ?> </option> <option value="resize_images" ><?php _e("Resize images", 'nggallery'); ?> </option> <option value="import_meta" ><?php _e("Import metadata", 'nggallery'); ?> </option> <option value="recover_images" ><?php _e("Recover from backup", 'nggallery'); ?> </option> </select> <input name="showThickbox" class="button-secondary" type="submit" value="<?php _e('Apply', 'nggallery'); ?> " onclick="if ( !checkSelected() ) return false;" /> <?php } ?> <?php if (current_user_can('NextGEN Upload images') && nggGallery::current_user_can('NextGEN Add new gallery')) { ?> <input name="doaction" class="button-secondary action" type="submit" onclick="showAddGallery(); return false;" value="<?php _e('Add new gallery', 'nggallery'); ?> "/> <?php } ?> </div> <?php if ($page_links) { ?> <div class="tablenav-pages"><?php $page_links_text = sprintf('<span class="displaying-num">' . __('Displaying %s–%s of %s') . '</span>%s', number_format_i18n(($_GET['paged'] - 1) * $nggdb->paged['objects_per_page'] + 1), number_format_i18n(min($_GET['paged'] * $nggdb->paged['objects_per_page'], $nggdb->paged['total_objects'])), number_format_i18n($nggdb->paged['total_objects']), $page_links); echo $page_links_text; ?> </div> <?php } ?> </div> <table class="widefat" cellspacing="0"> <thead> <tr> <?php print_column_headers('nggallery-manage-galleries'); ?> </tr> </thead> <tfoot> <tr> <?php print_column_headers('nggallery-manage-galleries', false); ?> </tr> </tfoot> <tbody> <?php if ($gallerylist) { //get the columns $gallery_columns = ngg_manage_gallery_columns(); $hidden_columns = get_hidden_columns('nggallery-manage-images'); $num_columns = count($gallery_columns) - count($hidden_columns); foreach ($gallerylist as $gallery) { $alternate = !isset($alternate) || $alternate == 'class="alternate"' ? '' : 'class="alternate"'; $gid = $gallery->gid; $name = empty($gallery->title) ? $gallery->name : $gallery->title; $author_user = get_userdata((int) $gallery->author); ?> <tr id="gallery-<?php echo $gid; ?> " <?php echo $alternate; ?> > <?php foreach ($gallery_columns as $gallery_column_key => $column_display_name) { $class = "class=\"{$gallery_column_key} column-{$gallery_column_key}\""; $style = ''; if (in_array($gallery_column_key, $hidden_columns)) { $style = ' style="display:none;"'; } $attributes = "{$class}{$style}"; switch ($gallery_column_key) { case 'cb': ?> <th scope="row" class="cb column-cb"> <?php if (nggAdmin::can_manage_this_gallery($gallery->author)) { ?> <input name="doaction[]" type="checkbox" value="<?php echo $gid; ?> " /> <?php } ?> </th> <?php break; case 'id': ?> <td <?php echo $attributes; ?> scope="row"><?php echo $gid; ?> </td> <?php break; case 'title': ?> <td> <?php if (nggAdmin::can_manage_this_gallery($gallery->author)) { ?> <a href="<?php echo wp_nonce_url($ngg->manage_page->base_page . '&mode=edit&gid=' . $gid, 'ngg_editgallery'); ?> " class='edit' title="<?php _e('Edit'); ?> " > <?php echo nggGallery::i18n($name); ?> </a> <?php } else { ?> <?php echo nggGallery::i18n($gallery->title); ?> <?php } ?> </td> <?php break; case 'description': ?> <td <?php echo $attributes; ?> ><?php echo nggGallery::i18n($gallery->galdesc); ?> </td> <?php break; case 'author': ?> <td <?php echo $attributes; ?> ><?php echo $author_user->display_name; ?> </td> <?php break; case 'page_id': ?> <td <?php echo $attributes; ?> ><?php echo $gallery->pageid; ?> </td> <?php break; case 'quantity': ?> <td <?php echo $attributes; ?> ><?php echo $gallery->counter; ?> </td> <?php break; default: ?> <td <?php echo $attributes; ?> ><?php do_action('ngg_manage_gallery_custom_column', $gallery_column_key, $gid); ?> </td> <?php break; } } ?> </tr> <?php } } else { echo '<tr><td colspan="7" align="center"><strong>' . __('No entries found', 'nggallery') . '</strong></td></tr>'; } ?> </tbody> </table> <div class="tablenav"> <?php if ($page_links) { ?> <div class="tablenav-pages"><?php $page_links_text = sprintf('<span class="displaying-num">' . __('Displaying %s–%s of %s') . '</span>%s', number_format_i18n(($_GET['paged'] - 1) * $nggdb->paged['objects_per_page'] + 1), number_format_i18n(min($_GET['paged'] * $nggdb->paged['objects_per_page'], $nggdb->paged['total_objects'])), number_format_i18n($nggdb->paged['total_objects']), $page_links); echo $page_links_text; ?> </div> <?php } ?> </div> </form> </div> <!-- #addGallery --> <div id="addGallery" style="display: none;" > <form id="form-tags" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_addgallery'); ?> <input type="hidden" name="page" value="manage-galleries" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr> <td> <strong><?php _e('New Gallery', 'nggallery'); ?> :</strong> <input type="text" size="35" name="galleryname" value="" /><br /> <?php if (!is_multisite()) { ?> <?php _e('Create a new , empty gallery below the folder', 'nggallery'); ?> <strong><?php echo $ngg->options['gallerypath']; ?> </strong><br /> <?php } ?> <i>( <?php _e('Allowed characters for file and folder names are', 'nggallery'); ?> : a-z, A-Z, 0-9, -, _ )</i> </td> </tr> <tr align="right"> <td class="submit"> <input class="button-primary" type="submit" name="addgallery" value="<?php _e('OK', 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#addGallery --> <!-- #resize_images --> <div id="resize_images" style="display: none;" > <form id="form-resize-images" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="resize_images_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="resize_images_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-galleries" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <td> <strong><?php _e('Resize Images to', 'nggallery'); ?> :</strong> </td> <td> <input type="text" size="5" name="imgWidth" value="<?php echo $ngg->options['imgWidth']; ?> " /> x <input type="text" size="5" name="imgHeight" value="<?php echo $ngg->options['imgHeight']; ?> " /> <br /><small><?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size', 'nggallery'); ?> </small> </td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_ResizeImages" value="<?php _e('OK', 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#resize_images --> <!-- #new_thumbnail --> <div id="new_thumbnail" style="display: none;" > <form id="form-new-thumbnail" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="new_thumbnail_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="new_thumbnail_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-galleries" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <th align="left"><?php _e('Width x height (in pixel)', 'nggallery'); ?> </th> <td><input type="text" size="5" maxlength="5" name="thumbwidth" value="<?php echo $ngg->options['thumbwidth']; ?> " /> x <input type="text" size="5" maxlength="5" name="thumbheight" value="<?php echo $ngg->options['thumbheight']; ?> " /> <br /><small><?php _e('These values are maximum values ', 'nggallery'); ?> </small></td> </tr> <tr valign="top"> <th align="left"><?php _e('Set fix dimension', 'nggallery'); ?> </th> <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> /> <br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails', 'nggallery'); ?> </small></td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#new_thumbnail --> <?php }
function widget_sandbox_search($args) { extract($args); $options = get_option('widget_sandbox_search'); $title = empty($options['title']) ? __('Search', 'sandbox') : attribute_escape($options['title']); $button = empty($options['button']) ? __('Find', 'sandbox') : attribute_escape($options['button']); ?> <?php echo $before_widget; ?> <?php echo $before_title; ?> <label for="s"><?php echo $title; ?> </label><?php echo $after_title; ?> <form id="searchform" class="blog-search" method="get" action="<?php bloginfo('home'); ?> "> <div> <input id="s" name="s" type="text" class="text" value="<?php the_search_query(); ?> " size="10" tabindex="1" /> <input type="submit" class="button" value="<?php echo $button; ?> " tabindex="2" /> </div> </form> <?php echo $after_widget; }
/** * {@internal Missing Short Description}} * * @since 2.5.0 * * @param array $errors */ function media_upload_library_form($errors) { global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; media_upload_header(); $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0; $form_action_url = admin_url("media-upload.php?type={$type}&tab=library&post_id={$post_id}"); /** This filter is documented in wp-admin/includes/media.php */ $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); $form_class = 'media-upload-form validate'; if (get_user_setting('uploader')) { $form_class .= ' html-uploader'; } $q = $_GET; $q['posts_per_page'] = 10; $q['paged'] = isset($q['paged']) ? intval($q['paged']) : 0; if ($q['paged'] < 1) { $q['paged'] = 1; } $q['offset'] = ($q['paged'] - 1) * 10; if ($q['offset'] < 1) { $q['offset'] = 0; } list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query($q); ?> <form id="filter" action="" method="get"> <input type="hidden" name="type" value="<?php echo esc_attr($type); ?> " /> <input type="hidden" name="tab" value="<?php echo esc_attr($tab); ?> " /> <input type="hidden" name="post_id" value="<?php echo (int) $post_id; ?> " /> <input type="hidden" name="post_mime_type" value="<?php echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : ''; ?> " /> <input type="hidden" name="context" value="<?php echo isset($_GET['context']) ? esc_attr($_GET['context']) : ''; ?> " /> <p id="media-search" class="search-box"> <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media'); ?> :</label> <input type="search" id="media-search-input" name="s" value="<?php the_search_query(); ?> " /> <?php submit_button(__('Search Media'), 'button', '', false); ?> </p> <ul class="subsubsub"> <?php $type_links = array(); $_num_posts = (array) wp_count_attachments(); $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); foreach ($matches as $_type => $reals) { foreach ($reals as $real) { if (isset($num_posts[$_type])) { $num_posts[$_type] += $_num_posts[$real]; } else { $num_posts[$_type] = $_num_posts[$real]; } } } // If available type specified by media button clicked, filter by that type if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) { $_GET['post_mime_type'] = $type; list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); } if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') { $class = ' class="current"'; } else { $class = ''; } $type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . '"' . $class . '>' . __('All Types') . '</a>'; foreach ($post_mime_types as $mime_type => $label) { $class = ''; if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) { continue; } if (isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type'])) { $class = ' class="current"'; } $type_links[] = '<li><a href="' . esc_url(add_query_arg(array('post_mime_type' => $mime_type, 'paged' => false))) . '"' . $class . '>' . sprintf(translate_nooped_plural($label[2], $num_posts[$mime_type]), '<span id="' . $mime_type . '-counter">' . number_format_i18n($num_posts[$mime_type]) . '</span>') . '</a>'; } /** * Filter the media upload mime type list items. * * Returned values should begin with an <li> tag. * * @since 3.1.0 * * @param array $type_links An array of list items containing mime type link HTML. */ echo implode(' | </li>', apply_filters('media_upload_mime_type_links', $type_links)) . '</li>'; unset($type_links); ?> </ul> <div class="tablenav"> <?php $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => ceil($wp_query->found_posts / 10), 'current' => $q['paged'])); if ($page_links) { echo "<div class='tablenav-pages'>{$page_links}</div>"; } ?> <div class="alignleft actions"> <?php $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM {$wpdb->posts} WHERE post_type = 'attachment' ORDER BY post_date DESC"; $arc_result = $wpdb->get_results($arc_query); $month_count = count($arc_result); $selected_month = isset($_GET['m']) ? $_GET['m'] : 0; if ($month_count && !(1 == $month_count && 0 == $arc_result[0]->mmonth)) { ?> <select name='m'> <option<?php selected($selected_month, 0); ?> value='0'><?php _e('All dates'); ?> </option> <?php foreach ($arc_result as $arc_row) { if ($arc_row->yyear == 0) { continue; } $arc_row->mmonth = zeroise($arc_row->mmonth, 2); if ($arc_row->yyear . $arc_row->mmonth == $selected_month) { $default = ' selected="selected"'; } else { $default = ''; } echo "<option{$default} value='" . esc_attr($arc_row->yyear . $arc_row->mmonth) . "'>"; echo esc_html($wp_locale->get_month($arc_row->mmonth) . " {$arc_row->yyear}"); echo "</option>\n"; } ?> </select> <?php } ?> <?php submit_button(__('Filter »'), 'button', 'post-query-submit', false); ?> </div> <br class="clear" /> </div> </form> <form enctype="multipart/form-data" method="post" action="<?php echo esc_url($form_action_url); ?> " class="<?php echo $form_class; ?> " id="library-form"> <?php wp_nonce_field('media-form'); //media_upload_form( $errors ); ?> <script type="text/javascript"> <!-- jQuery(function($){ var preloaded = $(".media-item.preloaded"); if ( preloaded.length > 0 ) { preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');}); updateMediaForm(); } }); --> </script> <div id="media-items"> <?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); echo get_media_items(null, $errors); ?> </div> <p class="ml-submit"> <?php submit_button(__('Save all changes'), 'button savebutton', 'save', false); ?> <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?> " /> </p> </form> <?php }
<?php get_header(); ?> <div style="clear: both"></div> <div id="container"> <div id="contents"> <h1><?php the_search_query();?> </h1> <?php get_template_part( 'loop' ); ?> <div style="clear: both"></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
/** * {@internal Missing Short Description}} * * @since unknown * * @param unknown_type $errors */ function media_upload_library_form($errors) { global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; media_upload_header(); $post_id = intval($_REQUEST['post_id']); $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=library&post_id={$post_id}"); $_GET['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 0; if ($_GET['paged'] < 1) { $_GET['paged'] = 1; } $start = ($_GET['paged'] - 1) * 10; if ($start < 1) { $start = 0; } add_filter('post_limits', $limit_filter = create_function('$a', "return 'LIMIT {$start}, 10';")); list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); ?> <form id="filter" action="" method="get"> <input type="hidden" name="type" value="<?php echo esc_attr($type); ?> " /> <input type="hidden" name="tab" value="<?php echo esc_attr($tab); ?> " /> <input type="hidden" name="post_id" value="<?php echo (int) $post_id; ?> " /> <input type="hidden" name="post_mime_type" value="<?php echo isset($_GET['post_mime_type']) ? esc_attr($_GET['post_mime_type']) : ''; ?> " /> <p id="media-search" class="search-box"> <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media'); ?> :</label> <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php esc_attr_e('Search Media'); ?> " class="button" /> </p> <ul class="subsubsub"> <?php $type_links = array(); $_num_posts = (array) wp_count_attachments(); $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); foreach ($matches as $_type => $reals) { foreach ($reals as $real) { if (isset($num_posts[$_type])) { $num_posts[$_type] += $_num_posts[$real]; } else { $num_posts[$_type] = $_num_posts[$real]; } } } // If available type specified by media button clicked, filter by that type if (empty($_GET['post_mime_type']) && !empty($num_posts[$type])) { $_GET['post_mime_type'] = $type; list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); } if (empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all') { $class = ' class="current"'; } else { $class = ''; } $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type' => 'all', 'paged' => false, 'm' => false))) . "'{$class}>" . __('All Types') . "</a>"; foreach ($post_mime_types as $mime_type => $label) { $class = ''; if (!wp_match_mime_types($mime_type, $avail_post_mime_types)) { continue; } if (isset($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type'])) { $class = ' class="current"'; } $type_links[] = "<li><a href='" . esc_url(add_query_arg(array('post_mime_type' => $mime_type, 'paged' => false))) . "'{$class}>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='{$mime_type}-counter'>" . number_format_i18n($num_posts[$mime_type]) . '</span>') . '</a>'; } echo implode(' | </li>', $type_links) . '</li>'; unset($type_links); ?> </ul> <div class="tablenav"> <?php $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => ceil($wp_query->found_posts / 10), 'current' => $_GET['paged'])); if ($page_links) { echo "<div class='tablenav-pages'>{$page_links}</div>"; } ?> <div class="alignleft actions"> <?php $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM {$wpdb->posts} WHERE post_type = 'attachment' ORDER BY post_date DESC"; $arc_result = $wpdb->get_results($arc_query); $month_count = count($arc_result); if ($month_count && !(1 == $month_count && 0 == $arc_result[0]->mmonth)) { ?> <select name='m'> <option<?php selected(@$_GET['m'], 0); ?> value='0'><?php _e('Show all dates'); ?> </option> <?php foreach ($arc_result as $arc_row) { if ($arc_row->yyear == 0) { continue; } $arc_row->mmonth = zeroise($arc_row->mmonth, 2); if ($arc_row->yyear . $arc_row->mmonth == $_GET['m']) { $default = ' selected="selected"'; } else { $default = ''; } echo "<option{$default} value='" . esc_attr($arc_row->yyear . $arc_row->mmonth) . "'>"; echo esc_html($wp_locale->get_month($arc_row->mmonth) . " {$arc_row->yyear}"); echo "</option>\n"; } ?> </select> <?php } ?> <input type="submit" id="post-query-submit" value="<?php echo esc_attr(__('Filter »')); ?> " class="button-secondary" /> </div> <br class="clear" /> </div> </form> <form enctype="multipart/form-data" method="post" action="<?php echo esc_attr($form_action_url); ?> " class="media-upload-form validate" id="library-form"> <?php wp_nonce_field('media-form'); //media_upload_form( $errors ); ?> <script type="text/javascript"> <!-- jQuery(function($){ var preloaded = $(".media-item.preloaded"); if ( preloaded.length > 0 ) { preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');}); updateMediaForm(); } }); --> </script> <div id="media-items"> <?php add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2); echo get_media_items(null, $errors); ?> </div> <p class="ml-submit"> <input type="submit" class="button savebutton" name="save" value="<?php esc_attr_e('Save all changes'); ?> " /> <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?> " /> </p> </form> <?php }
<div class="hfeed"> <div id="post-0" class="post hentry p1"> <h3 class="entry-title"> <?php _e('On the other hand', 'webjournal') ?> </h3> <div class="entry-content"> <p><?php _e('I have five fingers.', 'webjournal') ?></p> </div> <!--form id="error404-searchform" method="get" action="<?php bloginfo('home') ?>"> <div> <input id="error404-s" name="s" type="text" value="<?php the_search_query() ?>" size="40" /> <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Search', 'webjournal') ?>" /> </div> </form--> </div><!-- #post-0 .post --> </div><!-- .hfeed --> </div><!-- #content --> </div><!-- #container --> <?php get_sidebar() ?> <?php get_footer() ?>
/** * WP Page - Mass edit tags * */ public static function pageMassEditTags() { global $wpdb, $wp_locale, $wp_query; list($post_stati, $avail_post_stati) = self::edit_data_query(); if (!isset($_GET['paged'])) { $_GET['paged'] = 1; } // Display message settings_errors(__CLASS__); ?> <div class="wrap"> <?php SimpleTags_Admin::boxSelectorTaxonomy('st_mass_terms'); ?> <form id="posts-filter" action="" method="get"> <input type="hidden" name="page" value="st_mass_terms" /> <input type="hidden" name="taxo" value="<?php echo esc_attr(SimpleTags_Admin::$taxonomy); ?> " /> <input type="hidden" name="cpt" value="<?php echo esc_attr(SimpleTags_Admin::$post_type); ?> " /> <h2><?php _e('Mass edit terms', 'simpletags'); ?> </h2> <ul class="subsubsub"> <?php $status_links = array(); $num_posts = wp_count_posts(SimpleTags_Admin::$post_type, 'readable'); $class = empty($_GET['post_status']) && empty($_GET['post_type']) ? ' class="current"' : ''; $status_links[] = '<li><a href="' . admin_url('tools.php') . '?page=st_mass_terms&cpt=' . SimpleTags_Admin::$post_type . '&taxo=' . SimpleTags_Admin::$taxonomy . '"' . $class . '>' . __('All', 'simpletags') . '</a>'; foreach ($post_stati as $status => $label) { $class = ''; if (!in_array($status, $avail_post_stati)) { continue; } if (empty($num_posts->{$status})) { continue; } if (isset($_GET['post_status']) && $status == $_GET['post_status']) { $class = ' class="current"'; } $status_links[] = '<li><a href="' . admin_url('tools.php') . '?page=st_mass_terms&cpt=' . SimpleTags_Admin::$post_type . '&taxo=' . SimpleTags_Admin::$taxonomy . '&post_status=' . $status . '"' . $class . '>' . sprintf(_n($label[2][0], $label[2][1], (int) $num_posts->{$status}), number_format_i18n($num_posts->{$status})) . '</a>'; } echo implode(' |</li>', $status_links) . '</li>'; unset($status_links); $class = !empty($_GET['post_type']) ? ' class="current"' : ''; ?> </ul> <?php if (isset($_GET['post_status'])) { ?> <input type="hidden" name="post_status" value="<?php echo esc_attr($_GET['post_status']); ?> " /> <?php } ?> <p class="search-box"> <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php _e('Search', 'simpletags'); ?> " class="button" /> </p> <div class="tablenav"> <?php $posts_per_page = isset($_GET['posts_per_page']) ? (int) $_GET['posts_per_page'] : 0; if ((int) $posts_per_page == 0) { $posts_per_page = 15; } $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'total' => ceil($wp_query->found_posts / $posts_per_page), 'current' => (int) $_GET['paged'])); if ($page_links) { echo "<div class='tablenav-pages'>{$page_links}</div>"; } ?> <div style="float: left"> <?php if (!is_singular()) { $arc_result = $wpdb->get_results($wpdb->prepare("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM {$wpdb->posts} WHERE post_type = %s ORDER BY post_date DESC", SimpleTags_Admin::$post_type)); $month_count = count($arc_result); if (!isset($_GET['m'])) { $_GET['m'] = ''; } if ($month_count && !(1 == $month_count && 0 == $arc_result[0]->mmonth)) { ?> <select name='m'> <option<?php selected(@$_GET['m'], 0); ?> value='0'><?php _e('Show all dates', 'simpletags'); ?> </option> <?php foreach ($arc_result as $arc_row) { if ($arc_row->yyear == 0) { continue; } $arc_row->mmonth = zeroise($arc_row->mmonth, 2); if ($arc_row->yyear . $arc_row->mmonth == $_GET['m']) { $default = ' selected="selected"'; } else { $default = ''; } echo "<option{$default} value='{$arc_row->yyear}{$arc_row->mmonth}'>"; echo $wp_locale->get_month($arc_row->mmonth) . " {$arc_row->yyear}"; echo "</option>\n"; } ?> </select> <?php } ?> <select name="posts_per_page" id="posts_per_page"> <option <?php if (!isset($_GET['posts_per_page'])) { echo 'selected="selected"'; } ?> value=""><?php _e('Quantity…', 'simpletags'); ?> </option> <option <?php selected($posts_per_page, 10); ?> value="10">10</option> <option <?php selected($posts_per_page, 20); ?> value="20">20</option> <option <?php selected($posts_per_page, 30); ?> value="30">30</option> <option <?php selected($posts_per_page, 40); ?> value="40">40</option> <option <?php selected($posts_per_page, 50); ?> value="50">50</option> <option <?php selected($posts_per_page, 100); ?> value="100">100</option> <option <?php selected($posts_per_page, 200); ?> value="200">200</option> </select> <input type="submit" id="post-query-submit" value="<?php _e('Filter', 'simpletags'); ?> " class="button-secondary" /> <?php } ?> </div> <br style="clear:both;" /> </div> </form> <br style="clear:both;" /> <?php if (have_posts()) { add_filter('the_title', 'esc_html'); ?> <form name="post" id="post" method="post"> <table class="widefat post fixed"> <thead> <tr> <th class="manage-column"><?php _e('Post title', 'simpletags'); ?> </th> <th class="manage-column"><?php printf(__('Terms : %s', 'simpletags'), esc_html(SimpleTags_Admin::$taxo_name)); ?> </th> </tr> </thead> <tbody> <?php $class = 'alternate'; while (have_posts()) { the_post(); $class = $class == 'alternate' ? '' : 'alternate'; ?> <tr valign="top" class="<?php echo $class; ?> "> <th scope="row"><a href="<?php echo admin_url('post.php?action=edit&post=' . get_the_ID()); ?> " title="<?php _e('Edit', 'simpletags'); ?> "><?php echo get_the_title() == '' ? the_ID() : the_title(); ?> </a></th> <td><input id="tags-input<?php the_ID(); ?> " class="autocomplete-input tags_input" type="text" size="100" name="tags[<?php the_ID(); ?> ]" value="<?php echo SimpleTags_Admin::getTermsToEdit(SimpleTags_Admin::$taxonomy, get_the_ID()); ?> " /></td> </tr> <?php } ?> </tbody> </table> <p class="submit"> <input type="hidden" name="secure_mass" value="<?php echo wp_create_nonce('st_mass_terms'); ?> " /> <input class="button-primary" type="submit" name="update_mass" value="<?php _e('Update all »', 'simpletags'); ?> " /> </p> </form> <?php } else { ?> <p><?php _e('No content to edit.', 'simpletags'); ?> <?php } ?> <p><?php _e('Visit the <a href="https://github.com/herewithme/simple-tags">plugin\'s homepage</a> for further details. If you find a bug, or have a fantastic idea for this plugin, <a href="mailto:amaury@wordpress-fr.net">ask me</a> !', 'simpletags'); ?> </p> <?php SimpleTags_Admin::printAdminFooter(); ?> </div> <?php do_action('simpletags-mass_terms', SimpleTags_Admin::$taxonomy); }
/** * Create the content for the 404 Error page * * Located in 404.php * Override: childtheme_override_404_content */ function thematic_404_content() { ?> <?php thematic_postheader(); ?> <div class="entry-content"> <p><?php _e('Apologies, but we were unable to find what you were looking for. Perhaps searching will help.', 'thematic'); ?> </p> </div><!-- .entry-content --> <form id="error404-searchform" method="get" action="<?php echo home_url(); ?> /"> <div> <input id="error404-s" name="s" type="text" value="<?php the_search_query(); ?> " size="40" /> <input id="error404-searchsubmit" name="searchsubmit" type="submit" value="<?php esc_attr_e('Find', 'thematic'); ?> " /> </div> </form> <?php }
function nggallery_picturelist() { // *** show picture list global $wpdb, $nggdb, $user_ID, $ngg; // Look if its a search result $is_search = isset($_GET['s']) ? true : false; $counter = 0; $wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images'); if ($is_search) { // fetch the imagelist $picturelist = $ngg->manage_page->search_result; // we didn't set a gallery or a pagination $act_gid = 0; $_GET['paged'] = 1; $page_links = false; } else { // GET variables $act_gid = $ngg->manage_page->gid; // Load the gallery metadata $gallery = $nggdb->find_gallery($act_gid); if (!$gallery) { nggGallery::show_error(__('Gallery not found.', 'nggallery')); return; } // Check if you have the correct capability if (!nggAdmin::can_manage_this_gallery($gallery->author)) { nggGallery::show_error(__('Sorry, you have no access here', 'nggallery')); return; } // look for pagination $_GET['paged'] = isset($_GET['paged']) && $_GET['paged'] > 0 ? absint($_GET['paged']) : 1; $start = ($_GET['paged'] - 1) * 50; // get picture values $picturelist = $nggdb->get_gallery($act_gid, $ngg->options['galSort'], $ngg->options['galSortDir'], false, 50, $start); // get the current author $act_author_user = get_userdata((int) $gallery->author); } // list all galleries $gallerylist = $nggdb->find_all_galleries(); //get the columns $image_columns = $wp_list_table->get_columns(); $hidden_columns = get_hidden_columns('nggallery-manage-images'); $num_columns = count($image_columns) - count($hidden_columns); $attr = nggGallery::current_user_can('NextGEN Edit gallery options') ? '' : 'disabled="disabled"'; ?> <script type="text/javascript"> <!-- function showDialog( windowId, title ) { var form = document.getElementById('updategallery'); var elementlist = ""; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) if (elementlist == "") elementlist = form.elements[i].value; else elementlist += "," + form.elements[i].value ; } } jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val()); jQuery("#" + windowId + "_imagelist").val(elementlist); // now show the dialog jQuery( "#" + windowId ).dialog({ width: 640, resizable : false, modal: true, title: title, position: { my: 'center', at: 'center', of: window.parent } }); jQuery("#" + windowId + ' .dialog-cancel').click(function() { jQuery( "#" + windowId ).dialog("close"); }); } jQuery(function (){ jQuery('span.tooltip, label.tooltip').tooltip(); // load a content via ajax jQuery('a.ngg-dialog').click(function() { var dialogs = jQuery('.ngg-overlay-dialog:visible'); if (dialogs.size() > 0) { return false; } if ( jQuery( "#spinner" ).length == 0) { jQuery("body").append('<div id="spinner"></div>'); } var $this = jQuery(this); var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href); var width = ( results ) ? results[1] : 600; var results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href); var height = ( results ) ? results[1] : 440; var container = window; if (window.parent) { container = window.parent; } jQuery('#spinner').fadeIn(); jQuery('#spinner').position({ my: "center", at: "center", of: container }); var dialog = jQuery('<div class="ngg-overlay-dialog" style="display:hidden"></div>').appendTo('body'); // load the remote content dialog.load( this.href, {}, function () { jQuery('#spinner').hide(); dialog.dialog({ title: ($this.attr('title')) ? $this.attr('title') : '', position: { my: "center", at: "center", of: container }, width: width, height: height, modal: true, resizable: false, close: function() { dialog.remove(); } }).width(width - 30).height(height - 30); } ); //prevent the browser to follow the link return false; }); }); function checkAll(form) { for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") { if(form.elements[i].checked == true) form.elements[i].checked = false; else form.elements[i].checked = true; } } } } function getNumChecked(form) { var num = 0; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) num++; } } return num; } // this function check for a the number of selected images, sumbmit false when no one selected function checkSelected() { var numchecked = getNumChecked(document.getElementById('updategallery')); if (typeof document.activeElement == "undefined" && document.addEventListener) { document.addEventListener("focus", function (e) { document.activeElement = e.target; }, true); } if ( document.activeElement.name == 'post_paged' ) return true; if(numchecked < 1) { alert('<?php echo esc_js(__('No images selected', 'nggallery')); ?> '); return false; } actionId = jQuery('#bulkaction').val(); switch (actionId) { case "copy_to": showDialog('selectgallery', '<?php echo esc_js(__('Copy image to...', 'nggallery')); ?> '); return false; break; case "move_to": showDialog('selectgallery', '<?php echo esc_js(__('Move image to...', 'nggallery')); ?> '); return false; break; case "add_tags": showDialog('entertags', '<?php echo esc_js(__('Add new tags', 'nggallery')); ?> '); return false; break; case "delete_tags": showDialog('entertags', '<?php echo esc_js(__('Delete tags', 'nggallery')); ?> '); return false; break; case "overwrite_tags": showDialog('entertags', '<?php echo esc_js(__('Overwrite', 'nggallery')); ?> '); return false; break; case "resize_images": showDialog('resize_images', '<?php echo esc_js(__('Resize images', 'nggallery')); ?> '); return false; break; case "new_thumbnail": showDialog('new_thumbnail', '<?php echo esc_js(__('Create new thumbnails', 'nggallery')); ?> '); return false; break; } return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.", 'nggallery')), "' + numchecked + '"); ?> '); } jQuery(document).ready( function($) { if ($(this).data('ready')) return; // close postboxes that should be closed jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); postboxes.add_postbox_toggles('ngg-manage-gallery'); $(this).data('ready', true); }); //--> </script> <div class="wrap"> <?php //include('templates/social_media_buttons.php'); screen_icon('nextgen-gallery'); if ($is_search) { ?> <h2><?php printf(__('Search results for “%s”', 'nggallery'), esc_html(get_search_query())); ?> </h2> <form class="search-form" action="" method="get"> <p class="search-box"> <label class="hidden" for="media-search-input"><?php _e('Search Images', 'nggallery'); ?> :</label> <input type="hidden" id="page-name" name="page" value="nggallery-manage-gallery" /> <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php _e('Search Images', 'nggallery'); ?> " class="button" /> </p> </form> <br style="clear: both;" /> <form id="updategallery" class="nggform" method="POST" action="<?php echo $ngg->manage_page->base_page . '&mode=edit&s=' . get_search_query(); ?> " accept-charset="utf-8"> <?php wp_nonce_field('ngg_updategallery'); ?> <input type="hidden" name="page" value="manage-images" /> <?php } else { ?> <h2><?php echo _n('Gallery', 'Galleries', 1, 'nggallery'); ?> : <?php echo esc_html(nggGallery::i18n($gallery->title)); ?> </h2> <br style="clear: both;" /> <form id="updategallery" class="nggform" method="POST" action="<?php echo $ngg->manage_page->base_page . '&mode=edit&gid=' . $act_gid . '&paged=' . $_GET['paged']; ?> " accept-charset="utf-8"> <?php wp_nonce_field('ngg_updategallery'); ?> <input type="hidden" name="page" value="manage-images" /> <?php if (nggGallery::current_user_can('NextGEN Edit gallery options')) { ?> <div id="poststuff"> <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> <div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?> " > <h3><?php _e('Gallery settings', 'nggallery'); ?> <small> (<?php _e('Click here for more settings', 'nggallery'); ?> )</small></h3> <div class="inside"> <table class="form-table" > <tr> <th align="left"><?php _e('Title'); ?> :</th> <th align="left"><input <?php nggGallery::current_user_can_form('NextGEN Edit gallery title'); ?> type="text" size="50" name="title" value="<?php echo esc_attr(stripslashes($gallery->title)); ?> " /></th> <th align="right"><?php _e('Page Link to', 'nggallery'); ?> :</th> <th align="left"> <select <?php nggGallery::current_user_can_form('NextGEN Edit gallery page id'); ?> name="pageid" style="width:95%"> <option value="0" ><?php _e('Not linked', 'nggallery'); ?> </option> <?php foreach (get_pages() as $page) { ?> <option <?php selected($gallery->pageid, $page->ID); ?> value="<?php echo esc_attr($page->ID); ?> "><?php echo esc_html($page->post_title); ?> </option> <?php } ?> </select> </th> </tr> <tr> <th align="left"><?php _e('Description'); ?> :</th> <th align="left"><textarea <?php nggGallery::current_user_can_form('NextGEN Edit gallery description'); ?> name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php echo esc_attr(stripslashes($gallery->galdesc)); ?> </textarea></th> <th align="right"><?php _e('Preview image', 'nggallery'); ?> :</th> <th align="left"> <select <?php nggGallery::current_user_can_form('NextGEN Edit gallery preview pic'); ?> name="previewpic" style="width:95%" > <option value="0" ><?php _e('No Picture', 'nggallery'); ?> </option> <?php // ensure that a preview pic from a other page is still shown here if (intval($gallery->previewpic) != 0) { if (!array_key_exists($gallery->previewpic, $picturelist)) { $previewpic = $nggdb->find_image($gallery->previewpic); if ($previewpic) { echo '<option value="' . $previewpic->pid . '" selected="selected" >' . $previewpic->pid . ' - ' . esc_attr($previewpic->filename) . '</option>' . "\n"; } } } if (is_array($picturelist)) { foreach ($picturelist as $picture) { if ($picture->exclude) { continue; } $selected = $picture->pid == $gallery->previewpic ? 'selected="selected" ' : ''; echo '<option value="' . $picture->pid . '" ' . $selected . '>' . $picture->pid . ' - ' . esc_attr($picture->filename) . '</option>' . "\n"; } } ?> </select> </th> </tr> <tr> <th align="left"><?php _e('Path', 'nggallery'); ?> :</th> <th align="left"><input readonly="readonly" type="text" size="50" name="path" value="<?php echo $gallery->path; ?> " /></th> <th align="right"><?php _e('Author', 'nggallery'); ?> :</th> <th align="left"> <?php $editable_ids = $ngg->manage_page->get_editable_user_ids($user_ID); if ($editable_ids && count($editable_ids) > 1 && nggGallery::current_user_can('NextGEN Edit gallery author')) { wp_dropdown_users(array('include' => $editable_ids, 'name' => 'author', 'selected' => empty($gallery->author) ? 0 : $gallery->author)); } else { echo $act_author_user->display_name; } ?> </th> </tr> <?php if (current_user_can('publish_pages')) { ?> <tr> <th align="left"> </th> <th align="left"> </th> <th align="right"> <label for='ngg_settings_parent_id' class='tooltip' title="Clicking <?php _e('Add Page'); ?> will create a new page with the same name as this gallery and will display the gallery on that new page. You can create a sub-page by selecting the parent page from the drop down."> <?php _e('Create new page', 'nggallery'); ?> : </label> </th> <th align="left"> <select name="parent_id" style="width:95%" id='ngg_settings_parent_id'> <option value="0"><?php _e('Main page (No parent)', 'nggallery'); ?> </option> <?php foreach (get_pages() as $page) { ?> <option value="<?php echo esc_attr($page->ID); ?> "><?php echo esc_html($page->post_title); ?> </option> <?php } ?> </select> <input class="button-secondary action" type="submit" name="addnewpage" value="<?php _e('Add page', 'nggallery'); ?> " id="group"/> </th> </tr> <?php } ?> <?php do_action('ngg_manage_gallery_settings', $act_gid); ?> </table> <div class="submit"> <?php if (wpmu_enable_function('wpmuScanFolder') && nggGallery::current_user_can('NextGEN Scan folder')) { ?> <input type="submit" class="button-secondary" name="scanfolder" value="<?php _e("Scan Folder for new images", 'nggallery'); ?> " /> <?php } ?> <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes", 'nggallery'); ?> " /> </div> </div> </div> </div> <!-- poststuff --> <?php } ?> <?php } ?> <div class="tablenav top ngg-tablenav"> <?php $ngg->manage_page->pagination('top', $_GET['paged'], $nggdb->paged['total_objects'], $nggdb->paged['objects_per_page']); ?> <div class="alignleft actions"> <select id="bulkaction" name="bulkaction"> <option value="no_action" ><?php _e("Bulk actions", 'nggallery'); ?> </option> <option value="set_watermark" ><?php _e("Set watermark", 'nggallery'); ?> </option> <option value="new_thumbnail" ><?php _e("Create new thumbnails", 'nggallery'); ?> </option> <option value="resize_images" ><?php _e("Resize images", 'nggallery'); ?> </option> <option value="recover_images" ><?php _e("Recover from backup", 'nggallery'); ?> </option> <option value="delete_images" ><?php _e("Delete images", 'nggallery'); ?> </option> <option value="import_meta" ><?php _e("Import metadata", 'nggallery'); ?> </option> <option value="rotate_cw" ><?php _e("Rotate images clockwise", 'nggallery'); ?> </option> <option value="rotate_ccw" ><?php _e("Rotate images counter-clockwise", 'nggallery'); ?> </option> <option value="copy_to" ><?php _e("Copy to...", 'nggallery'); ?> </option> <option value="move_to"><?php _e("Move to...", 'nggallery'); ?> </option> <option value="add_tags" ><?php _e("Add tags", 'nggallery'); ?> </option> <option value="delete_tags" ><?php _e("Delete tags", 'nggallery'); ?> </option> <option value="overwrite_tags" ><?php _e("Overwrite tags", 'nggallery'); ?> </option> </select> <input class="button-secondary" type="submit" name="showThickbox" value="<?php _e('Apply', 'nggallery'); ?> " onclick="if ( !checkSelected() ) return false;" /> <?php if ($ngg->options['galSort'] == "sortorder" && !$is_search) { ?> <input class="button-secondary" type="submit" name="sortGallery" value="<?php _e('Sort gallery', 'nggallery'); ?> " /> <?php } ?> <input type="submit" name="updatepictures" class="button-primary action" value="<?php _e('Save Changes', 'nggallery'); ?> " /> </div> </div> <table id="ngg-listimages" class="widefat fixed" cellspacing="0" > <thead> <tr> <?php $wp_list_table->print_column_headers(true); ?> </tr> </thead> <tfoot> <tr> <?php $wp_list_table->print_column_headers(false); ?> </tr> </tfoot> <tbody id="the-list"> <?php if ($picturelist) { $thumbsize = ''; if ($ngg->options['thumbfix']) { $thumbsize = 'width="' . $ngg->options['thumbwidth'] . '" height="' . $ngg->options['thumbheight'] . '"'; } foreach ($picturelist as $picture) { //for search result we need to check the capatibiliy if (!nggAdmin::can_manage_this_gallery($picture->author) && $is_search) { continue; } $counter++; $pid = (int) $picture->pid; $alternate = !isset($alternate) || $alternate == 'alternate' ? '' : 'alternate'; $exclude = $picture->exclude ? 'checked="checked"' : ''; $date = mysql2date(get_option('date_format'), $picture->imagedate); $time = mysql2date(get_option('time_format'), $picture->imagedate); ?> <tr id="picture-<?php echo $pid; ?> " class="<?php echo $alternate; ?> iedit" valign="top"> <?php foreach ($image_columns as $image_column_key => $column_display_name) { $class = "class='{$image_column_key} column-{$image_column_key}'"; $style = ''; if (in_array($image_column_key, $hidden_columns)) { $style = ' style="display:none;"'; } $attributes = $class . $style; switch ($image_column_key) { case 'cb': $attributes = 'class="column-cb check-column"' . $style; ?> <th <?php echo $attributes; ?> scope="row"><input name="doaction[]" type="checkbox" value="<?php echo $pid; ?> " /></th> <?php break; case 'id': ?> <td <?php echo $attributes; ?> style=""><?php echo $pid; ?> <input type="hidden" name="pid[]" value="<?php echo $pid; ?> " /> </td> <?php break; case 'filename': $attributes = 'class="title column-filename column-title"' . $style; ?> <td <?php echo $attributes; ?> > <strong><a href="<?php echo nextgen_esc_url($picture->imageURL); ?> " class="thickbox" title="<?php echo esc_attr($picture->filename); ?> "> <?php echo empty($picture->alttext) ? esc_html($picture->filename) : esc_html(stripslashes(nggGallery::i18n($picture->alttext))); ?> </a></strong> <br /><?php echo $date; ?> <?php if (!empty($picture->meta_data)) { ?> <br /><?php echo $picture->meta_data['width']; ?> x <?php echo $picture->meta_data['height']; ?> <?php _e('pixel', 'nggallery'); ?> <?php } ?> <p> <?php $actions = array(); $actions['view'] = '<a class="shutter" href="' . nextgen_esc_url($picture->imageURL) . '" title="' . esc_attr(sprintf(__('View "%s"'), sanitize_title($picture->filename))) . '">' . __('View', 'nggallery') . '</a>'; $actions['meta'] = '<a class="ngg-dialog" href="' . NGGALLERY_URLPATH . 'admin/showmeta.php?id=' . $pid . '" title="' . __('Show Meta data', 'nggallery') . '">' . __('Meta', 'nggallery') . '</a>'; $actions['custom_thumb'] = '<a class="ngg-dialog" href="' . NGGALLERY_URLPATH . 'admin/edit-thumbnail.php?id=' . $pid . '" title="' . __('Customize thumbnail', 'nggallery') . '">' . __('Edit thumb', 'nggallery') . '</a>'; $actions['rotate'] = '<a class="ngg-dialog" href="' . NGGALLERY_URLPATH . 'admin/rotate.php?id=' . $pid . '" title="' . __('Rotate', 'nggallery') . '">' . __('Rotate', 'nggallery') . '</a>'; if (current_user_can('publish_posts')) { $actions['publish'] = '<a class="ngg-dialog" href="' . NGGALLERY_URLPATH . 'admin/publish.php?id=' . $pid . '&h=230" title="' . __('Publish this image', 'nggallery') . '">' . __('Publish', 'nggallery') . '</a>'; } if (file_exists($picture->imagePath . '_backup')) { $actions['recover'] = '<a class="confirmrecover" href="' . wp_nonce_url("admin.php?page=nggallery-manage-gallery&mode=recoverpic&gid=" . $act_gid . "&pid=" . $pid, 'ngg_recoverpicture') . '" title="' . __('Recover', 'nggallery') . '" onclick="javascript:check=confirm( \'' . esc_attr(sprintf(__('Recover "%s" ?', 'nggallery'), $picture->filename)) . '\');if(check==false) return false;">' . __('Recover', 'nggallery') . '</a>'; } $actions['delete'] = '<a class="submitdelete" href="' . wp_nonce_url("admin.php?page=nggallery-manage-gallery&mode=delpic&gid=" . $act_gid . "&pid=" . $pid, 'ngg_delpicture') . '" class="delete column-delete" onclick="javascript:check=confirm( \'' . esc_attr(sprintf(__('Delete "%s" ?', 'nggallery'), $picture->filename)) . '\');if(check==false) return false;">' . __('Delete') . '</a>'; $action_count = count($actions); $i = 0; echo '<div class="row-actions">'; foreach ($actions as $action => $link) { ++$i; $i == $action_count ? $sep = '' : ($sep = ' | '); echo "<span class='{$action}'>{$link}{$sep}</span>"; } echo '</div>'; ?> </p> </td> <?php break; case 'thumbnail': $attributes = 'class="id column-thumbnail media-icon"' . $style; ?> <td <?php echo $attributes; ?> ><a href="<?php echo nextgen_esc_url(add_query_arg('i', mt_rand(), $picture->imageURL)); ?> " class="shutter" title="<?php echo $picture->filename; ?> "> <img class="thumb" src="<?php echo nextgen_esc_url(add_query_arg('i', mt_rand(), $picture->thumbURL)); ?> " id="thumb<?php echo $pid; ?> " /> </a> </td> <?php break; case 'alt_title_desc': ?> <td <?php echo $attributes; ?> > <input name="alttext[<?php echo $pid; ?> ]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo esc_attr(stripslashes($picture->alttext)); ?> " /><br/> <textarea name="description[<?php echo $pid; ?> ]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo esc_attr(stripslashes($picture->description)); ?> </textarea> </td> <?php break; case 'exclude': ?> <td <?php echo $attributes; ?> ><input name="exclude[<?php echo $pid; ?> ]" type="checkbox" value="1" <?php echo $exclude; ?> /></td> <?php break; case 'tags': $picture->tags = wp_get_object_terms($pid, 'ngg_tag', 'fields=names'); if (is_array($picture->tags)) { $picture->tags = implode(', ', $picture->tags); } ?> <td <?php echo $attributes; ?> ><textarea name="tags[<?php echo $pid; ?> ]" style="width:95%;" rows="2"><?php echo $picture->tags; ?> </textarea></td> <?php break; default: ?> <td <?php echo $attributes; ?> ><?php do_action('ngg_manage_image_custom_column', $image_column_key, $pid); ?> </td> <?php break; } ?> <?php } ?> </tr> <?php } } // In the case you have no capaptibility to see the search result if ($counter == 0) { echo '<tr><td colspan="' . $num_columns . '" align="center"><strong>' . __('No entries found', 'nggallery') . '</strong></td></tr>'; } ?> </tbody> </table> <div class="tablenav bottom"> <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e('Save Changes', 'nggallery'); ?> " /> <?php $ngg->manage_page->pagination('bottom', $_GET['paged'], $nggdb->paged['total_objects'], $nggdb->paged['objects_per_page']); ?> </div> </form> <br class="clear"/> </div><!-- /#wrap --> <!-- #entertags --> <div id="entertags" style="display: none;" > <form id="form-tags" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="entertags_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="entertags_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr> <th><?php _e("Enter the tags", 'nggallery'); ?> : <input name="taglist" type="text" style="width:90%" value="" /></th> </tr> <tr align="right"> <td class="submit"> <input class="button-primary" type="submit" name="TB_EditTags" value="<?php _e("OK", 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e("Cancel", 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#entertags --> <!-- #selectgallery --> <div id="selectgallery" style="display: none;" > <form id="form-select-gallery" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="selectgallery_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="selectgallery_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr> <th> <?php _e('Select the destination gallery:', 'nggallery'); ?> <select name="dest_gid" style="width:90%" > <?php foreach ($gallerylist as $gallery) { if ($gallery->gid != $act_gid) { ?> <option value="<?php echo $gallery->gid; ?> " ><?php echo $gallery->gid; ?> - <?php echo esc_attr(stripslashes($gallery->title)); ?> </option> <?php } } ?> </select> </th> </tr> <tr align="right"> <td class="submit"> <input type="submit" class="button-primary" name="TB_SelectGallery" value="<?php _e("OK", 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value="<?php _e("Cancel", 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#selectgallery --> <!-- #resize_images --> <div id="resize_images" style="display: none;" > <form id="form-resize-images" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="resize_images_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="resize_images_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <td> <strong><?php _e('Resize Images to', 'nggallery'); ?> :</strong> </td> <td> <input type="text" size="5" name="imgWidth" value="<?php echo $ngg->options['imgWidth']; ?> " /> x <input type="text" size="5" name="imgHeight" value="<?php echo $ngg->options['imgHeight']; ?> " /> <br /><small><?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size', 'nggallery'); ?> </small> </td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_ResizeImages" value="<?php _e('OK', 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#resize_images --> <!-- #new_thumbnail --> <div id="new_thumbnail" style="display: none;" > <form id="form-new-thumbnail" method="POST" accept-charset="utf-8"> <?php wp_nonce_field('ngg_thickbox_form'); ?> <input type="hidden" id="new_thumbnail_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="new_thumbnail_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <th align="left"><?php _e('Width x height (in pixel)', 'nggallery'); ?> </th> <td> <?php include dirname(__FILE__) . '/thumbnails-template.php'; ?> </td> </tr> <tr valign="top"> <th align="left"><?php _e('Set fix dimension', 'nggallery'); ?> </th> <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> /> <br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails', 'nggallery'); ?> </small></td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'nggallery'); ?> " /> <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> </td> </tr> </table> </form> </div> <!-- /#new_thumbnail --> <script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function(){columns.init('nggallery-manage-images');}); /* ]]> */ </script> <?php }
function flag_picturelist() { // *** show picture list global $wpdb, $flagdb, $user_ID, $flag; // Look if its a search result $is_search = isset($_GET['s']) ? true : false; if ($is_search) { // fetch the imagelist $picturelist = $flag->manage_page->search_result; // we didn't set a gallery or a pagination $act_gid = 0; $_GET['paged'] = 1; $page_links = false; } else { // GET variables $act_gid = $flag->manage_page->gid; // Load the gallery metadata $gallery = $flagdb->find_gallery($act_gid); if (!$gallery) { flagGallery::show_error(__('Gallery not found.', 'flash-album-gallery')); return; } // Check if you have the correct capability if (!flagAdmin::can_manage_this_gallery($gallery->author)) { flagGallery::show_error(__('Sorry, you have no access here', 'flash-album-gallery')); return; } // look for pagination if (!isset($_GET['paged']) || intval($_GET['paged']) < 1) { $_GET['paged'] = 1; } $_GET['paged'] = intval($_GET['paged']); $start = ($_GET['paged'] - 1) * 50; // get picture values $picturelist = $flagdb->get_gallery($act_gid, $flag->options['galSort'], $flag->options['galSortDir'], false, 50, $start); // build pagination $page_links = paginate_links(array('base' => add_query_arg('paged', '%#%'), 'format' => '', 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => $flagdb->paged['max_objects_per_page'], 'current' => $_GET['paged'])); // get the current author $act_author_user = get_userdata((int) $gallery->author); } // list all galleries $gallerylist = $flagdb->find_all_galleries(); //get the columns $gallery_columns = flag_manage_gallery_columns(); $hidden_columns = get_hidden_columns('flag-manage-images'); $hidden_columns = array_filter($hidden_columns); if ($picturelist) { $a_hits = array(); foreach ($picturelist as $p) { $a_hits[] = $p->hitcounter; } if (!array_sum($a_hits)) { $hidden_columns[] = 'views_likes'; $hidden_columns[] = 'rating'; } } else { $hidden_columns[] = 'views_likes'; $hidden_columns[] = 'rating'; } $num_columns = count($gallery_columns) - count($hidden_columns); ?> <!--[if lt IE 8]> <style type="text/css"> .custom_thumb { display : none; } </style> <![endif]--> <script type="text/javascript"> //<![CDATA[ function showDialog( windowId, height ) { var form = document.getElementById('updategallery'); var elementlist = ""; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) if (elementlist == "") elementlist = form.elements[i].value; else elementlist += "," + form.elements[i].value ; } } jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val()); jQuery("#" + windowId + "_imagelist").val(elementlist); // console.log (jQuery("#TB_imagelist").val()); tb_show("", "#TB_inline?width=640&height=" + height + "&inlineId=" + windowId + "&modal=true", false); } function checkAll(form) { for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") { if(form.elements[i].checked == true) form.elements[i].checked = false; else form.elements[i].checked = true; } } } } function getNumChecked(form) { var num = 0; for (i = 0, n = form.elements.length; i < n; i++) { if(form.elements[i].type == "checkbox") { if(form.elements[i].name == "doaction[]") if(form.elements[i].checked == true) num++; } } return num; } // this function check for a the number of selected images, sumbmit false when no one selected function checkSelected() { var numchecked = getNumChecked(document.getElementById('updategallery')); if(numchecked < 1) { alert('<?php echo esc_js(__("No images selected", "flash-album-gallery")); ?> '); return false; } actionId = jQuery('#bulkaction').val(); switch (actionId) { case "copy_to": case "move_to": showDialog('selectgallery', 120); return false; break; case "resize_images": showDialog('resize_images', 120); return false; break; case "new_thumbnail": showDialog('new_thumbnail', 160); return false; break; } return confirm('<?php echo sprintf(esc_js(__("You are about to start the bulk edit for %s images \n \n 'Cancel' to stop, 'OK' to proceed.", 'flash-album-gallery')), "' + numchecked + '"); ?> '); } jQuery(document).ready( function() { // close postboxes that should be closed jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); postboxes.add_postbox_toggles('flag-manage-gallery'); }); //]]> </script> <div class="flag-wrap"> <?php if ($is_search) { ?> <h2><?php printf(__('Search results for “%s”', 'flash-album-gallery'), esc_html(stripslashes(get_search_query()))); ?> </h2> <form class="search-form" action="" method="get"> <p class="search-box"> <label class="hidden" for="media-search-input"><?php _e('Search Images', 'flash-album-gallery'); ?> :</label> <input type="hidden" id="page-name" name="page" value="flag-manage-gallery" /> <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?> " /> <input type="submit" value="<?php _e('Search Images', 'flash-album-gallery'); ?> " class="button" /> </p> </form> <br style="clear: both;" /> <form id="updategallery" class="flagform" method="POST" action="<?php echo esc_url($flag->manage_page->base_page . '&mode=edit&s=' . urlencode(get_search_query())); ?> " accept-charset="utf-8"> <?php wp_nonce_field('flag_updategallery'); ?> <input type="hidden" name="page" value="manage-images" /> <?php } else { ?> <h2><?php echo _n('Gallery', 'Galleries', 1, 'flash-album-gallery'); ?> : <?php echo esc_html($gallery->title); ?> </h2> <select name="select_gid" style="width:180px; float: right; margin: -20px 3px 0 0;" onchange="window.location.href=this.options[this.selectedIndex].value"> <option selected="selected"><?php _e('Choose another gallery', 'flash-album-gallery'); ?> </option> <?php foreach ($gallerylist as $gal) { if ($gal->gid != $act_gid) { ?> <option value="<?php echo wp_nonce_url($flag->manage_page->base_page . "&mode=edit&gid=" . $gal->gid, 'flag_editgallery'); ?> " ><?php if ($flag->options['albSort'] == 'gid') { echo $gal->gid . ' - '; } echo esc_html(stripslashes($gal->title)); if ($flag->options['albSort'] == 'title') { echo ' (' . $gal->gid . ')'; } ?> </option> <?php } } ?> </select> <form id="updategallery" class="flagform" method="POST" action="<?php echo $flag->manage_page->base_page . '&mode=edit&gid=' . $act_gid . '&paged=' . intval($_GET['paged']); ?> " accept-charset="utf-8"> <?php wp_nonce_field('flag_updategallery'); ?> <input type="hidden" name="page" value="manage-images" /> <div id="poststuff" class="metabox-holder"> <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> <div id="post-body"><div id="post-body-content"><div id="normal-sortables" class="meta-box-sortables ui-sortable" style="position: relative;"> <div id="flagalleryset" class="postbox <?php echo postbox_classes('flagalleryset', 'flag-manage-gallery'); ?> " > <div class="handlediv" title="Click to toggle"><br/></div> <h3 class="hndle"><span><?php _e('Gallery settings', 'flash-album-gallery'); ?> </span></h3> <div class="inside"> <table class="flag-form-table" > <tr> <th align="right" scope="row"><?php _e('Title', 'flash-album-gallery'); ?> :</th> <td> </td> <td align="left"><input type="text" size="50" name="title" value="<?php echo esc_html($gallery->title); ?> " /></td> </tr> <tr> <th align="right" valign="top" scope="row"><?php _e('Description', 'flash-album-gallery'); ?> :</th> <td> </td> <td align="left"><textarea name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php echo esc_html($gallery->galdesc); ?> </textarea></td> </tr> <tr> <th align="right" scope="row"><?php _e('Path', 'flash-album-gallery'); ?> :</th> <td> </td> <td align="left"><input <?php if (IS_WPMU) { echo 'readonly = "readonly"'; } ?> type="text" size="50" name="path" value="<?php echo esc_attr($gallery->path); ?> " /></td> </tr> <tr> <th align="right" scope="row"><?php _e('Author', 'flash-album-gallery'); ?> :</th> <td> </td> <td align="left"> <?php $editable_ids = $flag->manage_page->get_editable_user_ids($user_ID); if ($editable_ids && count($editable_ids) > 1) { wp_dropdown_users(array('include' => $editable_ids, 'name' => 'author', 'selected' => empty($gallery->author) ? 0 : $gallery->author)); } else { echo $act_author_user->display_name; } ?> <input type="hidden" name="previewpic" value="<?php if (is_array($picturelist)) { echo $picturelist[0]->pid; } ?> " /> </td> </tr> </table> <div class="submit"> <input type="submit" class="button-secondary" name="scanfolder" value="<?php _e("Scan Folder for new images", 'flash-album-gallery'); ?> " /> <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes", 'flash-album-gallery'); ?> " /> </div> <div class="clear"></div> </div> </div> </div></div></div> </div> <!-- poststuff --> <?php } ?> <div class="tablenav flag-tablenav"> <?php if ($page_links) { ?> <div class="tablenav-pages"><?php $page_links_text = sprintf('<span class="displaying-num">' . __('Displaying %s–%s of %s') . '</span>%s', number_format_i18n(($_GET['paged'] - 1) * $flagdb->paged['objects_per_page'] + 1), number_format_i18n(min($_GET['paged'] * $flagdb->paged['objects_per_page'], $flagdb->paged['total_objects'])), number_format_i18n($flagdb->paged['total_objects']), $page_links); echo $page_links_text; ?> </div> <?php } ?> <div class="alignleft actions"> <select id="bulkaction" name="bulkaction" class="alignleft"> <option value="no_action" ><?php _e("No action", 'flash-album-gallery'); ?> </option> <option value="webview_images" ><?php _e("Create images optimized for web", 'flash-album-gallery'); ?> </option> <option value="new_thumbnail" ><?php _e("Create new thumbnails", 'flash-album-gallery'); ?> </option> <option value="resize_images" ><?php _e("Resize images", 'flash-album-gallery'); ?> </option> <option value="delete_images" ><?php _e("Delete images", 'flash-album-gallery'); ?> </option> <option value="import_meta" ><?php _e("Import metadata", 'flash-album-gallery'); ?> </option> <option value="copy_meta" ><?php _e("Metadata to description", 'flash-album-gallery'); ?> </option> <option value="copy_to" ><?php _e("Copy to...", 'flash-album-gallery'); ?> </option> <option value="move_to"><?php _e("Move to...", 'flash-album-gallery'); ?> </option> <option value="reset_counters"><?php _e("Reset Views & Likes counters", 'flash-album-gallery'); ?> </option> <?php do_action('flag_manage_images_bulkaction'); ?> </select> <input class="button-secondary alignleft" style="margin-right:10px;" type="submit" name="showThickbox" value="<?php _e("OK", 'flash-album-gallery'); ?> " onclick="if ( !checkSelected() ) return false;" /> <?php if ($flag->options['galSort'] == "sortorder" && !$is_search) { ?> <a href="<?php echo wp_nonce_url($flag->manage_page->base_page . "&mode=sort&gid=" . $act_gid, 'flag_sortgallery'); ?> " class="button-secondary alignleft" style="margin:1px 10px 0 0;"><?php _e("Sort gallery", 'flash-album-gallery'); ?> </a> <?php } if (current_user_can('FlAG Upload images') && !$is_search) { ?> <a href="<?php echo wp_nonce_url($flag->manage_page->base_page . "&gid=" . $act_gid . "&tabs=1", 'flag_addimages'); ?> " class="button-secondary alignleft" style="margin:1px 10px 0 0;"><?php _e("Add Images", 'flash-album-gallery'); ?> </a> <?php } ?> <input type="submit" name="updatepictures" class="button-primary action alignleft" value="<?php _e("Save Changes", 'flash-album-gallery'); ?> " /> </div> </div> <table id="flag-listimages" class="widefat fixed flag-table" cellspacing="0" > <thead> <tr> <?php foreach ($gallery_columns as $key => $value) { if (in_array($key, $hidden_columns)) { continue; } echo $cols = '<th class="manage-column column-' . $key . '">' . $value . '</td>'; } ?> </tr> </thead> <tfoot> <tr> <?php foreach ($gallery_columns as $key => $value) { if (in_array($key, $hidden_columns)) { continue; } if ($key == 'cb') { $value = ''; } echo $cols = '<th class="manage-column column-' . $key . '">' . $value . '</td>'; } ?> </tr> </tfoot> <tbody> <?php $counter = 0; if ($picturelist) { $rt = array(24.5, 45.7, 54.8, 59.3, 64.7, 68.90000000000001, 71.5, 73.7, 75.90000000000001, 77.09999999999999); foreach ($picturelist as $picture) { //for search result we need to check the capatibiliy if (!flagAdmin::can_manage_this_gallery($picture->author) && $is_search) { continue; } $hits = intval($picture->hitcounter); $votes = intval($picture->total_votes); $counter++; $pid = (int) $picture->pid; $alternate = !isset($alternate) || $alternate == 'alternate' ? '' : 'alternate'; $exclude = $picture->exclude ? 'checked="checked"' : ''; $date = mysql2date(get_option('date_format'), $picture->imagedate); $time = mysql2date(get_option('time_format'), $picture->imagedate); ?> <tr id="picture-<?php echo $pid; ?> " class="<?php echo $alternate; ?> iedit" valign="top"> <?php foreach ($gallery_columns as $gallery_column_key => $column_display_name) { $class = "class=\"{$gallery_column_key} column-{$gallery_column_key}\""; $style = ''; if (in_array($gallery_column_key, $hidden_columns)) { continue; } $attributes = "{$class}{$style}"; switch ($gallery_column_key) { case 'cb': ?> <th <?php echo $attributes; ?> scope="row"><input name="doaction[]" type="checkbox" value="<?php echo $pid; ?> " /></th> <?php break; case 'id': ?> <td <?php echo $attributes; ?> ><?php echo $pid; ?> <input type="hidden" name="pid[]" value="<?php echo $pid; ?> " /> </td> <?php break; case 'thumbnail': ?> <td <?php echo $attributes; ?> ><a href="<?php echo $picture->imageURL; ?> " class="thickbox" title="<?php echo $picture->filename; ?> "> <img class="thumb" src="<?php echo $picture->thumbURL; ?> " id="thumb-<?php echo $pid; ?> " /> </a> </td> <?php break; case 'filename': ?> <td <?php echo $attributes; ?> > <strong><a href="<?php echo $picture->imageURL; ?> " class="thickbox" title="<?php echo $picture->filename; ?> "> <?php echo $picture->filename; ?> </a></strong> <br /><?php echo $date; ?> <?php if (!empty($picture->meta_data['width'])) { echo '<br />' . __('Image size: ', 'flash-album-gallery') . $picture->meta_data['width'] . 'x' . $picture->meta_data['height']; } else { $imgpath = WINABSPATH . $picture->path . "/" . $picture->filename; $img = @getimagesize($imgpath); if ($img) { echo '<br />' . __('Image size: ', 'flash-album-gallery') . $img[0] . 'x' . $img[1]; } } ?> <?php if (!empty($picture->meta_data['thumbnail'])) { echo '<br />' . __('Thumbnail size: ', 'flash-album-gallery') . $picture->meta_data['thumbnail']['width'] . 'x' . $picture->meta_data['thumbnail']['height']; } ?> <?php if (!empty($picture->meta_data['webview'])) { echo '<br />' . __('Optimized size: ', 'flash-album-gallery') . $picture->meta_data['webview'][0] . 'x' . $picture->meta_data['webview'][1]; } else { echo '<br />' . __('Optimized size: ', 'flash-album-gallery') . __('not optimized ', 'flash-album-gallery'); } ?> <p> <?php $actions = array(); $actions['view'] = '<a class="thickbox" href="' . $picture->imageURL . '" title="' . esc_attr(sprintf(__('View "%s"'), $picture->filename)) . '">' . __('View', 'flash-album-gallery') . '</a>'; $actions['meta'] = '<a class="thickbox" href="' . FLAG_URLPATH . 'admin/showmeta.php?id=' . $pid . '" title="' . __('Show Meta data', 'flash-album-gallery') . '">' . __('Meta', 'flash-album-gallery') . '</a>'; $actions['custom_thumb'] = '<a class="thickbox" href="' . FLAG_URLPATH . 'admin/manage_thumbnail.php?id=' . $pid . '" title="' . __('Customize thumbnail', 'flash-album-gallery') . '">' . __('Edit thumb', 'flash-album-gallery') . '</a>'; $actions['delete'] = '<a class="submitdelete" href="' . wp_nonce_url("admin.php?page=flag-manage-gallery&mode=delpic&gid=" . $act_gid . "&pid=" . $pid, 'flag_delpicture') . '" class="delete column-delete" onclick="javascript:check=confirm( \'' . esc_attr(sprintf(__('Delete "%s"', 'flash-album-gallery'), $picture->filename)) . '\');if(check==false) return false;">' . __('Delete', 'flash-album-gallery') . '</a>'; $action_count = count($actions); $i = 0; echo '<div class="row-actions">'; foreach ($actions as $action => $link) { ++$i; $i == $action_count ? $sep = '' : ($sep = ' | '); echo "<span class='{$action}'>{$link}{$sep}</span>"; } echo '</div>'; ?> </p> </td> <?php break; case 'views_likes': ?> <td <?php echo $attributes; ?> > <input name="hitcounter[<?php echo $pid; ?> ]" type="text" value="<?php echo stripslashes($picture->hitcounter); ?> " /> / <input name="total_votes[<?php echo $pid; ?> ]" type="text" value="<?php echo stripslashes($picture->total_votes); ?> " /> </td> <?php break; case 'rating': ?> <td <?php echo $attributes; ?> > <?php if ($votes == 0) { $like = '0.0'; } else { if ($votes < 11) { $like = $rt[$votes - 1]; } else { $like = round((100 - $rt[count($rt) - 1]) / ($hits > 0 ? $hits : 1) * ($votes <= $hits ? $votes : $hits), 1) + $rt[count($rt) - 1]; } } echo $like . '%'; ?> </td> <?php break; case 'alt_title_desc': ?> <td <?php echo $attributes; ?> > <input name="alttext[<?php echo $pid; ?> ]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo esc_html(stripslashes($picture->alttext)); ?> " /><br/> <textarea name="description[<?php echo $pid; ?> ]" style="width:95%; margin-top: 2px;" rows="2" ><?php echo esc_html(stripslashes($picture->description)); ?> </textarea> <input name="link[<?php echo $pid; ?> ]" type="text" style="width:95%; margin-bottom: 2px;" value="<?php echo esc_attr(stripslashes($picture->link)); ?> " placeholder="(optional for skin) URL for linked button" /><br/> </td> <?php break; case 'exclude': ?> <td <?php echo $attributes; ?> ><input name="exclude[<?php echo $pid; ?> ]" type="checkbox" value="1" <?php echo $exclude; ?> /></td> <?php break; /* case 'views' : ?> <td <?php echo $attributes; ?>><?php echo $picture->hitcounter; ?></td> <?php break; */ /* case 'views' : ?> <td <?php echo $attributes; ?>><?php echo $picture->hitcounter; ?></td> <?php break; */ default: ?> <td <?php echo $attributes; ?> ><?php do_action('flag_manage_gallery_custom_column', $gallery_column_key, $pid); ?> </td> <?php break; } ?> <?php } ?> </tr> <?php } } // In the case you have no capaptibility to see the search result if ($counter == 0) { echo '<tr><td colspan="' . $num_columns . '" align="center"><strong>' . __('No entries found', 'flash-album-gallery') . '</strong></td></tr>'; } ?> </tbody> </table> <p class="submit"><input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes", 'flash-album-gallery'); ?> " /></p> </form> <br class="clear"/> </div><!-- /#wrap --> <!-- #selectgallery --> <div id="selectgallery" style="display: none;" > <form id="form-select-gallery" method="POST" action="<?php echo admin_url('admin.php?page=flag-manage-gallery&mode=edit&gid=' . $act_gid . '&paged=1'); ?> " accept-charset="utf-8"> <?php wp_nonce_field('flag_thickbox_form'); ?> <input type="hidden" id="selectgallery_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="selectgallery_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr> <th> <?php _e('Select the destination gallery:', 'flash-album-gallery'); ?> <select name="dest_gid" style="width:90%" > <?php foreach ($gallerylist as $gallery) { if ($gallery->gid != $act_gid) { ?> <option value="<?php echo $gallery->gid; ?> " ><?php echo $gallery->gid; ?> - <?php echo esc_html($gallery->title); ?> </option> <?php } } ?> </select> </th> </tr> <tr align="right"> <td class="submit"> <input type="submit" class="button-primary" name="TB_SelectGallery" value="<?php _e("OK", 'flash-album-gallery'); ?> " /> <input class="button-secondary" type="reset" value="<?php _e("Cancel", 'flash-album-gallery'); ?> " onclick="tb_remove()"/> </td> </tr> </table> </form> </div> <!-- /#selectgallery --> <!-- #resize_images --> <div id="resize_images" style="display: none;" > <form id="form-resize-images" method="POST" action="<?php echo admin_url('admin.php?page=flag-manage-gallery&mode=edit&gid=' . $act_gid . '&paged=1'); ?> " accept-charset="utf-8"> <?php wp_nonce_field('flag_thickbox_form'); ?> <input type="hidden" id="resize_images_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="resize_images_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <td> <strong><?php _e('Resize Images to', 'flash-album-gallery'); ?> :</strong> </td> <td> <input type="text" size="5" name="imgWidth" value="<?php echo $flag->options['imgWidth']; ?> " /> x <input type="text" size="5" name="imgHeight" value="<?php echo $flag->options['imgHeight']; ?> " /> <br /><small><?php _e('Width x height (in pixel). Grand Flagallery will keep ratio size', 'flash-album-gallery'); ?> </small> </td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_ResizeImages" value="<?php _e('OK', 'flash-album-gallery'); ?> " /> <input class="button-secondary" type="reset" value=" <?php _e('Cancel', 'flash-album-gallery'); ?> " onclick="tb_remove()"/> </td> </tr> </table> </form> </div> <!-- /#resize_images --> <!-- #new_thumbnail --> <div id="new_thumbnail" style="display: none;" > <form id="form-new-thumbnail" method="POST" action="<?php echo admin_url('admin.php?page=flag-manage-gallery&mode=edit&gid=' . $act_gid . '&paged=1'); ?> " accept-charset="utf-8"> <?php wp_nonce_field('flag_thickbox_form'); ?> <input type="hidden" id="new_thumbnail_imagelist" name="TB_imagelist" value="" /> <input type="hidden" id="new_thumbnail_bulkaction" name="TB_bulkaction" value="" /> <input type="hidden" name="page" value="manage-images" /> <table width="100%" border="0" cellspacing="3" cellpadding="3" > <tr valign="top"> <th align="left"><?php _e('Width x height (in pixel)', 'flash-album-gallery'); ?> </th> <td><input type="text" size="5" maxlength="5" name="thumbWidth" value="<?php echo $flag->options['thumbWidth']; ?> " /> x <input type="text" size="5" maxlength="5" name="thumbHeight" value="<?php echo $flag->options['thumbHeight']; ?> " /> <br /><small><?php _e('These values are maximum values ', 'flash-album-gallery'); ?> </small></td> </tr> <tr valign="top"> <th align="left"><?php _e('Set fix dimension', 'flash-album-gallery'); ?> </th> <td><input type="checkbox" name="thumbFix" value="1" <?php checked('1', $flag->options['thumbFix']); ?> /> <br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails', 'flash-album-gallery'); ?> </small></td> </tr> <tr align="right"> <td colspan="2" class="submit"> <input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'flash-album-gallery'); ?> " /> <input class="button-secondary" type="reset" value=" <?php _e('Cancel', 'flash-album-gallery'); ?> " onclick="tb_remove()"/> </td> </tr> </table> </form> </div> <!-- /#new_thumbnail --> <script type="text/javascript"> /* <![CDATA[ */ jQuery(document).ready(function(){columns.init('flag-manage-images');}); /* ]]> */ </script> <?php }
get_header(); ?> <div id="content" class="col-full"> <div id="main" class="col-left"> <?php if (have_posts()) { $count = 0; ?> <span class="archive_header"><?php _e('Search results', 'woothemes'); ?> : <?php printf(the_search_query()); ?> </span> <?php while (have_posts()) { the_post(); $count++; ?> <div class="post"> <h2 class="title"><a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php