nggallery_picturelist

The NextGEN Gallery nggallery picturelist function.

Description

nggallery_picturelist( $controller ); 

Parameters (1)

0. $controller
The controller.

Usage

  1. if ( !function_exists( 'nggallery_picturelist' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php'; 
  3.  
  4. // The controller. 
  5. $controller = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = nggallery_picturelist($controller); 
  9.  

Defined (1)

The function is defined in the following location(s).

/products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php  
  1. function nggallery_picturelist($controller) { 
  2. // *** show picture list 
  3. global $wpdb, $nggdb, $user_ID, $ngg; 
  4.  
  5. // Look if its a search result 
  6. $is_search = isset ($_GET['s']) ? true : false; 
  7. $counter = 0; 
  8.  
  9. $wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images'); 
  10.  
  11. // look for pagination 
  12. $_GET['paged'] = isset($_GET['paged']) && ($_GET['paged'] > 0) ? absint($_GET['paged']) : 1; 
  13. $items_per_page = (!empty($_GET['items']) ? $_GET['items'] : apply_filters('ngg_manage_images_items_per_page', 50)); 
  14. if ($items_per_page == 'all') 
  15. $items_per_page = PHP_INT_MAX; 
  16. else 
  17. $items_per_page = (int)$items_per_page; 
  18.  
  19. if ($is_search) 
  20. // fetch the imagelist 
  21. $picturelist = $ngg->manage_page->search_result; 
  22. $total_number_of_images = count($picturelist); 
  23.  
  24. // we didn't set a gallery or a pagination 
  25. $act_gid = 0; 
  26. else { 
  27. // GET variables 
  28. $act_gid = $ngg->manage_page->gid; 
  29.  
  30. // Load the gallery metadata 
  31. $mapper = C_Gallery_Mapper::get_instance(); 
  32. $gallery = $mapper->find($act_gid); 
  33.  
  34. if (!$gallery) { 
  35. nggGallery::show_error(__('Gallery not found.', 'nggallery')); 
  36. return; 
  37.  
  38. // Check if you have the correct capability 
  39. if (!nggAdmin::can_manage_this_gallery($gallery->author)) { 
  40. nggGallery::show_error(__('Sorry, you have no access here', 'nggallery')); 
  41. return; 
  42.  
  43. $start = ( $_GET['paged'] - 1 ) * $items_per_page; 
  44.  
  45. // get picture values 
  46. $image_mapper = C_Image_Mapper::get_instance(); 
  47.  
  48. $total_number_of_images = count($image_mapper->select($image_mapper->get_primary_key_column())-> 
  49. where(array("galleryid = %d", $act_gid))->run_query(FALSE, FALSE, TRUE)); 
  50.  
  51. $picturelist = $image_mapper->select()-> 
  52. where(array("galleryid = %d", $act_gid))-> 
  53. order_by($ngg->options['galSort'], $ngg->options['galSortDir'])-> 
  54. limit($items_per_page, $start)->run_query(); 
  55.  
  56. // get the current author 
  57. $act_author_user = get_userdata((int)$gallery->author); 
  58.  
  59.  
  60. // list all galleries 
  61. $gallerylist = $nggdb->find_all_galleries(); 
  62.  
  63. //get the columns 
  64. $image_columns = $wp_list_table->get_columns(); 
  65. $hidden_columns = get_hidden_columns('nggallery-manage-images'); 
  66. $num_columns = count($image_columns) - count($hidden_columns); 
  67.  
  68. $attr = (nggGallery::current_user_can( 'NextGEN Edit gallery options' )) ? '' : 'disabled="disabled"'; 
  69.  
  70. ?> 
  71. <script type="text/javascript"> 
  72. <!-- 
  73. function showDialog( windowId, title ) { 
  74. var form = document.getElementById('updategallery'); 
  75. var elementlist = ""; 
  76. for (i = 0, n = form.elements.length; i < n; i++) { 
  77. if(form.elements[i].type == "checkbox") { 
  78. if(form.elements[i].name == "doaction[]") 
  79. if(form.elements[i].checked == true) 
  80. if (elementlist == "") 
  81. elementlist = form.elements[i].value; 
  82. else 
  83. elementlist += ", " + form.elements[i].value ; 
  84. jQuery("#" + windowId + "_bulkaction").val(jQuery("#bulkaction").val()); 
  85. jQuery("#" + windowId + "_imagelist").val(elementlist); 
  86. // now show the dialog 
  87. jQuery( "#" + windowId ).dialog({ 
  88. width: 640,  
  89. resizable : false,  
  90. modal: true,  
  91. title: title,  
  92. position: { 
  93. my: 'center',  
  94. at: 'center',  
  95. of: window.parent 
  96. }); 
  97. jQuery("#" + windowId + ' .dialog-cancel').click(function() { jQuery( "#" + windowId ).dialog("close"); }); 
  98.  
  99. function setURLParam(param, paramVal) { 
  100. var url = window.location.href; 
  101. var params = ""; 
  102. var tmp = ""; 
  103. var tmpArray = url.split("?"); 
  104. var base = tmpArray[0]; 
  105. var additional = tmpArray[1]; 
  106.  
  107. if (additional) { 
  108. tmpArray = additional.split("&"); 
  109. for (i = 0; i < tmpArray.length; i++) { 
  110. if (tmpArray[i].split('=')[0] != param) { 
  111. params += tmp + tmpArray[i]; 
  112. tmp = "&"; 
  113.  
  114. return base + "?" + params + tmp + "" + param + "=" + paramVal; 
  115.  
  116. jQuery(function () { 
  117.  
  118. jQuery('span.tooltip, label.tooltip').tooltip(); 
  119.  
  120. jQuery('#ngg-manage-images-items-per-page').on('change', function() { 
  121. window.location.href = setURLParam('items', jQuery(this).val()); 
  122. }); 
  123.  
  124. // load a content via ajax 
  125. jQuery('a.ngg-dialog').click(function() { 
  126. var dialogs = jQuery('.ngg-overlay-dialog:visible'); 
  127. if (dialogs.size() > 0) { 
  128. return false; 
  129.  
  130. if ( jQuery( "#spinner" ).length == 0) { 
  131. jQuery("body").append('<div id="spinner"></div>'); 
  132.  
  133. var $this = jQuery(this); 
  134. var results = new RegExp('[\\?&]w=([^&#]*)').exec(this.href); 
  135. var width = ( results ) ? results[1] : 600; 
  136. var results = new RegExp('[\\?&]h=([^&#]*)').exec(this.href); 
  137. var height = ( results ) ? results[1] : 440; 
  138. var container = window; 
  139.  
  140. if (window.parent) { 
  141. container = window.parent; 
  142.  
  143. jQuery('#spinner').fadeIn(); 
  144. jQuery('#spinner').position({ my: "center", at: "center", of: container }); 
  145.  
  146. var dialog = jQuery('<div class="ngg-overlay-dialog"></div>').appendTo('body'); 
  147. // load the remote content 
  148. dialog.load( 
  149. this.href,  
  150. {},  
  151. function () { 
  152. jQuery('#spinner').hide(); 
  153.  
  154. dialog.dialog({ 
  155. title: ($this.attr('title')) ? $this.attr('title') : '',  
  156. position: { my: "center", at: "center", of: container },  
  157. width: width,  
  158. height: height,  
  159. modal: true,  
  160. resizable: false,  
  161. close: function() { dialog.remove(); } 
  162. }).width(width - 30).height(height - 30); 
  163. ); 
  164.  
  165. //prevent the browser to follow the link 
  166. return false; 
  167. }); 
  168.  
  169. // If too many of these are generated the cookie becomes so large servers will reject HTTP requests 
  170. // Wait some time for other listeners to catch this event and then purge it from the browser 
  171. Frame_Event_Publisher.listen_for('attach_to_post:thumbnail_modified', function(data) { 
  172. setTimeout(function() { 
  173. Frame_Event_Publisher.delete_cookie("X-Frame-Events_" + data.id); 
  174. }, 400); 
  175. }); 
  176. }); 
  177.  
  178. function checkAll(form) 
  179. for (i = 0, n = form.elements.length; i < n; i++) { 
  180. if(form.elements[i].type == "checkbox") { 
  181. if(form.elements[i].name == "doaction[]") { 
  182. if(form.elements[i].checked == true) 
  183. form.elements[i].checked = false; 
  184. else 
  185. form.elements[i].checked = true; 
  186.  
  187. function getNumChecked(form) 
  188. var num = 0; 
  189. for (i = 0, n = form.elements.length; i < n; i++) { 
  190. if(form.elements[i].type == "checkbox") { 
  191. if(form.elements[i].name == "doaction[]") 
  192. if(form.elements[i].checked == true) 
  193. num++; 
  194. return num; 
  195.  
  196. // this function check for a the number of selected images, sumbmit false when no one selected 
  197. function checkSelected() { 
  198.  
  199. var numchecked = getNumChecked(document.getElementById('updategallery')); 
  200.  
  201. if (typeof document.activeElement == "undefined" && document.addEventListener) { 
  202. document.addEventListener("focus", function (e) { 
  203. document.activeElement = e.target; 
  204. }, true); 
  205.  
  206. if ( document.activeElement.name == 'post_paged' ) 
  207. return true; 
  208.  
  209. if(numchecked < 1) { 
  210. alert('<?php echo esc_js(__('No images selected', 'nggallery')); ?>'); 
  211. return false; 
  212.  
  213. actionId = jQuery('#bulkaction').val(); 
  214.  
  215. switch (actionId) { 
  216. case "copy_to": 
  217. showDialog('selectgallery', '<?php echo esc_js(__('Copy image to...', 'nggallery')); ?>'); 
  218. return false; 
  219. break; 
  220. case "move_to": 
  221. showDialog('selectgallery', '<?php echo esc_js(__('Move image to...', 'nggallery')); ?>'); 
  222. return false; 
  223. break; 
  224. case "add_tags": 
  225. showDialog('entertags', '<?php echo esc_js(__('Add new tags', 'nggallery')); ?>'); 
  226. return false; 
  227. break; 
  228. case "delete_tags": 
  229. showDialog('entertags', '<?php echo esc_js(__('Delete tags', 'nggallery')); ?>'); 
  230. return false; 
  231. break; 
  232. case "overwrite_tags": 
  233. showDialog('entertags', '<?php echo esc_js(__('Overwrite', 'nggallery')); ?>'); 
  234. return false; 
  235. break; 
  236. case "resize_images": 
  237. showDialog('resize_images', '<?php echo esc_js(__('Resize images', 'nggallery')); ?>'); 
  238. return false; 
  239. break; 
  240. case "new_thumbnail": 
  241. showDialog('new_thumbnail', '<?php echo esc_js(__('Create new thumbnails', 'nggallery')); ?>'); 
  242. return false; 
  243. break; 
  244.  
  245. 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 + '") ; ?>'); 
  246.  
  247. jQuery(document).ready( function($) { 
  248. if ($(this).data('ready')) return; 
  249.  
  250. // close postboxes that should be closed 
  251. jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); 
  252. postboxes.add_postbox_toggles('ngg-manage-gallery'); 
  253.  
  254. jQuery('.iedit').mouseover( 
  255. function(e) { 
  256. jQuery(this).parent().find('.row-actions').css('visibility', 'hidden'); 
  257. jQuery(this).next('.row_actions:first').find('.row-actions:first').css({ 
  258. 'visibility': 'visible',  
  259. 'left': 0 // WP 4.4 compatibility; it assigns left:-9999em by default to row-actions 
  260. }); 
  261. ); 
  262.  
  263. $(this).data('ready', true); 
  264. }); 
  265.  
  266. //--> 
  267. </script> 
  268. <div class="wrap"> 
  269. <?php screen_icon( 'nextgen-gallery' ); ?> 
  270. <?php if ($is_search) :?> 
  271. <h2><?php printf( __('Search results for “%s”', 'nggallery'), esc_html( get_search_query() ) ); ?></h2> 
  272. <form class="search-form" action="" method="get"> 
  273. <p class="search-box"> 
  274. <label class="hidden" for="media-search-input"><?php _e( 'Search Images', 'nggallery' ); ?>:</label> 
  275. <input type="hidden" id="page-name" name="page" value="nggallery-manage-gallery" /> 
  276. <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" /> 
  277. <input type="submit" value="<?php _e( 'Search Images', 'nggallery' ); ?>" class="button" /> 
  278. </p> 
  279. </form> 
  280.  
  281. <br style="clear: both;" /> 
  282.  
  283. <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"> 
  284. <?php wp_nonce_field('ngg_updategallery') ?> 
  285. <input type="hidden" name="page" value="manage-images" /> 
  286.  
  287. <?php else :?> 
  288. <h2><?php echo _n( 'Gallery', 'Galleries', 1, 'nggallery' ); ?> : <?php echo esc_html ( M_I18N::translate($gallery->title) ); ?></h2> 
  289.  
  290. <br style="clear: both;" /> 
  291.  
  292. <form id="updategallery" class="nggform" method="POST" action="<?php echo $ngg->manage_page->base_page . '&mode=edit&gid=' . $act_gid . '&paged=' . esc_attr($_GET['paged']); ?>" accept-charset="utf-8"> 
  293. <?php wp_nonce_field('ngg_updategallery') ?> 
  294. <input type="hidden" name="page" value="manage-images" /> 
  295.  
  296. <?php if ( nggGallery::current_user_can( 'NextGEN Edit gallery options' )) : ?> 
  297. <div id="poststuff" class="meta-box-sortables"> 
  298. <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
  299. <div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?>" > 
  300. <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"> 
  301. <span class="toggle-indicator"></span> 
  302. </div> 
  303. <h3> 
  304. <span> <?php _e('Gallery settings', 'nggallery'); ?></span> 
  305. </h3> 
  306. <div class="inside"> 
  307. <?php $controller->render_gallery_fields(); ?> 
  308.  
  309. <div class="submit"> 
  310. <?php if ( wpmu_enable_function('wpmuImportFolder') && nggGallery::current_user_can( 'NextGEN Import image folder' ) ) : ?> 
  311. <input type="submit" class="button-secondary" name="scanfolder" value="<?php _e("Scan Folder for new images", 'nggallery'); ?> " /> 
  312. <?php endif; ?> 
  313. <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e("Save Changes", 'nggallery'); ?>" /> 
  314. </div> 
  315.  
  316. </div> 
  317. </div> 
  318. </div> <!-- poststuff --> 
  319. <?php endif; ?> 
  320.  
  321. <?php endif; ?> 
  322.  
  323. <div class="tablenav top ngg-tablenav"> 
  324.  
  325. <?php 
  326. $ngg->manage_page->pagination( 'top', $_GET['paged'], $total_number_of_images, $items_per_page ); 
  327.  
  328. $items_per_page_array = apply_filters('ngg_manage_images_items_per_page_array', array( 
  329. '25' => __(' 25', 'nggallery'),  
  330. '50' => __(' 50', 'nggallery'),  
  331. '75' => __(' 75', 'nggallery'),  
  332. '100' => __('100', 'nggallery'),  
  333. '200' => __('200', 'nggallery'),  
  334. 'all' => __('All', 'nggallery') 
  335. )); 
  336. ?> 
  337.  
  338. <select id="ngg-manage-images-items-per-page"> 
  339. <?php foreach ($items_per_page_array as $val => $label) { ?> 
  340. <?php 
  341. $selected = ''; 
  342. if(!empty($_GET['items']) && $val == $_GET['items']) 
  343. $selected = 'selected'; 
  344. elseif (empty($_GET['items']) && $val == $items_per_page) 
  345. $selected = 'selected'; 
  346. ?> 
  347. <option value="<?php echo esc_attr($val); ?>" <?php echo $selected; ?>> 
  348. <?php echo esc_html($label); ?> 
  349. </option> 
  350. <?php } ?> 
  351. </select> 
  352. <label id="ngg-manage-images-items-per-page-label" 
  353. for="ngg-manage-images-items-per-page"><?php echo __('Images per page:', 'nggallery'); ?></label> 
  354.  
  355. <div class="alignleft actions"> 
  356. <select id="bulkaction" name="bulkaction"> 
  357. <option value="no_action" ><?php _e("Bulk actions", 'nggallery'); ?></option> 
  358. <option value="set_watermark" ><?php _e("Set watermark", 'nggallery'); ?></option> 
  359. <option value="new_thumbnail" ><?php _e("Create new thumbnails", 'nggallery'); ?></option> 
  360. <option value="resize_images" ><?php _e("Resize images", 'nggallery'); ?></option> 
  361. <option value="recover_images" ><?php _e("Recover from backup", 'nggallery'); ?></option> 
  362. <option value="delete_images" ><?php _e("Delete images", 'nggallery'); ?></option> 
  363. <option value="import_meta" ><?php _e("Import metadata", 'nggallery'); ?></option> 
  364. <option value="rotate_cw" ><?php _e("Rotate images clockwise", 'nggallery'); ?></option> 
  365. <option value="rotate_ccw" ><?php _e("Rotate images counter-clockwise", 'nggallery'); ?></option> 
  366. <option value="copy_to" ><?php _e("Copy to...", 'nggallery'); ?></option> 
  367. <option value="move_to"><?php _e("Move to...", 'nggallery'); ?></option> 
  368. <option value="add_tags" ><?php _e("Add tags", 'nggallery'); ?></option> 
  369. <option value="delete_tags" ><?php _e("Delete tags", 'nggallery'); ?></option> 
  370. <option value="overwrite_tags" ><?php _e("Overwrite tags", 'nggallery'); ?></option> 
  371. </select> 
  372. <input class="button-secondary" type="submit" name="showThickbox" value="<?php _e('Apply', 'nggallery'); ?>" onclick="if ( !checkSelected() ) return false;" /> 
  373.  
  374. <?php if (($ngg->options['galSort'] == "sortorder") && (!$is_search) ) { ?> 
  375. <input class="button-secondary" type="submit" name="sortGallery" value="<?php _e('Sort gallery', 'nggallery');?>" /> 
  376. <?php } ?> 
  377.  
  378. <input type="submit" name="updatepictures" class="button-primary action" value="<?php _e('Save Changes', 'nggallery');?>" /> 
  379. </div> 
  380. </div> 
  381. <table id="ngg-listimages" class="widefat fixed" cellspacing="0" > 
  382.  
  383. <thead> 
  384. <?php $controller->render_image_row_header() ?> 
  385. </thead> 
  386. <tfoot> 
  387. <?php $controller->render_image_row_header() ?> 
  388. </tfoot> 
  389. <tbody id="the-list"> 
  390. <?php 
  391. if($picturelist) { 
  392.  
  393. $thumbsize = ''; 
  394. $storage = C_Gallery_Storage::get_instance(); 
  395. $gallery_mapper = C_Gallery_Mapper::get_instance(); 
  396.  
  397. if ($ngg->options['thumbfix']) 
  398. $thumbsize = 'width="' . $ngg->options['thumbwidth'] . '" height="' . $ngg->options['thumbheight'] . '"'; 
  399.  
  400. foreach($picturelist as $picture) { 
  401.  
  402. if (empty($gallery) && $is_search) 
  403. $gallery = $gallery_mapper->find($picture->galleryid, FALSE); 
  404.  
  405. //for search result we need to check the capatibiliy 
  406. if ( !nggAdmin::can_manage_this_gallery($gallery->author) && $is_search ) 
  407. continue; 
  408.  
  409. $counter++; 
  410. $picture->imageURL = $storage->get_image_url($picture); 
  411. $picture->thumbURL = $storage->get_thumb_url($picture); 
  412. $picture->imagePath = $storage->get_image_abspath($picture); 
  413. $picture->thumbPath = $storage->get_thumb_abspath($picture); 
  414. echo apply_filters('ngg_manage_images_row', $picture, $counter); 
  415.  
  416. // In the case you have no capaptibility to see the search result 
  417. if ( $counter == 0 ) 
  418. echo '<tr><td colspan="' . $num_columns . '" align="center"><strong>'.__('No entries found', 'nggallery').'</strong></td></tr>'; 
  419.  
  420. ?> 
  421.  
  422. </tbody> 
  423. </table> 
  424. <div class="tablenav bottom"> 
  425. <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e('Save Changes', 'nggallery'); ?>" /> 
  426. <?php $ngg->manage_page->pagination( 'bottom', $_GET['paged'], $total_number_of_images, $items_per_page ); ?> 
  427. </div> 
  428. </form> 
  429. <br class="clear"/> 
  430. </div><!-- /#wrap --> 
  431.  
  432. <!-- #entertags --> 
  433. <div id="entertags" style="display: none;" > 
  434. <form id="form-tags" method="POST" accept-charset="utf-8"> 
  435. <?php wp_nonce_field('ngg_thickbox_form') ?> 
  436. <input type="hidden" id="entertags_imagelist" name="TB_imagelist" value="" /> 
  437. <input type="hidden" id="entertags_bulkaction" name="TB_bulkaction" value="" /> 
  438. <input type="hidden" name="page" value="manage-images" /> 
  439. <table width="100%" border="0" cellspacing="3" cellpadding="3" > 
  440. <tr> 
  441. <th><?php _e("Enter the tags", 'nggallery'); ?> : <input name="taglist" type="text" style="width:90%" value="" /></th> 
  442. </tr> 
  443. <tr align="right"> 
  444. <td class="submit"> 
  445. <input class="button-primary" type="submit" name="TB_EditTags" value="<?php _e("OK", 'nggallery'); ?>" /> 
  446.   
  447. <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e("Cancel", 'nggallery'); ?> " /> 
  448. </td> 
  449. </tr> 
  450. </table> 
  451. </form> 
  452. </div> 
  453. <!-- /#entertags --> 
  454.  
  455. <!-- #selectgallery --> 
  456. <div id="selectgallery" style="display: none;" > 
  457. <form id="form-select-gallery" method="POST" accept-charset="utf-8"> 
  458. <?php wp_nonce_field('ngg_thickbox_form') ?> 
  459. <input type="hidden" id="selectgallery_imagelist" name="TB_imagelist" value="" /> 
  460. <input type="hidden" id="selectgallery_bulkaction" name="TB_bulkaction" value="" /> 
  461. <input type="hidden" name="page" value="manage-images" /> 
  462. <table width="100%" border="0" cellspacing="3" cellpadding="3" > 
  463. <tr> 
  464. <th> 
  465. <?php _e('Select the destination gallery:', 'nggallery'); ?>  
  466. <select name="dest_gid" style="width:90%" > 
  467. <?php 
  468. foreach ($gallerylist as $gallery) { 
  469. if ($gallery->gid != $act_gid) { 
  470. ?> 
  471. <option value="<?php echo $gallery->gid; ?>" ><?php echo $gallery->gid; ?> - <?php echo esc_attr( stripslashes($gallery->title) ); ?></option> 
  472. <?php 
  473. ?> 
  474. </select> 
  475. </th> 
  476. </tr> 
  477. <tr align="right"> 
  478. <td class="submit"> 
  479. <input type="submit" class="button-primary" name="TB_SelectGallery" value="<?php _e("OK", 'nggallery'); ?>" /> 
  480.   
  481. <input class="button-secondary dialog-cancel" type="reset" value="<?php _e("Cancel", 'nggallery'); ?>" /> 
  482. </td> 
  483. </tr> 
  484. </table> 
  485. </form> 
  486. </div> 
  487. <!-- /#selectgallery --> 
  488.  
  489. <!-- #resize_images --> 
  490. <div id="resize_images" style="display: none;" > 
  491. <form id="form-resize-images" method="POST" accept-charset="utf-8"> 
  492. <?php wp_nonce_field('ngg_thickbox_form') ?> 
  493. <input type="hidden" id="resize_images_imagelist" name="TB_imagelist" value="" /> 
  494. <input type="hidden" id="resize_images_bulkaction" name="TB_bulkaction" value="" /> 
  495. <input type="hidden" name="page" value="manage-images" /> 
  496. <table width="100%" border="0" cellspacing="3" cellpadding="3" > 
  497. <tr valign="top"> 
  498. <td> 
  499. <strong><?php _e('Resize Images to', 'nggallery'); ?>:</strong> 
  500. </td> 
  501. <td> 
  502. <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']; ?>" /> 
  503. <br /><small><?php _e('Width x height (in pixel). NextGEN Gallery will keep ratio size', 'nggallery') ?></small> 
  504. </td> 
  505. </tr> 
  506. <tr align="right"> 
  507. <td colspan="2" class="submit"> 
  508. <input class="button-primary" type="submit" name="TB_ResizeImages" value="<?php _e('OK', 'nggallery'); ?>" /> 
  509.   
  510. <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> 
  511. </td> 
  512. </tr> 
  513. </table> 
  514. </form> 
  515. </div> 
  516. <!-- /#resize_images --> 
  517.  
  518. <!-- #new_thumbnail --> 
  519. <div id="new_thumbnail" style="display: none;" > 
  520. <form id="form-new-thumbnail" method="POST" accept-charset="utf-8"> 
  521. <?php wp_nonce_field('ngg_thickbox_form') ?> 
  522. <input type="hidden" id="new_thumbnail_imagelist" name="TB_imagelist" value="" /> 
  523. <input type="hidden" id="new_thumbnail_bulkaction" name="TB_bulkaction" value="" /> 
  524. <input type="hidden" name="page" value="manage-images" /> 
  525. <table width="100%" border="0" cellspacing="3" cellpadding="3" > 
  526. <tr valign="top"> 
  527. <th align="left"><?php _e('Width x height (in pixel)', 'nggallery') ?></th> 
  528. <td> 
  529. <?php include(dirname(__FILE__) . '/thumbnails-template.php'); ?> 
  530. </td> 
  531. </tr> 
  532. <tr valign="top"> 
  533. <th align="left"><?php _e('Set fix dimension', 'nggallery') ?></th> 
  534. <td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> /> 
  535. <br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails', 'nggallery') ?></small></td> 
  536. </tr> 
  537. <tr align="right"> 
  538. <td colspan="2" class="submit"> 
  539. <input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'nggallery');?>" /> 
  540.   
  541. <input class="button-secondary dialog-cancel" type="reset" value=" <?php _e('Cancel', 'nggallery'); ?> " /> 
  542. </td> 
  543. </tr> 
  544. </table> 
  545. </form> 
  546. </div> 
  547. <!-- /#new_thumbnail --> 
  548.  
  549. <script type="text/javascript"> 
  550. /* <![CDATA[ */ 
  551. jQuery(document).ready(function() {columns.init('nggallery-manage-images');}); 
  552. /* ]]> */ 
  553. </script> 
  554. <?php