• Hello, I’m a satisfied user of this lovely plugin, which I’ve tried to customize a little.

    I’ve edited the manage-images.php file in admin folder so I only collect the “description” part. The problem is when I hit Save changes I get an abnormal long waiting moment and often the server gives the 404 (hangs up). With patience, it solves after a few hits on Back and Save button, and all fields are written in the database. My guess is this happens because the servers is also waiting for the other missing fields to be transmitted by the form.

    So, here is how I’ve modified that file. The rest of the page and the column with the thumbnails are untouched. I only made cuts and changes in the columns with Alt and Description, Exclude and Tags:

    <td <?php echo $attributes ?>>
    							<textarea name="description[<?php echo $pid ?>]" style="width:95%; margin-top: 2px;" rows="1" ><?php echo stripslashes($picture->description) ?><?php echo stripslashes($picture->alttext) ?></textarea>
    						</td>

    The output page for me is in view/gallery-caption.php and the thumbnail part looks like this:

    <!-- Thumbnails -->
    	<?php foreach ( $images as $image ) : ?>
    
    	<div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
    		<div class="ngg-gallery-thumbnail" >
    			<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
    				<?php if ( !$image->hidden ) { ?>
    				<img src="<?php echo $image->thumbnailURL ?>" width="140" height="140" alt="<?php echo $image->description ?>" />
    				<?php } ?>
    			</a>
    			<div class="descrierea"><?php echo $image->caption ?></div>
    </div>
    	</div>
    	<?php if ( $image->hidden ) continue; ?>
    	<?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
    	<br style="clear: both" />
    	<?php } ?>
     	<?php endforeach; ?>

    As you probably notice, I only want the “description” field to be written to the database, which I use to get the Alt text and the description bellow. I also like the function that displays the name of the file without Jpeg as the initial value. Also like the spelling checker to be available. I pretty much managed to make it this way, the only problem is that abnormal response time for saving description to database.

    http://ww.wp.xz.cn/extend/plugins/nextgen-gallery/

The topic ‘[Plugin: NextGEN Gallery] eliminate fields from the admin page’ is closed to new replies.