• Resolved Frichant

    (@frichant)


    Great plugin except why can i not get category= to work?
    I either get a whole list of everything in my publications list or nothing at all…

    Im sure this is so simple but it is driving me mad

    have tried every combination. i have a category called derek could someone give me the correct code to put on my page..

    i thought it should be

    [mla_gallery category=’derek’ columns=2 orderby=name mla_caption=”{+description+}” order=Acs posts_per_page=12 post_mime_type=application/pdf link=file post_parent=all/]

    Thanks so much

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

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

    (@dglingren)

    Thanks for the kind words and this question. MLA uses the WordPress WP_Query class for its queries, and the category support in WP_Query is a bit tricky. You can find a complete explanation in the “Category Parameters” section of the Codex documentation:

    Class Reference/WP Query

    For your example, the relevant parameter would be:

    • category_name (string) – use category slug (NOT name).

    So your shortcode would be:

    [mla_gallery category_name='derek' columns=2 orderby=name mla_caption="{+description+}" order=ASC posts_per_page=12 post_mime_type=application/pdf link=file post_parent=all]

    Note that I have fixed the order=ASC parameter and removed the slash from the end of the shortcode. Give that a try and let me know of you have any problems or further questions. Thanks for your interest in MLA.

    Thread Starter Frichant

    (@frichant)

    Thanks for response David, much appreciated.

    If only i could use the list in a drop down. I will have so many pdfs for people to chose from i really can’t clutter up page with text.

    So close to being exactly what i want.

    The one i found that does have dropdown , cant order alphabetically.

    Arghhhhh….just when you think you have found the perfect solution

    Still a great plugin though

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the positive feedback.

    Your post says “If only I could use the list in a drop down.” Do you mean that you want to compose a “gallery” containing a dropdown list of PDF Document titles, where selecting an item from the list will open the document?

    If that’s what you want, I believe you can implement it by creating a custom markup template with the appropriate HTML to build a form with a select element and an option list. I can be more specific if you give me more details on what you want.

    When you say “The one I found“, are you referring to another plugin? If so, can you tell me which one?

    Let me know if I can do more to help you. Thanks for your interest in the plugin.

    Thread Starter Frichant

    (@frichant)

    Hi David,

    Thanks again for swift response and im now probably outside the original topic. I basically have monthly pdf’s for the last 7 years that i need people to be view. Just wanted to avoid having to list them all out and though dropdown would be better. I kind of got this far but using wp_publication archive. Which is also good but dont seem to be able to order them except by date created or something so the order isn’t the order of the months !

    as you say maybe a custom markup is the answer, if you can throw any clues as to how my way that would be brilliant but i know this is something other than first discussed.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for clarifying your application. I had a look at the plugin you mentioned, WP Publication Archive by Eric Mann. I think we can work out an alternative solution with MLA.

    First, you want to organize your documents by Year and Month of publication, regardless of when they are uploaded to WordPress. You can do this in a variety of ways, using category, tag or custom field values. For example, you could define custom fields “Published Year”, e.g., “2013” and “Published Month”, e.g., “201301”/”01″ and so forth. You might be able to automatically populate these fields from metadata in the documents, but manually assigning values wouldn’t be too difficult. If you can post a link to one or more of your documents I can look at them and see what’s possible.

    Second, you want a compact way to display the document list on a page and let the user choose one for download/display. A dropdown list is one approach, and I could put together an example for you. The dropdown list would not link to the document directly, but would take you to another page that processed the selection and served up the document. The hard part of this approach is that second step. Here is an earlier support topic that outlines a solution:

    Shortcode: Force File Download

    If this is the solution you want to pursue, let me know and I’ll put something together.

    I would also like to propose an alternative to the dropdown approach. The Collapse-O-Matic plugin can be used with MLA to give you a page with a clickable one line display for each publication year. When you click on a given year, it expands into a list of the twelve monthly documents for that year. Clicking on one of the monthly documents would display the PDF.

    I think this alternative is somewhat simpler than the dropdown and would look good on the site. You would have to add an [mla_gallery] shortcode to the page once each year, or you could write some PHP code to do it automatically.

    Let me know what you think. If you choose an approach and give me a link to one or more documents I’ll see what I can do.

    Thread Starter Frichant

    (@frichant)

    Hi David,

    Yet again thanks so much for all the help you are giving, it really is appreciated. I think i am pretty close to cracking this now which is fantastic. As you suggested i’m using a combination of Mla_gallery and collapse-o-magic.

    Im not sure if i have done it the most efficient way but have created attachment categories for the various years…and applied those to the relevant docs and also applied a menu order of 1 – 12 to each monthly doc so they appear in the right order january – december.

    The only thing i now need to do is to get the formatting correct, dont really want spaces between items etc but will try and work that one out.

    Thanks again for pointing me in the right direction and all your help..i think i’m getting there

    John

    Thread Starter Frichant

    (@frichant)

    Hi Again,

    Oh well i did try having sad all of that…i’m stumped !!

    cant work out how to change the row heights so they dont have a line space between them or the text formatting.

    I played with a new style template and set it ass default but doesnt work…

    anyone help at all ?

    Thanks as always

    Plugin Author David Lingren

    (@dglingren)

    Thanks for these updates; I’m happy to hear you’re making progress.

    Here’s a custom mla_markup template I set up for a simple, compact list of PDF documents:

    • Open: < ul id='[+selector+]’ class=’gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]’>
    • Row Open: (leave this empty)
    • Item: < li>[+link+]< /li>
    • Row Close: (leave this empty)
    • Close: < /ul>

    Note that I’ve added a space in the opening HTML tags so they will appear as plain text in this posting; remove the spaces to “activate” them.

    Here’s the shortcode I’m using with the template:

    [expand title="PDF List" tag="div" trigclass="level-2 third" targclass="level-2-targ"][mla_gallery size=none post_mime_type=application/pdf post_parent=all columns=1 link=file mla_markup=compact][/expand]

    You can dress up the template to remove the bullets by each item, etc., but this should get you started. This template works with the default mla_style template, if you don’t need to change anything there.

    Let me know if you have any problems or further questions. Thanks for your interest in the plugin and for keeping me updated on your progress.

    Thread Starter Frichant

    (@frichant)

    Hi David,

    Thanks as always for all your help…

    i am using the mla_gallery and as ive said before i love it..

    is there an easy way to ensure the list is

    a: not bulleted
    b: text formatted to how i want it..

    i am using it within an accordion effect

    [bra_toggle collapsable=’yes’ caption=’2013 ARCHIVES’][mla_gallery attachment_category=2013FWF mla_markup=compact post_parent=all order=asc posts_per_page=20 post_mime_type=application/pdf link=file mla_target=”_blank”][/bra_toggle]

    which works and expands etc but all the list elements have bullets and i want to enlarge font and change colour etc

    hope you or someone can help

    Kindest regards

    John

    Plugin Author David Lingren

    (@dglingren)

    John,

    Thanks for this update and for your progress report. Styling your lists can be theme-dependent, but in general you can add CSS styles to your custom markup template to get the effects you want. For example, if you are using something like the “compact” template I outlined above, you can change the “Open” section to:

    • Open: < ul id='[+selector+]’ class=’gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+] style=”list-style:none; font-size:24px; color:#FF0000″‘>

    The list-style:none style will remove the bullets, font-size:24px will enlarge the text and the color:#FF0000 will, of course, change the text color. There are hundreds of style elements and values you can use to change the appearance of your list. Here’s a link to a good tutorial:

    w3schools.com CSS Tutorial

    That should get you started on styling the list to suit your needs. I don’t recognize the [bra_toggle] shortcode you’re using for the accordion effect, but I doubt it will affect the style of the list. I tested mine with Collapse-O-Matic and didn’t have any problems. Enjoy!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘category’ is closed to new replies.