Thread Starter
Jeromin
(@jerominrebatet)
Solved by magic, sorry I can’t explain … :/
Reinstall theme and plugins.
Don’t put id="fancybox-auto"
in there. It will result in many links with the same ID which is not allowed in HTML.
If you want each link to have a unique ID, then you need to ask the NextGEN developer if there is a tag available similar to %GALLERY_NAME% which is unique to each image. Something like id=”%IMAGE_NAME%” (or %IMAGE_ID%) might be worth a try…
Thread Starter
Jeromin
(@jerominrebatet)
But, if it works fine 2 days ago ?
As it open the first image, there might be a soluion to change wich image should open automatically like the ID
In nextgen, when it worked, i’ve just added the id=”fancybox-auto”, it didn’t cause problem on hte contrary.
See, the comment that help me:
http://status301.net/wordpress-plugins/easy-fancybox/comment-page-5/#comment-1222
Tks for your help
Thread Starter
Jeromin
(@jerominrebatet)
Hello again,
I’m sorry to insist, but I don’t know where is the problem as it worked before.
Please some help 🙂
thank you
Sure, many instances of the same ID will not cause a problem as long as you do not depend on them. But as soon as you want to reference one of them using that ID, you’ll have a problem… ID’s are meant to be unique. Otherwise, they do not serve any purpose.
Thread Starter
Jeromin
(@jerominrebatet)
Actually i just add id=”<?php echo $image->pid ?>” ..
I am ashamed not thought of this !
It works great again !
Thanks for your help 😉
Did you modify a plugin file? Be aware that this modification will be overwriten on the enxt plugin update!
If you would like this ID to be added in a next release of the plugin, put in a request with the plugin dev 🙂
Thread Starter
Jeromin
(@jerominrebatet)
Yeah I know, I copied all the change into a txt file…
It’s ok because I used the title field to load buttons (facebook, twitter, google+). So they won’t implemente them.
I just modified the view/gallery.php by adding id=”<?php echo $image->pid ?>” it was so simple.
Actually I created this id, just the pid of the image at the end of my url with a hash.
Regards
If you look inside gallery.php, can you find out how the gallery name is referenced? Something like $gallery->name
maybe?
Thread Starter
Jeromin
(@jerominrebatet)
Yes it exists but it returns the folder name plus 1 in wp-content/gallery
I mean, i have many galleries with the same name (les sables d’olonne 1) so it creats folder -> les-sables-dolonne-1 les-sables-dolonne-1-0
So $gallery->name gives you the folder name (by adding 1) les-sables-dolonne-1-(x+1)
It’s weird, but here what it returns.
Thread Starter
Jeromin
(@jerominrebatet)
It’s simply $gallery->title to get the title of a gallery, if that was your question.
Yes that was my question 🙂
I’m trying to guess if it would be possible to use a specific tag like %GALLERY_NAME% (apparently corresponding with $gallery->title) that could be used in that “custom” settings field as you mentioned in your first post.
Something like
class="fancybox" id="%IMAGE_PID%" rel="%GALLERY_NAME%"
which would then create each thumbnail link with it’s unique image PID as id without having to modify the gallery.php plugin file…
Thread Starter
Jeromin
(@jerominrebatet)
I’m sure it is possible, you have to find the good function and add your new tag to it.