• I use Media Library Assistant to post the pdf newsletters of my local historical society all in one place. I recently was asked if perhaps these newsletter could be made searchable from that page. One way to achieve this would be to filter the newsletters shown on the basis of a search menu. Ideally, when pulling up the page all newsletters would be displayed and with a search for a specific keyword only the newsletters with those keywords would be shown. However, I am running into a number of problems trying to make this happen with just Media Library Assistant.

    i) I thought some version of the MLA UI Elements Example would do the job. However, there seems to be an issue with filtering pdf files. The only adjustment that I made to the code of MLA UI Elements Example is that I changed the post-mime-type. While the dropdown menu works fine for post-mime-type=application/pdf and gives all the categories for my pdf files, [muie_keyword_search] does not seem to find any pdf files — regardless what keyword I use.

    ii) Not sure how to filter on the basis of content of a pdf file with [muie_keyword_search] or if it is even possible. All pdf files on the site are searchable for text in Preview and Adobe.

    iii) By default, MLA UI Elements Example, seems to not display any items. Is it possible to make the display of all items in the gallery the default?

    Thanks,

    Eisso

    The page I need help with: [log in to see the link]

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

    (@dglingren)

    Thanks for your question and for including the link to your page; very helpful. Without seeing the complete text of your shortcodes I can’t reproduce your application on my system, so the help I provide includes some guesswork.

    You wrote “[muie_keyword_search] does not seem to find any pdf files — regardless what keyword I use.” and “Not sure how to filter on the basis of content of a pdf file…” The keyword search feature in [mla_gallery] can look for keywords in several of the database fields WordPress provides. You have specified “title,excerpt,content”. The “excerpt” field is labeled “Caption” on the Media/Edit Media screen, and the “content” field is labeled “Description” there. These are database fields, not anything within the PDF document itself. I regret that MLA does not provide any features for searching the actual content of a PDF document.

    MLA provides many features for extracting keywords and other values from the metadata (IPTC, EXIF and XMP) embedded in PDF documents and mapping them to WordPress fields and custom fields. You may be able to find something useful there, but MLA does not extract text content from PDF documents.

    You asked “Is it possible to make the display of all items in the gallery the default?” I see you have a “Select a category” option in your dropdown control assigned to value="ignore-terms-assigned". MLA uses value="ignore.terms.assigned" for this purpose. If you change the dashes to periods you should get the results you want. In your [mla_gallery] shortcodes you would code something like:

     attachment_category="{+template:({+request:att_category+}|ignore.terms.assigned)+}"

    I hope that gives you some ideas for your application. I will leave this topic unresolved for now in case you have problems or further questions regarding the above suggestions. I will be traveling without Internet access from Tuesday 7/21 until Saturday 8/1, but I can give you more help when I return. Thanks for your patience and understanding, and for your interest in the plugin.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.