WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Mass Batch Import or upload? (15 posts)

  1. ChuckRock
    Member
    Posted 4 years ago #

    I hope some one can help me. Here's what I am working with

    I have a large number of images, 47,950 images in 2,618 sub folders, that are in 219 folders.

    The current structure is like this

    Folder: Company/Make (219)
    Sub Folder: Year/Model (2,618)
    Images: Image/Name (47,950)

    What I would like to do is use the top folders as "Albums", the sub folders as "Galleries" and of course the Images as images. I need to have some way of reading this file/folder structure and adding it to NextGEN Gallery.

    I could create 2,618 zip files and upload them and then create 219 albums and then add the galleries that were created when I uploaded the zip files. But it would be a lot easier if there was some way to create the thumbnails offline, upload the entire file/folder structure using ftp or ssh, then importing an xml or rss file like you can with posts.

    From looking the tables in the database I maybe able to create some sql queries to add this. But I hope some one has already done this and can tell me and easier way. Because this will not be the last time I need to do this. I have close to 150,000 more image files to add down the road.

    Any help would be great.

    Thanks
    Chuck

  2. ChuckRock
    Member
    Posted 4 years ago #

    No body has any ideas???

  3. Alex Rabe
    Member
    Posted 4 years ago #

    Hi Chuck,

    this is a really large amount of images... never thought in this direction. To perform such a operation it require a bit more rework in the import routine, nothing which can be explained in one or two words.

    The plugin didn't support a xml/rss file import, I think it's better to parse the folder structure and create then galleries / albums, but this could cause script exectuion problems, due to the long scan time.

  4. ChuckRock
    Member
    Posted 4 years ago #

    I was going to start trying to just updated the database tables, but I pulled out a script compiler for creating automation scripts for software testing that I use to use.

    I have created a script that I can have Nextgen-gallery do the importing of the folders. But I have and issue. I need some way to know when Nextgen-gallery is finished creating new thumbnails before the script tells it to import the next folder. I have tried to watch for “Creating New Thumbnails” and if it’s still on the page wait. That works the first time, then it seems that text is still on the page but just not viewable. Is there some where I could add some text that would be there during the import and thumbnail creation, then goes away when it’s done? I can then have the script check for that and wait until Nextgen is complete before adding the next import.

    I am still going to work on trying to do the import by just updating the database tables. I would like to limit the resources that are being used on my web server and thumbnail creation use a chunk of resources. With having some were close to 150k more image files to add, I think it would cause a lot of slow down on the web server.

    Thanks
    Chuck

  5. ChuckRock
    Member
    Posted 4 years ago #

    Oh, one more thing how does the “Activate related images” setting in the general options work?

    Do you have to place something in the post to tell where the images will show up?

    Thanks, again

    Chuck

  6. macon_hare
    Member
    Posted 4 years ago #

    Did you find answer to your problem? I am trying to import images into Next Gen from 500 websites into 500 new WP Blogs. (Blogs will replace the websites) Have you found any scripts out there that import large files of images into Next Gen?

  7. Alex Rabe
    Member
    Posted 4 years ago #

    @ChuckRock
    I suggest to add a action hook for that : http://codex.wordpress.org/Function_Reference/add_action. if you have a bit PHP knowledge we can work on this together and write a addon plugin. Cotact me by mail if interested...

  8. ChuckRock
    Member
    Posted 4 years ago #

    I think I know what I need to do to insert the data in to the correct tables and I have been playing with some raw php code.

    I will update this in a few days when I am closer to having something that works.

    Chuck

  9. supercharged
    Member
    Posted 4 years ago #

    Interested in this functionality as well, but not too much of a coder myself. Is something in the works, and if so how can i help?

  10. poetter
    Member
    Posted 4 years ago #

    Hi there and thx to Alex for this great plugin.

    I also have to import about 100 galleries with over 2000 pictures.

    @ChuckRock, alexrabe

    Did you work something out you could share?

  11. Alex Rabe
    Member
    Posted 4 years ago #

    I work on a scanner script for my NAS which will add multiple folders, but it's not very user fiendly on the current stage and require some php knowledge... nothing I would like to share at this point.

  12. poetter
    Member
    Posted 4 years ago #

    Well, if have php knowledge and i wouldn't care about user friendliness. A manual import will take me days. So i have to script something. If i do it myself it will be quick and very dirty.

    I would really like to take a look at your script.

  13. poetter
    Member
    Posted 4 years ago #

    I worked something out, that saved me a lot of time.

    I copied the tabs Create new gallery and import Image folders, replaced the text input with a textarea, so you can place a comma separated list. While processing i exploded the textarea input and surrounded the worker call with a foreach.

    Create multiple galleries works like a charm with my 78 galleries, though there will be a limit by php_execution time. Import Multiple folder has got the same limitation and i tried it with stacks of 25 galleries. For some of them there were no thumbs created, but that is a task you can do from the gallery overview.

    So creating the galleries, copying files and importing them took me just an hour. Creating thumbs took an other hour, but that was a low brainer.

    My mods are quick and dirty, need some style clean up, but they work.

    Here is a diff of the modification to the original file

    --- D:/Download/nextgen-gallery/admin/addgallery.php	Wed Feb 17 10:23:22 2010
    +++ X:/subdomains/test/httpdocs/wp-content/plugins/nextgen-gallery/admin/addgallery.php	Thu Feb 25 10:12:16 2010
    @@ -29,6 +29,15 @@
     			nggAdmin::create_gallery($newgallery, $defaultpath);
     	}
    
    +	if ($_POST['addmultigallery']){
    +		check_admin_referer('ngg_addgallery');
    +		$newgalleries = explode(',', esc_attr( $_POST['gallerynames']));
    +		foreach ($newgalleries as $newgallery) {
    +			if ( !empty($newgallery) )
    +				nggAdmin::create_gallery($newgallery, $defaultpath);
    +		}
    +	}
    +
     	if ($_POST['zipupload']){
     		check_admin_referer('ngg_addgallery');
     		if ($_FILES['zipfile']['error'] == 0 || (!empty($_POST['zipurl'])))
    @@ -44,6 +53,15 @@
     			nggAdmin::import_gallery($galleryfolder);
     	}
    
    +	if ($_POST['importmultifolder']){
    +		check_admin_referer('ngg_addgallery');
    +		$galleryfolders = explode(',', $_POST['galleryfolders']);
    +		foreach ( $galleryfolders as $galleryfolder) {
    +			if ( ( !empty($galleryfolder) ) AND ($defaultpath != $galleryfolder) )
    +				nggAdmin::import_gallery($galleryfolder);
    +		}
    +	}
    +
     	if ($_POST['uploadimage']){
     		check_admin_referer('ngg_addgallery');
     		if ( $_FILES['imagefiles']['error'][0] == 0 )
    @@ -178,6 +196,8 @@
     			<li><a href="#importfolder"><?php _e('Import image folder', 'nggallery') ;?></a></li>
     			<?php } ?>
     			<li><a href="#uploadimage"><?php _e('Upload Images', 'nggallery') ;?></a></li>
    +			<li><a href="#addmultigallery"><?php _e('Add multiple new galleries', 'nggallery') ;?></a></li>
    +			<li><a href="#importmultifolder"><?php _e('Import multiple image folders', 'nggallery') ;?></a></li>
     		</ul>
    
     		<!-- create gallery -->
    @@ -294,6 +314,44 @@
     				</div>
     			</form>
     		</div>
    +		<!-- create multiple gallery -->
    +		<div id="addmultigallery">
    +		<h2><?php _e('Add multiple new galleries', 'nggallery') ;?></h2>
    +			<form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
    +			<?php wp_nonce_field('ngg_addgallery') ?>
    +				<table class="form-table">
    +				<tr valign="top">
    +					<th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
    +					<td><textarea name="gallerynames" value=""></textarea><br />
    +					<?php if(!IS_WPMU) { ?>
    +					<?php _e('Create multiple new, empty galleries below the folder', 'nggallery') ;?>  <strong><?php echo $defaultpath ?></strong><br />
    +					<?php } ?>
    +					<i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
    +				</tr>
    +				<?php do_action('ngg_add_new_gallery_form'); ?>
    +				</table>
    +				<div class="submit"><input class="button-primary" type="submit" name= "addmultigallery" value="<?php _e('Add multiple galleries', 'nggallery') ;?>"/></div>
    +			</form>
    +		</div>
    +		<?php
    +		if (!IS_WPMU) {?>
    +		<!-- import multiple folder -->
    +		<div id="importmultifolder">
    +		<h2><?php _e('Import multiple image folders', 'nggallery') ;?></h2>
    +			<form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
    +			<?php wp_nonce_field('ngg_addgallery') ?>
    +				<table class="form-table">
    +				<tr valign="top">
    +					<th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
    +					<td><textarea size="35" name="galleryfolders"><?php echo $defaultpath; ?></textarea><br />
    +					<br /><?php echo $maxsize; ?>
    +					<?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
    +				</tr>
    +				</table>
    +				<div class="submit"><input class="button-primary" type="submit" name= "importmultifolder" value="<?php _e('Import multiple folders', 'nggallery') ;?>"/></div>
    +			</form>
    +		</div>
    +		<?php } ?>
     	</div>
     	<?php
     	}
  14. antmanPL
    Member
    Posted 4 years ago #

    poetter - oh, maaan. Thnx for this mod. I have over 100 galleries and over 30000 images. Without this script, import would take me a few beautiful days in front of my old CRT screen ;P
    It's good to change php execution time and amount of memory given to the php engine.
    And of course this mod works only with NextGen in version 1.4.3. addgalery.php in 1.5.0 is quite different. So you have to downgrade to get this working.

    Thnx again!

    And the whole addgalery.php file for people who don't know how to do this. Juest copy that and paste into the empty addgalery.php file in wp-content/plugins/nextgen-gallery/admin/

    <?php
    if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
    
    	// sometimes a error feedback is better than a white screen
    	@ini_set('error_reporting', E_ALL ^ E_NOTICE);
    
    	function nggallery_admin_add_gallery()  {
    
    	global $wpdb, $nggdb, $ngg;
    
    	// same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
    	$filepath    = admin_url() . 'admin.php?page=' . $_GET['page'];
    
    	// check for the max image size
    	$maxsize    = nggGallery::check_memory_limit();
    
    	// link for the flash file
    	$swf_upload_link = NGGALLERY_URLPATH . 'admin/upload.php';
    	$swf_upload_link = wp_nonce_url($swf_upload_link, 'ngg_swfupload');
    	//flash doesn't seem to like encoded ampersands, so convert them back here
    	$swf_upload_link = str_replace('&', '&', $swf_upload_link);
    
    	$defaultpath = $ngg->options['gallerypath'];	
    
    	if ($_POST['addgallery']){
    		check_admin_referer('ngg_addgallery');
    		$newgallery = esc_attr( $_POST['galleryname']);
    		if ( !empty($newgallery) )
    			nggAdmin::create_gallery($newgallery, $defaultpath);
    	}
    
    	if ($_POST['addmultigallery']){
    		check_admin_referer('ngg_addgallery');
    		$newgalleries = explode(',', esc_attr( $_POST['gallerynames']));
    		foreach ($newgalleries as $newgallery) {
    			if ( !empty($newgallery) )
    				nggAdmin::create_gallery($newgallery, $defaultpath);
    		}
    	}
    
    	if ($_POST['zipupload']){
    		check_admin_referer('ngg_addgallery');
    		if ($_FILES['zipfile']['error'] == 0 || (!empty($_POST['zipurl'])))
    			nggAdmin::import_zipfile( intval( $_POST['zipgalselect'] ) );
    		else
    			nggGallery::show_error( __('Upload failed!','nggallery') );
    	}
    
    	if ($_POST['importfolder']){
    		check_admin_referer('ngg_addgallery');
    		$galleryfolder = $_POST['galleryfolder'];
    		if ( ( !empty($galleryfolder) ) AND ($defaultpath != $galleryfolder) )
    			nggAdmin::import_gallery($galleryfolder);
    	}
    
    	if ($_POST['importmultifolder']){
    		check_admin_referer('ngg_addgallery');
    		$galleryfolders = explode(',', $_POST['galleryfolders']);
    		foreach ( $galleryfolders as $galleryfolder) {
    			if ( ( !empty($galleryfolder) ) AND ($defaultpath != $galleryfolder) )
    				nggAdmin::import_gallery($galleryfolder);
    		}
    	}
    
    	if ($_POST['uploadimage']){
    		check_admin_referer('ngg_addgallery');
    		if ( $_FILES['imagefiles']['error'][0] == 0 )
    			$messagetext = nggAdmin::upload_images();
    		else
    			nggGallery::show_error( __('Upload failed!','nggallery') );
    	}
    
    	if (isset($_POST['swf_callback'])){
    		if ($_POST['galleryselect'] == '0' )
    			nggGallery::show_error(__('No gallery selected !','nggallery'));
    		else {
    			// get the path to the gallery
    			$galleryID = (int) $_POST['galleryselect'];
    			$gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
    			nggAdmin::import_gallery($gallerypath);
    		}
    	}
    
    	if ( isset($_POST['disable_flash']) ){
    		check_admin_referer('ngg_addgallery');
    		$ngg->options['swfUpload'] = false;
    		update_option('ngg_options', $ngg->options);
    	}
    
    	if ( isset($_POST['enable_flash']) ){
    		check_admin_referer('ngg_addgallery');
    		$ngg->options['swfUpload'] = true;
    		update_option('ngg_options', $ngg->options);
    	}
    
    	//get all galleries (after we added new ones)
    	$gallerylist = $nggdb->find_all_galleries('gid', 'DESC');
    
    	?>
    
    	<?php if($ngg->options['swfUpload']) { ?>
    	<!-- SWFUpload script -->
    	<script type="text/javascript">
    		var ngg_swf_upload;
    
    		window.onload = function () {
    			ngg_swf_upload = new SWFUpload({
    				// Backend settings
    				upload_url : "<?php echo $swf_upload_link; ?>",
    				flash_url : "<?php echo NGGALLERY_URLPATH; ?>admin/js/swfupload.swf",
    
    				// Button Settings
    				button_placeholder_id : "spanButtonPlaceholder",
    				button_width: 300,
    				button_height: 27,
    				button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
    				button_cursor: SWFUpload.CURSOR.HAND,
    
    				// File Upload Settings
    				file_size_limit : "<?php echo wp_max_upload_size(); ?>b",
    				file_types : "*.jpg;*.jpeg;*.gif;*.png",
    				file_types_description : "<?php _e('Image Files', 'nggallery') ;?>",
    
    				// Queue handler
    				file_queued_handler : fileQueued,
    
    				// Upload handler
    				upload_start_handler : uploadStart,
    				upload_progress_handler : uploadProgress,
    				upload_error_handler : uploadError,
    				upload_success_handler : uploadSuccess,
    				upload_complete_handler : uploadComplete,
    
    				post_params : {
    					"auth_cookie" : "<?php echo $_COOKIE[AUTH_COOKIE]; ?>",
    					"galleryselect" : "0"
    				},
    
    				// i18names
    				custom_settings : {
    					"remove" : "<?php _e('remove', 'nggallery') ;?>",
    					"browse" : "<?php _e('Browse...', 'nggallery') ;?>",
    					"upload" : "<?php _e('Upload images', 'nggallery') ;?>"
    				},
    
    				// Debug settings
    				debug: false
    
    			});
    
    			// on load change the upload to swfupload
    			initSWFUpload();
    
    		};
    	</script>
    
    	<div class="wrap" id="progressbar-wrap">
    		<div class="progressborder">
    			<div class="progressbar" id="progressbar">
    				<span>0%</span>
    			</div>
    		</div>
    	</div>
    
    	<?php } else { ?>
    	<!-- MultiFile script -->
    	<script type="text/javascript">
    	/* <![CDATA[ */
    		jQuery(document).ready(function(){
    			jQuery('#imagefiles').MultiFile({
    				STRING: {
    			    	remove:'[<?php _e('remove', 'nggallery') ;?>]'
      				}
    		 	});
    		});
    	/* ]]> */
    	</script>
    	<?php } ?>
    	<!-- jQuery Tabs script -->
    	<script type="text/javascript">
    	/* <![CDATA[ */
    		jQuery(document).ready(function(){
    			jQuery('#slider').tabs({ fxFade: true, fxSpeed: 'fast' });
    		});
    	/* ]]> */
    	</script>
    
    	<div id="slider" class="wrap">
    
    		<ul id="tabs">
    			<li><a href="#addgallery"><?php _e('Add new gallery', 'nggallery') ;?></a></li>
    			<?php if ( wpmu_enable_function('wpmuZipUpload') ) { ?>
    			<li><a href="#zipupload"><?php _e('Upload a Zip-File', 'nggallery') ;?></a></li>
    			<?php }
    			if (!IS_WPMU) {?>
    			<li><a href="#importfolder"><?php _e('Import image folder', 'nggallery') ;?></a></li>
    			<?php } ?>
    			<li><a href="#uploadimage"><?php _e('Upload Images', 'nggallery') ;?></a></li>
    			<li><a href="#addmultigallery"><?php _e('Add multiple new galleries', 'nggallery') ;?></a></li>
    			<li><a href="#importmultifolder"><?php _e('Import multiple image folders', 'nggallery') ;?></a></li>
    		</ul>
    
    		<!-- create gallery -->
    		<div id="addgallery">
    		<h2><?php _e('Add new gallery', 'nggallery') ;?></h2>
    			<form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
    					<td><input type="text" size="35" name="galleryname" value="" /><br />
    					<?php if(!IS_WPMU) { ?>
    					<?php _e('Create a new , empty gallery below the folder', 'nggallery') ;?>  <strong><?php echo $defaultpath ?></strong><br />
    					<?php } ?>
    					<i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
    				</tr>
    				<?php do_action('ngg_add_new_gallery_form'); ?>
    				</table>
    				<div class="submit"><input class="button-primary" type="submit" name= "addgallery" value="<?php _e('Add gallery', 'nggallery') ;?>"/></div>
    			</form>
    		</div>
    		<?php if ( wpmu_enable_function('wpmuZipUpload')) { ?>
    		<!-- zip-file operation -->
    		<div id="zipupload">
    		<h2><?php _e('Upload a Zip-File', 'nggallery') ;?></h2>
    			<form name="zipupload" id="zipupload_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#zipupload'; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('Select Zip-File', 'nggallery') ;?>:</th>
    					<td><input type="file" name="zipfile" id="zipfile" size="35" class="uploadform"/><br />
    					<?php _e('Upload a zip file with images', 'nggallery') ;?></td>
    				</tr>
    				<?php if (function_exists('curl_init')) : ?>
    				<tr valign="top">
    					<th scope="row"><?php _e('or enter a Zip-File URL', 'nggallery') ;?>:</th>
    					<td><input type="text" name="zipurl" id="zipurl" size="35" class="uploadform"/><br />
    					<?php _e('Import a zip file with images from a url', 'nggallery') ;?></td>
    				</tr>
    				<?php endif; ?>
    				<tr valign="top">
    					<th scope="row"><?php _e('in to', 'nggallery') ;?></th>
    					<td><select name="zipgalselect">
    					<option value="0" ><?php _e('a new gallery', 'nggallery') ?></option>
    					<?php
    						foreach($gallerylist as $gallery) {
    							if ( !nggAdmin::can_manage_this_gallery($gallery->author) )
    								continue;
    							$name = ( empty($gallery->title) ) ? $gallery->name : $gallery->title;
    							echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
    						}
    					?>
    					</select>
    					<br /><?php echo $maxsize; ?>
    					<br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
    					<br /><?php if ( (IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck') ) display_space_usage(); ?></td>
    				</tr>
    				</table>
    				<div class="submit"><input class="button-primary" type="submit" name= "zipupload" value="<?php _e('Start upload', 'nggallery') ;?>"/></div>
    			</form>
    		</div>
    		<?php }
    		if (!IS_WPMU) {?>
    		<!-- import folder -->
    		<div id="importfolder">
    		<h2><?php _e('Import image folder', 'nggallery') ;?></h2>
    			<form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
    					<td><input type="text" size="35" name="galleryfolder" value="<?php echo $defaultpath; ?>" /><br />
    					<br /><?php echo $maxsize; ?>
    					<?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
    				</tr>
    				</table>
    				<div class="submit"><input class="button-primary" type="submit" name= "importfolder" value="<?php _e('Import folder', 'nggallery') ;?>"/></div>
    			</form>
    		</div>
    		<?php } ?>
    		<!-- upload images -->
    		<div id="uploadimage">
    		<h2><?php _e('Upload Images', 'nggallery') ;?></h2>
    			<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php echo $filepath.'#uploadimage'; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('Upload image', 'nggallery') ;?></th>
    					<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
    				</tr>
    				<tr valign="top">
    					<th scope="row"><?php _e('in to', 'nggallery') ;?></th>
    					<td><select name="galleryselect" id="galleryselect">
    					<option value="0" ><?php _e('Choose gallery', 'nggallery') ?></option>
    					<?php
    						foreach($gallerylist as $gallery) {
    							if ( !nggAdmin::can_manage_this_gallery($gallery->author) )
    								continue;
    							$name = ( empty($gallery->title) ) ? $gallery->name : $gallery->title;
    							echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
    						}					?>
    					</select>
    					<br /><?php echo $maxsize; ?>
    					<br /><?php if ((IS_WPMU) && wpmu_enable_function('wpmuQuotaCheck')) display_space_usage(); ?></td>
    				</tr>
    				</table>
    				<div class="submit">
    					<?php if ($ngg->options['swfUpload']) { ?>
    					<input type="submit" name="disable_flash" id="disable_flash" title="<?php _e('The batch upload requires Adobe Flash 10, disable it if you have problems','nggallery') ?>" value="<?php _e('Disable flash upload', 'nggallery') ;?>" />
    					<?php } else { ?>
    					<input type="submit" name="enable_flash" id="enable_flash" title="<?php _e('Upload multiple files at once by ctrl/shift-selecting in dialog','nggallery') ?>" value="<?php _e('Enable flash based upload', 'nggallery') ;?>" />
    					<?php } ?>
    					<input class="button-primary" type="submit" name="uploadimage" id="uploadimage_btn" value="<?php _e('Upload images', 'nggallery') ;?>" />
    				</div>
    			</form>
    		</div>
    		<!-- create multiple gallery -->
    		<div id="addmultigallery">
    		<h2><?php _e('Add multiple new galleries', 'nggallery') ;?></h2>
    			<form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $filepath; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
    					<td><textarea name="gallerynames" value=""></textarea><br />
    					<?php if(!IS_WPMU) { ?>
    					<?php _e('Create multiple new, empty galleries below the folder', 'nggallery') ;?>  <strong><?php echo $defaultpath ?></strong><br />
    					<?php } ?>
    					<i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
    				</tr>
    				<?php do_action('ngg_add_new_gallery_form'); ?>
    				</table>
    				<div class="submit"><input class="button-primary" type="submit" name= "addmultigallery" value="<?php _e('Add multiple galleries', 'nggallery') ;?>"/></div>
    			</form>
    		</div>
    		<?php
    		if (!IS_WPMU) {?>
    		<!-- import multiple folder -->
    		<div id="importmultifolder">
    		<h2><?php _e('Import multiple image folders', 'nggallery') ;?></h2>
    			<form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $filepath.'#importfolder'; ?>" accept-charset="utf-8" >
    			<?php wp_nonce_field('ngg_addgallery') ?>
    				<table class="form-table">
    				<tr valign="top">
    					<th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
    					<td><textarea size="35" name="galleryfolders"><?php echo $defaultpath; ?></textarea><br />
    					<br /><?php echo $maxsize; ?>
    					<?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
    				</tr>
    				</table>
    				<div class="submit"><input class="button-primary" type="submit" name= "importmultifolder" value="<?php _e('Import multiple folders', 'nggallery') ;?>"/></div>
    			</form>
    		</div>
    		<?php } ?>
    	</div>
    	<?php
    	}
    ?>
  15. ADBL
    Member
    Posted 3 years ago #

    If someone has got a version of this hack working with NGG 1.5.4 or 1.5.5, would you be kind enough to post it here?

    I'm getting error msgs while trying it with my current install.

    TIA!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.