Hi there, I have two nextgen gallery issues that I can't seem to get resolved in the wp forum or on the nextgen forum - so here goes.
1. I have installed nextgen on these two websites:
http://sonyasspotlight.com/spotlight/?p=61 and
http://notobelladesigns.com/?page_id=15
The galleries on sonyasspotlight work like a lightbox - the galleries on notobelladesigns - don't. they are the exact same installation, coded exactly the same - what gives?
2. I'd like to show the album on the notobella page and when a gallery thumbnail is clicked - the lightbox opens, rather than going to a gallery page and then clicking on the thumbnail and having a lightbox open - that's too much back and forth for a portfolio... any ideas?
Okay, that's it. Thanks in advance!
Utkarsh Kukreti answers:
Open up header.php (or wherever the nav bar is located)
Change
<img src="http://notobelladesigns.com/wp-content/themes/notobella/images/links-portfolio-over.gif" alt="about | portfolio | news | resume | clients" name="links" width="307" height="247" border="0" usemap="#linksMap" id="links" />
To
<img src="http://notobelladesigns.com/wp-content/themes/notobella/images/links-portfolio-over.gif" alt="about | portfolio | news | resume | clients" name="links1" width="307" height="247" border="0" usemap="#linksMap" id="links1" />
Sara Noto comments:
Ok. That did nothing. :(
Utkarsh Kukreti comments:
Did you change anything else in between on the page? (after posting the question)?
Sara Noto comments:
when i first posted the question all that was on the page was a gallery - now there is an album with multiple galleries.
Utkarsh Kukreti comments:
Could you restore it to the state it was earlier? (Same as the first site has).
Sara Noto comments:
sure thing... it's back to just the gallery.
Utkarsh Kukreti comments:
It's not the same as earlier as of now. It used to link to the image, not a page. (Maybe enable shutter?)
Sara Noto comments:
woops... sorry, i had changed one setting - back to original. :)
Utkarsh Kukreti comments:
It works fine at my end now - let me know.
Sara Noto comments:
it works on my end as well - can you tell me why?
can you also tell me if it will work if i put the album back in?
Utkarsh Kukreti comments:
The problem was with the image with id="links" and name="links" in the header. It caused an error with document.links used by the shutter javascript.
I'm not sure about the album thing. I just tried to debug why it was working on one site, and not on this, with the exact same plugin configuration.
Sara Noto comments:
ahhh... well - that makes sense. thank you.
I've put the album back up and the lightbox still works - only you're still taken to another gallery page rather than the lightbox just opening from the first thumbnail.
Utkarsh Kukreti comments:
I'm not familiar with the NextGen plugin. Is there any setting that would let you output all the images of an album on the page as well? (Including the Album covers)?
Sara Noto comments:
no. i could just plop in all galleries, but that would layout like a grid - and there would be too many images just hanging around - trying to keep it somewhat organized.
Utkarsh Kukreti comments:
The extra images will be kept hidden (using javascript). That would be the best way to enable lightbox for all albums in a single page.
I'll write the code for that if all of them can be inserted in the page.
Sara Noto comments:
that's not a problem - could it be written to keep the gallery title at least - we don't have to keep the description - but i would need the title in there.
i've removed the album and dropped in three galleries - you'll see there are no titles :(
Utkarsh Kukreti comments:
Open up view/gallery.php, and after the Piclense link, insert something like
<h3><?php echo $gallery->title ?></h3>
That'll add the gallery title.
Sara Noto comments:
yup. got that done... just found this code for it:
<?php
if($_GET['nggpage'] == "")
{
echo $gallery->title;
}
?>
if you can send me the code for using just one thumbnail instead of all of them - that would be great, I'll award and this topic can be closed :)
Utkarsh Kukreti comments:
Add this code (to header.php in the theme)
jQuery(document).ready(function(){
jQuery('.ngg-galleryoverview > div').hide();
jQuery('.ngg-galleryoverview > div:first-child').show();
});
Then add this to functions.php
wp_enqueue_script('jquery');
Utkarsh Kukreti comments:
Add this code (to header.php in the theme)
jQuery(document).ready(function(){
jQuery('.ngg-galleryoverview > div').hide();
jQuery('.ngg-galleryoverview > div:first-child').show();
});
Then add this to functions.php
wp_enqueue_script('jquery');
Sara Noto comments:
Got it, thank you!
Milan Petrovic answers:
Do you have some lightbox plugin? There are many of them, and they work independently from nextgen. I prefer Lightbox Plus, but you might be using some other on one of the website (that show lightbox). Check it out first.
Also such plugin can solve you second problem to display gallery in lightbox mode. Lightbox Plus plugin automatically detects all images on the page for lightbox slideshow.
Sara Noto comments:
nope - i have no lightbox plugin on either site... i've always just installed nextgen gallery and it worked like a charm - my site is apparently the only one that it doesn't like :(
see: http://painandwonder.com/?page_id=51
and: http://cakeceracera.com/?page_id=11&album=all&gallery=15
for other examples - also no lightbox plugin installed.
Milan Petrovic comments:
On http://cakeceracera.com/?page_id=11&album=all&gallery=15
you have lightbox plugin loaded by the theme.
Sara Noto comments:
hm. how can you tell that? and what about the other two... they are custom themes just like the notobella one - maybe i'm missing something :(
Milan Petrovic comments:
If you open source for the page (View->Page Source, in Firefox), you will see on line 31 that theme loads jQuery, and on line 32 jQuery Lightbox. Theme most likely does this in the header.php file.
Loading jQuery bundled with theme is usually not a good idea, because most plugins that need jQuery will attempt to use WordPress build in enqueue function that ensures that jQuery is loaded only once.
One more unrelated thing. I hate using Themeforest themes, most of them are badly coded, and add bunch of things that they should not add, or at least they should ask first. I have yet to see properly coded theme from that website, and I have worked on many projects that used them, and there were always problems.
Sara Noto comments:
well look at that. thanks. but that still doesn't account for the lightbox effect on the other sites that i can't get to work on the notobella site :(
yeah - I don't typically purchase themes but this was one that another client wanted and there was no talking them out of it... i utilized it on my friends site (cake cera cera) to make sure i could give an appropriate proposal quote - when i have time to do more pro-bono work, I'll change it up... thanks :)
Milan Petrovic comments:
To get lightbox to work on notobello, you need lightbox plugin for wordpress (I again reccomend lightbox plus). This plugin can be set to add lightbox rel attribute to all images so that is can open them. Problem is that nextgen gallery doesn't prepare images for lightbox use, and links every image to open in a new page. For lightbox to work, each image A tag must point to full image and lightbox will open it. And the nextgen gallery doesn't have any option to change this (as far as I know).
Buzu B answers:
Nextgen gallery lets you select from a variety of effects. Make sure you are selecting the one you want.
As for the album is also possible, you just need to play a little with the Javascript. I can solve both issues for you if you want. Just send me a PM and I'll get back to you when I'm back from school.
Sara Noto comments:
I was selecting the "lightbox" effect - but from everything i've read next-gen only works with shutter and thickbox... I know NOTHING about javascript :(
can you provide a link to where you've done this before?
Buzu B comments:
Select the shutter effect. That is the one that works like lightbox.
Sara Noto comments:
Yup. I have it as shutter right now, but I can't get it to open like a light box.
What is happening is:
My album gallery list
Click on a gallery thumbnail
Go to gallery thumbnails
Click on thumbnail
Gallery opens in place of thumbnails and then you can click through.
What I would really love to see is:
My album gallery list
Click on a gallery thumbnail
Gallery opens in front of album view like a lightbox from that portfolio page
Buzu B comments:
I have to go now. I hope some of the guys can solve your problem other wise you only need to send me a PM and I'll solve both issues for you.
Good Luck!
Sara Noto comments:
Thanks, if we can't figure it out, I'll be in touch! :)
Buzu B comments:
It is possible to do that, but you need some custom javascript programming. It gets done in just a few hours, but unfortunately right now I don't have those few hours. I've got to go to school.
I really hope you get your problem solved by the time I'm available, but if not, I'll be glad to do it for you.
I totally understand what you need, and just want you to know that it it totally possible.
Buzu.
Erez S answers:
1) The lightbox notobella is working awsome
2)I don't understand what exactly is the problem
Sara Noto comments:
thank you... we just got it working.
Erez S comments:
Ok,and what about 2?
Sara Noto comments:
nope. not yet.
i've reinstalled the album - but clicking on a gallery thumbnail still takes me to a gallery thumbnail page - rather than opening the lightbox right there - if you have a solution, please let me know.
Erez S comments:
Maybe you could use the tags here:
http://wordpress.org/extend/plugins/nextgen-gallery/faq/
and then to show only one picture of the album with the "max" option of the shortcode
Erez S comments:
BTW this is the structure of the images in the gallery,so maybe you can modify your theme to show the album image with this structure:
<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 title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
<?php } ?>
</a>
</div>
</div>