• Good morning,
    I think your plug-in is a must for a website for me but I cannot figure out (because of all the options) how to do the following:
    1: Display a list of existing PDF files (which are uploaded in the media library).
    2: Even better would be: display thumbnails which point to PDF files so when you click on them a PDF file will open in a new window.

    I think it must be possible with your plug-in but can you help me on the way? Thanks!

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Damiaan van Vliet

    (@damnsharp)

    I found a solution in another topic on this forum for my questions: https://www.ads-software.com/support/topic/pdf-list
    [mla_gallery columns=1 post_mime_type=application/pdf post_parent=all size=thubmnail link=file mla_caption="{+description+}" mla_target="_blank"]

    Now I only need a way for searching PDF files in the media library and then displaying them as a list.

    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Oh, the correct link to the topic is: look here

    Plugin Author David Lingren

    (@dglingren)

    Damiaan,

    Thank you for the good feedback, and for taking the time to go through the support forum topics and find an earlier topic that addressed your question. Your second post says:

    Now I only need a way for searching PDF files in the media library and then displaying them as a list.

    I think the earlier “PDF List” topic covered that, but if you have any specific problems or further questions, please post them here and I will give you any help I can.

    Thanks for your interest in the plugin.

    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Hi David, thanks for quick reply.
    Because English is not my native language I think I had a blunt way of expressing something.
    I meant, I need a WordPress search form (e.g. in the sidebar) for a user finding a specific manual (pdf) file. With the MLA plug-in I am able to display a list of all PDF files (manuals) on a specific page, but better would be having this integrated into search. Hope this is clear.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for clarifying your comment; I understand much better now.

    There is not much support for a “front-end” search form in the current MLA version. The [mla_tag_cloud] shortcode would help, if you’ve organized your PDF documents with taxonomies like Att. Categories (tag cloud works with any taxonomy) and/or Att. Tags.

    You can use the MLA Text Widget to add a could to your sidebar. Look in the Settings/Media Library Assistant Documentation tab for details.

    I have thought about a shortcode to support a checkbox-style search/filter but have not had time to work on it. I understand your idea for a “search form” to mean a text box into which a user could enter one or more keywords – is that right? If that would help, I can work up an example of how to do a simple version using the current MLA version. I will also add a more powerful version based on the enhanced search box you see on the Media/Assistant submenu for consideration in a future MLA version.

    Thanks for a stimulating question. If you’d like a simple text search example, let me know.

    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Good afternoon David,
    I will try this weekend the cloud shortcode together with the text widget.

    Indeed I meant a text box where a user could enter one or more keywords for searching the right PDF file in the media library. Better, a search text box in the sidebar (e.g. as a widget or else I will program it into the sidebar.php file).

    So when you have a simple text search example, I would be thankful!

    And… have a nice weekend and thanks again for the reply ??

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your patience. Here is a very simple example of a keyword search form. I created a page, “Search Form” with this content (use the editor’s “text” tab, NOT the “Visual” tab):

    <form id="mla-search-form" method="post" action="/search-form/">
    	<input type="text" id="mla-search-box" name="search-string" value="">
    	<input type="submit" id="submit" name="submit" value="GO">
    </form>
    
    [mla_gallery post_mime_type=all post_parent=all s="{+request:search-string+}"]

    When you first visit the page you see a gallery with all the Media Library Items displayed. If you type something in the search box and click “GO”, the gallery is limited by the text you entered.

    You can place the form in an MLA Text Widget and the search box will appear on all your posts and pages. Just make sure the action="/search-form/" parameter matches the URL of the page in which your [mla_gallery] appears.

    I hope that gets you started on developing a form and gallery that meets your needs. If you have any problems or further questions, post them here. Thanks for our interest in the plugin.

    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Hi David, it works! Thank you very much for help.
    I have a question about it, of course in a widget in a sidebar it is not workable on this way because with the command all the files are displayed in the sidebar.
    Is there a way to have a search form and not displaying the whole list of files (PDF’s in my case)?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for this update and for the good news.

    I am not sure what you mean by “all the files are displayed in the sidebar“. In my example the method="post" action="/search-form/" attributes will take you to a separate WordPress page and display the selected files in a gallery on that page. Of course, you have to create a WordPress page called “Search Form” for that to work. Do you need more specific help with that?

    Can you describe in more detail what you would like to see when the user enters a keyword and clicks the “GO” button? Can you say more to clarify “Is there a way to have a search form and not displaying the whole list of files“?

    Thanks for your interest and your patience.

    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Hi David,
    Thanks for quick reply!
    Sorry, I did not pay attention enough. I placed the search form and the mla short code both in a mla text widget or on a page, that’s why I got all the media files visible.

    Now I placed the search form code in a mla widget and the mla short code on a page called search-form and with one website it works but another website what I type I get no results, strange enough. Can I troubleshoot this on a way? The websites are different, plug-ins, themes.

    working site

    mla text widget

    <form id="mla-search-form" method="post" action="https://test.albuswebdesign.nl/wordpresstest/search-form/">
    	<input type="text" id="mla-search-box" name="search-string" value="">
    	<input type="submit" id="submit" name="submit" value="GO">
    </form>

    not working site

    mla text widget

    <form id="mla-search-form" method="post" action="https://test.albuswebdesign.nl/wordpresstest14/support/manuals/search-form/">
    	<input type="text" id="mla-search-box" name="search-string" value="">
    	<input type="submit" id="submit" name="submit" value="GO">
    </form>

    And thank you for your help and patience!

    Plugin Author David Lingren

    (@dglingren)

    I had a look at both sites. It looks like the search forms are working properly, but without seeing the WordPress source text for the “Search Form” pages I cannot tell if the search-string parameter is getting to the [mla_gallery] shortcode. Can you post the source, taken from the “Text” tab of the content editor (not the “Visual” tab)?

    It looks like nothing at all is populated in the main content area of the page that is not working.

    By the way, I don’t think this is contributing to the problem, but there is an HTML error in the footer portion of the page. The HTML is question is:

    <footer id="colophon" class="site-footer" role="contentinfo">
    	<div class="site-info">
               <!-- begin footer-tekst -->
               <div id="footer-tekst">
                   <p class="bedrijfsnaam">Blabla Blabla  &copy; 2014</p>
                   <p>&bull; blabla is een handelsonderneming en levert niet direct aan de eindgebruiker</p>
                   <p><a href="https://test.albuswebdesign.nl/wordpresstest14/general-conditions/">&bull; general conditions</a></p>
                   <p><a href="https://test.albuswebdesign.nl/wordpresstest14/cookies-policy/">&bull; cookies policy</a></p>
                   <p>Design by Blablabla and <a href="https://www.albuswebdesign.nl" target="_blank">Albus Webdesign</a></
               </div><!-- eind footer-tekst -->
    	</div><!-- .site-info -->
    </footer><!-- #colophon -->

    and the error messages are:

    Invalid tag name. First character should match [a-zA-Z].
    File: search-form, Line: 278, Column: 0
    
    Unmatched end tag.
    File: search-form, Line: 280, Column: 2

    The line with the error is:

    Webdesign</a></
    Thread Starter Damiaan van Vliet

    (@damnsharp)

    Thank you David for reply and also for pointing the HTML error. I changed it.

    For testing I created a page called test and placed the search form and the mla short-code to see what is happening. So the code I place is:

    <form id="mla-search-form" method="post" action="https://test.albuswebdesign.nl/wordpresstest14/test/">
    	<input type="text" id="mla-search-box" name="search-string" value="">
    	<input type="submit" id="submit" name="submit" value="GO">
    </form>
    
    [mla_gallery post_mime_type=all post_parent=all s="{+request:search-string+}"]

    Here is the page: test page

    When it is easier to trouble-shoot I can give you log-in details (send me a mail info[at]albuswebdesign[dot]nl).

    Thank you!

    Plugin Author David Lingren

    (@dglingren)

    Thank you for setting up a test account on your system so I could investigate this issue. As I wrote in my e-mail back to you, the search results are empty because some theme, plugin or other code is adding a “taxonomy_term_id” clause to the SQL statement for the search, which is preventing the search from succeeding.

    I am leaving this topic as resolved because MLA is working properly and not directly causing the problem. I will continue to work with you offline to find and resolve the problem on your site.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to display PDF files’ is closed to new replies.