Download & Extend

Icon path not generating properly

Project:FileField
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Hi,

I just changed line 499 from

  $imagepath = drupal_get_path('module','filefield') .'/ico/'. $ext .'.png'; </code
which generates URLS like /node/NID/module/filefield/ico/pdf.png
to
<code> $imagepath = '/module/filefield/ico/'. $ext .'.png';

I realize that this isn't the best way of going about it but it's working for me now
(Sorry, i haven't learned yet how to write a patch, i will soon.)

Also, sorry to state the obvious but for now the /ico/ folder must be created and populated manually.

Comments

#1

Oops, that should have read

$imagepath = drupal_get_path('module','filefield') .'/ico/'. $ext .'.png';
which generates URLS like /node/NID/module/filefield/ico/pdf.png
to
$imagepath = '/modules/filefield/ico/'. $ext .'.png';

#2

Is there a plan to get the file icons to appear on the View page (currently they only appear on the Edit page)?

#3

Here is a folder with some icons. Drop this into your modules/filefield/ folder

AttachmentSize
ico.zip 3.17 KB

#4

Status:postponed (maintainer needs more info)» closed (duplicate)

#146784 has a better solution to this issue, even if I don't consider the initial comment/patch clean enough to be committed. I think this issue can be closed as "duplicate".