NextGEN Gallery
Hack on nextgen gallery (1 post)

  1. abmcr
    Posted 5 years ago #

    Hello Alex: see at this url

    As you see i have added a simple jquery script for sho w a loading image, but i have made 3 change at the core

    1) add the class of the span in the nggallery.css
    2) insert into gallery.php (view) the php code for create a span with the thumb options set into the admin

    line 40 to....

    <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 ) { ?>
    					<span class="image_block_archive image_block_archive-<?php echo $image->pid ?> img_loading" style="width:<?php echo $thumbwidth?>px;height:<?php echo $thumbheight?>px">
    										<script type="text/javascript">
    										jQuery(function () {
    											var img = new Image();
    											jQuery(img).load(function () {
    												jQuery('.image_block_archive-<?php echo $image->pid ?>').removeClass('img_loading').append(this);
    											}).error(function () {
    												// notify the user that the image could not be loaded
    												"src", '<?php echo $image->thumbnailURL ?>'
    											jQuery(img).attr('alt','<?php echo $image->alttext ?>');
    				<?php } ?>

    3) for use the options i have edit the line 380 og nggfunctions.php edited as

    // create the output
        $out = nggGallery::capture ( $filename, array ('gallery' => $gallery, 'images' => $picturelist, 'pagination' => $navigation, 'current' => $current_pid, 'next' => $next, 'prev' => $prev,'width'=>$thumbwidth,'height'=>$thumbheight) );

    If you think this feature useful, may be witha option, and you want the code without edit, sens me a email to info @ andreabersi dot com

    Thank you


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.