Is it possible to display the date posted and file size in the file tree?

CommentFileSizeAuthor
#4 filesize.patch1.84 KBjochen wendebaum

Comments

jochen wendebaum’s picture

Yes, I would also like to see that.. :)

c3rberus’s picture

Any progress on this? Would be very useful if we could pull this information in.

ataxia’s picture

This would be an (even more) amazing module if it would display the size and date for individual files as well as the file count and number of subdirectories in each directory. I have a requirement to make this happen, so if I use your module as a launching point, I'll let you know.

Thanks!

jochen wendebaum’s picture

Component: User interface » Code
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.84 KB

Using php's filesize, I modified the module to add the filesize in a human readable way to each file.

Patch attached. Needs review!

joelstein’s picture

Status: Needs review » Fixed

Thanks for the ideas. I added the %size, %created, and %modified tokens. The %size token uses Drupal's format_size. There is now a File Tree date type (at admin/config/regional/date-time), which is used to format the %created and %modified tokens.

I also added a way for you add text outside of the link. So, for example, now you can do something like this:

[filetree dir="some-directory" fileformat="%link - %size"]

Committed to D7 branch. D6 back port coming shortly.

https://drupal.org/commitlog/commit/16200/32e2e0fef49351c3f4c0aab6d4d45b...
https://drupal.org/commitlog/commit/16200/c6ef0cef19eae18c1827f8290a9343...

jochen wendebaum’s picture

This works very nicely, thanks!

This module is getting better and better!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.