It would be handy to be able to include the file mime type icon when inserting a file.

I suppose I could easily code this up as a standalone module, but that seems a bit overkill to simply provide an option to insert files including their file type icon.

CommentFileSizeAuthor
#1 insert_icon_link-1473512-1.patch3.47 KBwillvincent

Comments

willvincent’s picture

StatusFileSize
new3.47 KB

This patch adds a new insert style 'icon_link' to provide this ability. Default output from the new insert-icon-link template mimics that of theme_file()

willvincent’s picture

Status: Active » Needs review
josaku’s picture

I've just been looking for the same feature. Patch in #1 worked for me. Thanks willvincent.

Golem07’s picture

Hi,

I have applied patch in #1 against the latest release (1.1) and it doesn't seem to work any more (nothing happens when you cklick insert). Style without the link option is still funtional though. Are there any additional steps I need to take or does this have to do withe changes since the dev release in march?

Thanks in advance!

nattyweb’s picture

I have the same issue as Golem07 - any update or advice on this please? This feature would be a brilliant addition and I hope we can get it working!

Thanks in advance
Martin

nattyweb’s picture

Forget that request (#5): now working perfectly. Not sure why, but it is! Thanks for the patch.

Golem07’s picture

#maranjo
Have you done anything specific? I am still encountering the very same problem.

quicksketch’s picture

Thanks guys, this patch looks pretty good. If you guys can make a backport to D6 I'll commit it to both branches.

willvincent’s picture

Created a new issue and supplied a patch with a D6 backport: #1774120: Include icon in inserted file link (D6 Backport)

quicksketch’s picture

Status: Needs review » Fixed

Thanks @willvincent! Not many people would take this the extra mile. Committed to 7.x-1.x branch. Corresponding issue committed also.

Status: Fixed » Closed (fixed)

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