WordPress.org

Ready to get started?Download WordPress

Forums

Media Library Assistant
[resolved] Using [mla_gallery] with [gallery] code on the same page (7 posts)

  1. msternkopf
    Member
    Posted 11 months ago #

    I am trying to utilize both of these codes on one page on my site. The mla_gallery shortcode that servers up the PDF link list, displays correctly but when you try to click on one of the PDF links it tries to open the lightbox that the other gallery shortcode is using but does not display anything because the link is for a PDF and not an image. Is there a way to make both of these features work on one page? My website is password protected (not public) so if you need to see the page I will have to set up a temporary password for you to use. These are the two codes that I am trying to get to work together, 1 - open PDF links in a new window with the first code snippet and 2- display a lightbox pop up with the bottom code snippet.

    [mla_gallery attachment_category='nuclear' post_mime_type=application/pdf link=file columns=1 mla_style=leftalign mla_target="_blank"]

    [gallery link="file" ids="1805,1801,1806,1804,1798,1797,1796,1795,1807,1808,1803,1802,1799,1794,1831,1869,1870,1902,1903,1904,1901,1905" group="nuclear-photos"]

    http://wordpress.org/plugins/media-library-assistant/

  2. David Lingren
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for your interest in the plugin and for this question. I am traveling until September 18 and away from my test system, but I can give your some preliminary suggestions. There should be no problems mixing [mla_gallery] and [gallery] one the same page/post (although you could use [mla_gallery] for both, as [mla_gallery] is a compatible superset of [gallery]).

    There are many "lightbox" plugins, and the specifics differ depending on which one you are using. Generally, they offer two ways of linking lightbox display to your gallery items.

    Most of them will default to automatic detection of items based on file extension and they will convert everything they find to lightbox display. This is what I am guessing happens on your site. To prevent the lightbox display of your PDF documents you have to find the settings page for the lightbox plugin and turn off the automatic detection for PDF files.

    The second method for linking gallery items to lightbox display is usually to add a class attribute to the items you want displayed in the lightbox. Again, the specifics differ depending on the plugin you're using. This second method lets you select lightbox display on a gallery-by-gallery basis.

    Have a look through the settings of your lightbox plugin and see if you can find PDF-specific options. If you let me know which plugin you are using I can be more specific in my suggestions. I can do more testing and investigation when I return home.

    In the interim, let me know if the above is helpful. Thanks again for your interest and for your patience while I'm on the road.

  3. msternkopf
    Member
    Posted 11 months ago #

    This is not working for me. I am using jquery light box I unchecked the setting that is titled auto-lightbox image links, I did not see any options for PDF links. Both codes work fine if the [mla_gallery] code is placed before the [gallery] code but my pages are not set-up to allow this to happen. do you have any other suggestions for me to try? I have not tried the second idea you proposed, because I did not see anywhere within the plug in to set a class to call out the lightbox feature.

  4. David Lingren
    Member
    Plugin Author

    Posted 11 months ago #

    I regret that you are still having trouble with this application. I will try to look at the specific lightbox plugin you are using and see if I can help. I found three "jquery lightbox" plugins in the WordPress repository; can you tell me which of these you are using (or a link to the one you are using):

    jQuery Lightbox v0.24 by Pedro Lamas

    jQuery Lightbox For Native Galleries v3.2.2 by Alex Mills

    WP jQuery Lightbox v1.4.5 by ulfben

    If you would like to set up a temporary account for me, you can send the login information using the "Contact Us" page at our web site:

    Fair Trade Judaica/Contact Us

    Thanks for your interest and for your patience.

  5. msternkopf
    Member
    Posted 11 months ago #

    Thanks for the quick replay, I am using WP jQuery Lightbox v1.4.5 by ulfben plug in, I used the contact form on your website to send login information. Look at the Defense page then go to the Marketing Tools tab on this page and then Literature spoiler, under the solution sheet title (defense general) you will see the list of solution sheets with descriptions, if you click on a PDF link you will see that it tries to open the light box. If you look at the Industrial page using the menu link on the secondary menu, I do not have any [gallery] code before the mla_gallery code on this page,you can see that the PDF link opens just as it should, again under marketing tools, literature, solution sheet title. If you could get back to me today yet with an answer that would be awesome, if not I just appreciate the feedback.

  6. David Lingren
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for the additional information and the login credentials. I logged in to your site and had a look at the two pages you suggested. On the Defense page, the [mla_gallery] shortcodes have a rel="lightbox[defense-schematics]" attribute. On the Industrial page, they do not. This rel= attribute is triggering the attempt to use the lightbox.

    I installed the lightbox plugin on my test system and could not replicate your symptoms. Every combination of [gallery] and [mla_gallery] worked for me with the PDFs opening in the Adobe Reader, as expected.

    It was not obvious to me where the [mla_gallery] shortcode on your pages comes from, given the complexity of your site. You can try adding this parameter to the shortcode and see if it turns the lightbox off:

    mla_link_attributes='rel="nobox"'

    I am suggesting this because of a note I found in the jQuery Lightbox settings page:

    To disable lightboxing of an image link, just set any other rel-attribute: rel="nobox"

    Give that a try and let me know what happens. If it doesn't work, I'll have another look at your site and do more investigation.

  7. David Lingren
    Member
    Plugin Author

    Posted 10 months ago #

    I understand from your e-mail communication that you are still having problems with the rel="nobox" suggestion I made in my earlier post to this topic. Since this issue seems to be specific to your site, and not an issue with the MLA plugin, I am marking this issue resolved.

    I am happy to continue to work with you offline to get your site working the way you want it to. Thanks for your understanding.

Reply

You must log in to post.

About this Plugin

About this Topic