arpe
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WP-Hosting 1&1Hi,
had very same problem with NextGen on 1and1 – error 500
I followed Stephen advice and it works for me too!!!
Many thanks
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] How can I display thumbs and big image in a divAll credit to Arafat and lok1728 !!!
Many thanks for sharing your gallery fix!
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] How can I display thumbs and big image in a divHi Stingraynut,
I was just doing it today so here is what I’ve done:
1) open file header.php
2) paste this code after closing </title> tag, in the next line
<script language="javascript" type="text/javascript"> /* * Author Arafat Rahman (https://arafatbd.net) */ function custom_effect(img, div, attr) { if(img != 'undefined' && div != 'undefined' && div != '') { var d = document.getElementById(div); var html = '<span></span>' + '<img src="' + img + '"'; /* need span for IE hack to center image vertically */ if(attr != 'undefined' && attr != '') { html += ' ' + attr; } html += '</div>' + '<div id="desc_container">' + '<span class="artTitle">' + default_img_title[img] + '</span><br />' + default_img_description[img] + '</div>'; d.innerHTML = html; } return false; } </script>
you can really paste it anywhere in HEAD section of the document – what is IMPORTANT – the script has to definitely end before closing </head> tag.
3) open file called gallery.php – it should be located in:
wp-content>plugins>nextgen-gallery>view>gallery.php
4) now, find this line and code:
<!-- Thumbnails --> <?php foreach ($images as $image) : ?> <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $gallery->imagewidth ?> > <div class="ngg-gallery-thumbnail" > <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> > <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> </a> </div> </div> <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?> <!-- <br style="clear: both" /> --> <?php } ?> <?php endforeach; ?> <!-- Pagination --> <?php echo $pagination ?> </div> <?php endif; ?>
and replace it with:
<!-- Default Image --> <script language="javascript"> var default_img = new Array(); var default_img_description = new Object(); var default_img_title = new Object(); </script> <?php $i = 0;?> <?php foreach ($images as $image) : ?> <!-- Thumbnails --> <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $gallery->imagewidth ?> > <div class="ngg-gallery-thumbnail" > <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> style="text-decoration:none;" > <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> ></a> <!-- loop for thumbnails --> <script language="javascript"> default_img[<?=$i?>] = '<?php echo $image->imageURL ?>'; default_img_title[default_img[<?=$i?>]] = '<?php echo $image->alttext ?>'; default_img_description[default_img[<?=$i?>]] = '<?php echo htmlspecialchars_decode($image->description) ?>'; </script> </div> </div> <?php $i++; ?> <?php endforeach; ?> <div id="big_image_container"></div> <script language="javascript"> custom_effect(default_img[0], "big_image_container", ""); </script> <!-- Pagination --> <?php echo $pagination ?> </div> <?php endif; ?>
5) Now, login to your WordPress and on the menu – left hand side – below Settings you should see Gallery, go to Options, and from top menu chose Effects;
6) JavaScript Thumbnail Effect: chose > Custom
7) Link code line: paste this code > class=”highslide” onclick=”return custom_effect(this, ‘big_image_container’, ”)”
8) Make sure you click on “Save Changes”
9) From top menu chose: Gallery, and make sure that option “Show ImageBrowser” is NOT selected!!!
10) it should all work now! If you want to make some changes to the BIG image that is displayed below thumbnails you should edit your CSS file, for example:
#big_image_container img {
border:1px solid #A9A9A9;
margin: 10px;
padding:5px;
height:350px;
max-width:500px;
/* display:block !important; */
}Hope it all works for you, and you will be able to fix your gallery!
Ro