WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
[resolved] Showing All Gallery Images via a link Click (11 posts)

  1. tokiwi
    Member
    Posted 1 year ago #

    This is one of the awesomest plugin I have ever come across.Period.

    I have a question:
    I have enabled "Auto-Open" on first image link and "Auto-Gallery" - All in One Gallery.
    This works great and as expected. [Sample : http://chm32433.anujain.com/all-photography/architecture-photograph/
    Now, without changing anything else, I don't want to "Auto-Open" but to enable this "Auto-Gallery" when say a link with id "foo" is clicked. Is there an option to do it easily? I couldn't find a similar request in the support questions until a couple of pages.
    I have already started looking into easyfancybox.php. Was just wondering if modifying it is the only option?

    Thank you so much.

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

  2. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    enable this "Auto-Gallery" when say a link with id "foo" is clicked

    I do not understand what you are asking. The auto-gallery is enabled or not, dependent on your settings but not on whatever link is clicked... Do you want it disabled by default but so that a visitor can enable it by clicking a dedicated link?

  3. tokiwi
    Member
    Posted 1 year ago #

    Thank you for replying @RavanH

    Yes, that is what I wanted --> "disabled by default but so that a visitor can enable it by clicking a dedicated link".
    However, I have done that by adding a click listener in easyfancybox.php [It is hack-ish I guess]

  4. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    You could add it simply in a text widget or in footer.php maybe? So your work will not get overwritten on the next update...

  5. tokiwi
    Member
    Posted 1 year ago #

    Thanks for tip.
    Perhaps, you can include this as a feature in the next release? :)

  6. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    I cannot promise anything for the next release but maybe a later one... What's the code you used?

  7. tokiwi
    Member
    Posted 1 year ago #

    Okay. cool.
    Oh, it's just a one line hack (I didn't check if it broke other stuff which I am not using) :
    http://www.mergely.com/s6hductg/

  8. tokiwi
    Member
    Posted 1 year ago #

    Yes, it does break other functionalities.

  9. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    OK, revert to the standard unmodified plugin, then:

    1. Disable the Auto-gallery feature;

    2. Modify your theme so that your "Show All" icon link has id="fcb-onlyclick" (instead of class) and next make it so that the theme does not append rel="portfolio" to the "Zoom In" image links. It depends on your theme how/where you can do this, maybe somewhere in the functions.php...

    3. And finally paste this code in a sidebar widget:

    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery('#fcb-onlyclick').click(function() { jQuery('.fancybox').attr('rel', 'gallery'); });
    });
    </script>

    Then let me know ;)

  10. tokiwi
    Member
    Posted 1 year ago #

    Thanks RavanH.
    I think I followed everything you mentioned (except that I added the script in the footer) but I didn't work. Perhaps I missed something. I will give it a try again, soon.

    Thank you so much for your help and the wonderful plugin.

  11. RavanH
    Member
    Plugin Author

    Posted 1 year ago #

    If you can give me a link where I can see the work you've done, I can probably tell you more on how to proceed...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic