WordPress.org

Ready to get started?Download WordPress

Forums

Display number and filesize of post attachments (4 posts)

  1. mendezki
    Member
    Posted 7 years ago #

    Heya, I'm looking for a way to display the number of images contained in a post and the filesize of the images.
    Any suggestions would be greatly appreciated : )

    Cheers,

    M

  2. mendezki
    Member
    Posted 7 years ago #

    Ok, I'll explain a bit about what I'm trying to accomplish.
    I have a test version online here.

    It's (obviously) supposed to look like Apple Mail.
    I load the text from the post, the to: and: from: are custom fields.
    The pictures attached are hidden in the post and displayed after the 'signature' using an adapted post-image, which works like a charm, thanks Kafkaesque and Tobias!

    However, In true emailstyle it should ofcourse also show the number of attachments, and after clicking the attachment arrow, the names (and possibly filesize) of the respective attachments.

    I've been looking at the plugin code, but since I don't know anything about php, I'm lost. Something along the lines of $img_url and $imageaaargh, ok, I'm off to buy a php instruction book!

    Thanks for reading this far, M

  3. Dgold
    Member
    Posted 7 years ago #

    I really wouldn't know, but the Podpress plugin is able to show the Filenames and Filesizes of mp3 enclosures and also works with other types of enclosures (video) and might even work with pictures, pdf's, etc. Maybe you could either use Podpress, or get some code or ideas from it. Good luck.

    By the way I looked at your example, and, well, why not just send an email? LOL. That's pretty convincing looking.

  4. mendezki
    Member
    Posted 7 years ago #

    Thanks for the tip. Dgold, I'll be checking that one out.
    Haha yes maybe I should just send an email, but that would kind of taking the fun out of glaring at the screen looking for a simple solution for a stupid problem, some weird form of automasochism I guess : )

Topic Closed

This topic has been closed to new replies.

About this Topic