• Resolved designer7712

    (@designer7712)


    Hello!

    I have used your plugin to create an [mla_gallery] with pagination.

    If a user is on page 3 of 6, for example, and wants to see a full size image, how can I create a “popup” window that displays the “single sample” page contents? If a user clicks on a thumbnail I would still like them to be able to use the previous and next image links, and then be able to close that view and still be on the original page 3 of 6.

    Is this possible?

    This is my code to generate the gallery:

    <h1 style="color: #fff;"><strong>Photo Gallery</strong></h1>
    <h4 style="margin:-15px 0 0 0;">Please choose from the list below:</h4>
    
    <form id="mla-text-form" action="." method="post" class="row" >
    
    [mla_term_list taxonomy=attachment_tag mla_output=dropdown mla_style=term-list-copy mla_option_value="{+slug+}" show_count=true pad_counts=false ]
     
    <input id="text-form-submit" name="text_form_submit" type="submit" value="Search" style="margin:15px 0 5px 0; padding: .5em 1.6em .4em 1.6em;"/>
    </form>
    
    [mla_gallery]
    attachment_tag="{+template:({+request:tax_input.attachment_tag+}|no-term-selected)+}"
    posts_per_page=20 mla_output="paginate_links,prev_next"
    mla_link_href='{+new_url+}?mla_paginate_current={+new_page+}&tax_input[attachment_tag]="{+query:attachment_tag,text+}"'
    [/mla_gallery]
     
    [mla_gallery mla_style=default-copy attachment_tag="{+template:({+request:tax_input.attachment_tag+}|no-term-selected)+}" posts_per_page=20 mla_caption="{+title+} : {+description+}" mla_nolink_text="<br>Select a term to display the gallery.<br>"]
    

    Thank you for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter designer7712

    (@designer7712)

    Update:

    I have found your instruction on using Easy FancyBox with MLA, but I am have trouble getting it to work with the code above.

    Do I need to add an additional shortcode, or just an additional parameter to one of the existing shortcodes?

    Thank you!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your detailed explanation and for posting the full source text of your shortcodes; very helpful. Thanks as well for finding and experimenting with the Easy Fancybox plugin.

    I did some experimenting with the current Easy Fancybox version. If you enable the Easy Fancybox “AutoDetection” feature you can open a lightbox automatically for any [mla_gallery] shortcode that has the link=file parameter. Add that to the last shortcode in your example and you should get the lightbox.

    If you want to apply Easy Fancybox only to specific galleries, switch off autodetection. Go to the Settings/Media admin screen and scroll down to the “Images” section of the Easy Fancybox settings. You will see:

    To make images open in an overlay, add their extension to the Autodetect field or use the class “fancybox” for its link. Clear field to switch off all autodetection.

    Clear the text box, scroll down and click Save Changes. Then, add the appropriate classes to the items you want to display in a lightbox. Here is your example shortcode with the additional parameters at the end:

    
    [mla_gallery]
    attachment_tag="{+template:({+request:tax_input.attachment_tag+}|no-term-selected)+}"
    mla_style=default-copy
    posts_per_page=2
    mla_caption="{+title+} : {+description+}"
    mla_nolink_text="<br>Select a term to display the gallery.<br>"
    link=file
    mla_link_attributes='class="fancybox image" rel="gallery-0"'
    [/mla_gallery]
    

    I have used the “enclosing shortcode” syntax to make the parameters easier to read. Adding the last two parameters to the shortcode you have will activate the lightbox for that gallery display only. The rel="gallery-0" attribute adds forward and back navigation among the images in the lightbox.

    I hope that gets you the results you want. I am marking this topic resolved, but please update it if you have any problems or further questions about the MLA/Easy Fancybox combination. Thanks for your interest in the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add popup of full image from gallery page?’ is closed to new replies.