• Resolved berlinwebmaster

    (@berlinwebmaster)


    This seems to be a great plugin… but I just can’t get it to do what I want.

    I want to list all of the PDFs in my gallery, and instead of the icon I want the caption to have a link to the PDF file.

    Using this shortcode works:
    [mla_gallery post_mime_type=application/pdf post_parent=all columns=1 link=file]

    But of course I have the PDF icon showing, which links to the file.

    I thought that to remove the icon, and transfer the link to the caption text, I would just add size=none and be done:

    [mla_gallery post_mime_type=application/pdf post_parent=all columns=1 link=file size=none]

    This removes the icon, but there is no link to the file anywhere! I have gone through all of the support topics, I have seen other people with examples where this works properly. But for me it’s not working. I tried to use the title instead of the caption… but still no link added to the text.

    Please help!

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your interest and for this question.

    I just copied your two examples into my test system and both of them work for me. I get a one-column list of my PDF documents, the document title is a link to the file and underneath the link the document caption is displayed. For example:

    <a href="https://mysite.org/uploads/document.pdf">PDF document</a>
    PDF document caption

    Leaving the size parameter out displays the document title for me, not the PDF icon. I’m not sure why you are seeing an icon for this case.

    You could try adding mla_link_text={+title+} to either of the examples, but it should not be necessary.

    If none of that works for you, let me know. I’m traveling until Monday night but I can respond on Tuesday.

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    Nope… this is what I’m getting:
    https://173.254.90.94/test/community/test-new/

    I’m going to try the same thing in a vanilla installation to see if there isn’t some kind of conflict with other plugins I have on my site.

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    Ok, the vanilla/clean installation works as expected, as you mention:
    https://townofberlin.com/test2/test-mla/

    I will try a fresh installation of MLA on my site. Failing that, I will deactivate everything to see if it is a plugin issue.

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    Ok. It seems to be my theme. I’m using Builder with a child theme. even using a generic page layout (not one customized by a Builder layout), it doesn’t work properly.

    Suggestions? Maybe I just need to define a custom style, so Builder won’t touch it?

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    (switching my template to TwentyTwelve produces the expected output).

    I’m not sure where the conflict lies… I have to be positive and think it is something simple to resolve? Note that I’m using the “Essence Silver” child theme of Builder.

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    I have to stop troubleshooting for now… but it seems that this theme is doing something with the “gallery-item” and “gallery-icon” classes that are used for the gallery. Here is the code in question:

    <dl class=”gallery-item”>
    <dt class=”gallery-icon”>
    Board of Director application
    </dt>
    <dd class=”wp-caption-text gallery-caption”>
    BoD Application
    </dd>
    </dl>

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    argh! try again, hopefully the system won’t try to run the code I add!

    <dl class="gallery-item">
    	<dt class="gallery-icon">
    		<a href="https://173.254.90.94/test/wp-content/uploads/2013/07/Board-of-Director-application.pdf" title="Board of Director application">Board of Director application</a>
    	</dt>
    	<dd class="wp-caption-text gallery-caption">
    		BoD Application
    	</dd>
    </dl>
    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    I can see in my web inspector for the computed class on the “dt” element:
    font-size:0px

    Anyway to force a customized style, for example “gallery-icon-pdf”, so I can have a customized style for the PDF list, without overriding the default gallery-icon for other galleries I might use in the future?

    Thread Starter berlinwebmaster

    (@berlinwebmaster)

    Ok got it!

    It turns out that the .gallery set of styles is totally adjusted in my Builder child theme. I didn’t want to mess with it as changes would totally disrupt my site.

    So I looked at the MLA markup template, and in the “Open” section it references several styles:

    ‘<div id='[+selector+]’ class=’gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]’>’

    I simply removed the “gallery” class reference, and my problem is solved for what I’m trying to do (too complicated to explain the rest, but I already had all of that part figured out! I now have the desired result!

    Plugin Author David Lingren

    (@dglingren)

    Just got home and read through your updates; thanks for your persistent and successful detective work! Although I am happy to hear that MLA wasn’t the source of your problem I regret that you had to go through so much effort to track it down.

    The class attributes that MLA adds to the [mla_gallery] items conform to those used by the WordPress [gallery] shortcode, for maximum compatibility with themes that style the galleries in different ways. In your case, not too helpful. Perhaps the Builder styles work well for images, but not for non-image gallery items like your PDF list.

    It looks like you’ve discovered the custom markup template feature and have solved your problem. Thanks again for posting the details to this topic so others can benefit form it. It’s the first example I’ve seen of theme interaction like this, and I’ll add it to my list of things to look at in the future.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘size=none is NOT working’ is closed to new replies.