Organize the images in a monthly, weekly, or daily archive.

BettyJJ - October 7, 2009 - 04:46
Project:Image Picker
Version:6.x-2.5
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

This is a good module. Thanks.

Can you add the option to automatically put the images into folders organized by time, say monthly, weekly or daily? Now all the images are in the base folder. I'm afraid that folder will become too large.

#1

hutch - October 7, 2009 - 08:48

Modern filesystems can easily cope with 10,000+ nodes and some eg reiserfs are effectively unlimited, but I will put archiving on the TODO list ;-)

#2

BettyJJ - October 9, 2009 - 19:21

Thank you for being so responsive. :)

Even if performance is perhaps not an issue, archiving also helps keeping the folders neat and organized. :)

I really like this module. It's light-weighted, easy to use, and meets almost all my needs nicely. Apart from this archiving feature, there is only one thing I can think of: compatibility with Views. If it can works with Views, it is perfect in my opinion. :)

#3

hutch - October 9, 2009 - 20:27

As I said earlier, I will think about it, but bear in mind that it will add quite a lot of extra complexity:

  • The user will have to have a choice, none, daily, weekly or monthly
  • A cron will have to be set up to do the work
  • The new path will have to be stored somewhere, per image
  • additional code for browser, list, quota and stats functions
  • validation functions rewritten
  • maintain backward compatibility and new update functions

As far as Views is concerned, it does not support 3-way joins or many-to-many relationships so there is no way of using Imagepicker Groups within Views, I have tried ;-( If anyone knows better then post an export.
Without groups you could only select on name, title, description or date, not very exciting really and there are already other image handling modules that do Views.

#4

BettyJJ - October 10, 2009 - 10:30

Oh, what I ask is not putting the images first in the base folder and then moving them into some archive folders. So there is no need for cron job. Ideally, the process is like this:

The user will have a choice, none, daily, weekly or monthly. Let's say we set it to monthly.

A folder is created when a images is uploaded for the first time in the month. If that folder already exists, images are directly put into that folder. The HTML generated for insertion reflects the new path (and the URL is stored in database).

Images uploaded prior to the change are not affected. (Their location in the file system is not changed. the HTML that had been inserted is not changed. No need to change. But for future ease of use, we may want to generate and store URLs for the old images.)

Another useful thing to record is which image is used in which node(s). This one might be difficult, but is very useful, especially combined with Views.

I don't use quota and groups for my site (where I'm the only one who uploads images), so I don't know the possible effects to them.

I've tried other image modules but they all seem to be inclined to make simple things complicated. You have to install four or five modules (because A is dependent on B, B is dependent on C, etc.) and do a lot of configurations before you can get anything to work if you can get it to work at all! On the contrary, this ImagePicker module is so smooth to use. Just enable it and you're ready to go. I love this module and thank you so much!

 
 

Drupal is a registered trademark of Dries Buytaert.