WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Easy Fancybox and Nextgen-gallery (15 posts)

  1. jerominrebatet
    Member
    Posted 1 year ago #

    Hello,

    here's my "custom":
    class="fancybox" id="fancybox-auto" rel="%GALLERY_NAME%"
    for nextgen

    It worked before, but nothing append now.
    I tried with another effect on ngg, it worked but asa i add the custom link code, nothing append when i click.

    All css and js are correclty loaded..
    Someone help me please :)

    jeromin

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. jerominrebatet
    Member
    Posted 1 year ago #

    Solved by magic, sorry I can't explain ... :/
    Reinstall theme and plugins.

  3. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Don't put id="fancybox-auto" in there. It will result in many links with the same ID which is not allowed in HTML.

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    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...

  5. jerominrebatet
    Member
    Posted 1 year ago #

    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

  6. jerominrebatet
    Member
    Posted 1 year ago #

    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

  7. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. jerominrebatet
    Member
    Posted 1 year ago #

    Actually i just add id="<?php echo $image->pid ?>" ..
    I am ashamed not thought of this !
    It works great again !

    Thanks for your help ;)

  9. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    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 :)

  10. jerominrebatet
    Member
    Posted 1 year ago #

    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

  11. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    If you look inside gallery.php, can you find out how the gallery name is referenced? Something like $gallery->name maybe?

  12. jerominrebatet
    Member
    Posted 1 year ago #

    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.

  13. jerominrebatet
    Member
    Posted 1 year ago #

    It's simply $gallery->title to get the title of a gallery, if that was your question.

  14. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    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...

  15. jerominrebatet
    Member
    Posted 1 year ago #

    I'm sure it is possible, you have to find the good function and add your new tag to it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic