diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-11-18 16:45:44 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-11-18 16:45:44 +0100 |
commit | 806d77a088c76f38c4ae300876006d8328005338 (patch) | |
tree | 70e214bc334fccc96975a32e6278325f32030f2b /inc | |
parent | bb406e63a28e16160da6cc7a5bae60732425ef2a (diff) | |
download | rpg-806d77a088c76f38c4ae300876006d8328005338.tar.gz rpg-806d77a088c76f38c4ae300876006d8328005338.tar.bz2 |
Display fileicons in Media Dialog
darcs-hash:20051118154544-7ad00-44682b3e800a616d74eacb61dfa8c6dc5a1a336b.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/template.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php index 9fee928ae..cd2531597 100644 --- a/inc/template.php +++ b/inc/template.php @@ -667,8 +667,15 @@ function tpl_mediafilelist(){ ptln('<ul>',2); foreach($data as $item){ + if(!$item['isimg']){ + // add file icons + list($ext,$mime) = mimetype($item['file']); + $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext); + $class .= ' class="mediafile mf_'.$class.'"'; + } + ptln('<li>',4); - ptln('<a href="javascript:mediaSelect(\':'.$item['id'].'\')">'. + ptln('<a href="javascript:mediaSelect(\':'.$item['id'].'\')"'.$class.'>'. utf8_decodeFN($item['file']). '</a>',6); |