AssetDuJour (Movable Type Plugin)

AssetDuJour is a plugin for Movable Type (4.2+ and 5.0+) to preselect the date « du jour » (today) in the asset upload destination path.

Why?

With the default behavior of MT, authors tend to upload all assets in the same place: the Site Root (or the Archive Root if it is setup). It clutters this folder and increases the risk of adversely overwriting an existing file while uploading an asset with the same name. This is how the upload form looks like with the default behavior: avant.png

With Asset Du Jour, the default path in the upload asset form will be either <Site Root>/YYYY/MM/DD or <Archive Root>/YYYY/MM/DD depending how the archives are configured, with YYYY/MM/DD set to today, like so: apres.png

Installation

AssetDuJour works with MT 4.2+ (it works with MT 5.0 too).

  • Download AssetDuJour
  • Uncompress and copy the AssetDuJour folder into your MT plugins directory.
  • Et voilà !

Parlez-vous français ?

Oui, ce plugin parle le français ! ;-)

Release history

  • Version 1.1 - 2010/12/15 - Bug fix in middle path value not being accepted for MT versions > 4.34 and 5.02.
  • Version 1.0.1 - 2009/12/28 - Bug fix in I10N files.
  • Version 1.0 - 2009/12/24 - First public version.

Copyright & License

Copyright (C) 2009-2010 François Nonnenmacher, Ubiquitic.

This free software is provided as-is WITHOUT ANY KIND OF GUARANTEE; you can redistribute it and/or modify it provided you keep the all copyright notices intact.

14 Comments

Deeply awesome. That's going to be very useful for some of our less technically-adept bloggers.

Thanks!

Echo above. Nice work.

THANK YOU! I have been waiting for a plug-in like this for AGES!

Great plugin!

Can you do it on specified folder? Like:

<Site Root>/images/YYYY/MM/DD

I guess yes, that could be set through a preference.

Francois,

If I'm not mistaken, this plugin breaks under recent releases of 4.2x. Any chance of a bug fix?

Hi Adam, I just tested it under 4.32 and 4.35 and it works fine for me. What exact version of MT does this plugin have a problem with?

We're running 4.34 on both our big work install and my personal blog, and in both cases all assets are just uploaded to the site root - the plugin has no effect other than to make the dd/mm/yyy dropdown useless. :)

I'll upgrade my personal install to 4.35 and see if it works...

OK, just upgraded to 4.35 and still getting exactly the same issue - and can replicate on several different installs. Is there a dependency I could be missing? Another plugin it relies on? Or a setting I haven't activated?

Some further info: Although the plugin successfully changes the dropdown in the asset dialogue to the siteroot/date option - this has NO EFFECT on where the file is uploaded to. It still ends up in root.

One more: actually I was (slightly) wrong - it's uploading files to the archive root, rather than the site root. So, on a blog where the archive path is root, everything ends up in root. On a blog where there's something like /archives/ where all the non-index files go, all the files go there. It's impossible to upload to the date-based structure without browsing manually once the plugin is in place.

Hi Adam, I've been able to reproduce the bug, I'll investigate.

I think I've fixed the bug, can you try version 1.1 of AssetDuJour please?

Done, and working perfectly. Thanks so much for fixing that.

Leave a comment

N.B. by commenting here, you accept the comments policy.