• Resolved jared_smith

    (@jared_smith)


    In previous versions of Document Gallery, I was able to use the dg_doc_icon hook to add additional information about the attachments — specifically, the file type (mime type) and size.

    With the move to dg_icon_template, the hook no longer passes the attachment ID, so there’s no way for me to add additional information such as the file size or type.

    Would it be possible to add additional variables (besides the five that are currently exposed), or make it easier to add this information from a hook? If I were to send a patch adding this functionality, would you consider adding it?

    https://www.ads-software.com/plugins/document-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Jared,

    I absolutely agree that the ID should be passed down to allow for additional functionality. The ID being excluded was a complete oversight on my part. I’ll have that available in the next release.

    Thanks for bringing this to my attention!

    EDIT: Actually, I was going in to fix the issue and it looks like you do actually receive the ID through dg_icon_template. It should be your second parameter, with the first parameter being the boolean indicating whether the user is including descriptions. Are you not seeing this on your system?

    -Dan

    Thread Starter jared_smith

    (@jared_smith)

    Yes, I’m getting it now — I accidentally had a value set to low in my call to add_filter, so that’s why the argument wasn’t coming through before.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding additional attachment info’ is closed to new replies.