diff options
author | andi <andi@splitbrain.org> | 2005-04-22 22:40:04 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-22 22:40:04 +0200 |
commit | 9fcd3d1d5e5fd140213c5a65fa2e0ac53d7e904f (patch) | |
tree | 5df6afddf73174f4ed4e5f3af6cd5992143a5ae3 /inc | |
parent | 0e33fac4b16215d2ffc9145870ae34b84a9a4331 (diff) | |
download | rpg-9fcd3d1d5e5fd140213c5a65fa2e0ac53d7e904f.tar.gz rpg-9fcd3d1d5e5fd140213c5a65fa2e0ac53d7e904f.tar.bz2 |
mediaupload fixed
darcs-hash:20050422204004-9977f-28121470068f795e42ecc861e33af76613f1ab81.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/template.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/inc/template.php b/inc/template.php index 62f20c5e1..3188dd07d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -492,15 +492,18 @@ function tpl_mediafilelist(){ utf8_decodeFN($item['file']). '</a>',6); if($item['isimg']){ - ptln('('.$item['info'][0].'×'.$item['info'][1]. - ' '.filesize_h($item['size']).')<br />',6); - - # build thumbnail - $link=array(); - $link['name']=$item['id']; - if($item['info'][0]>120) $link['name'] .= '?120'; - $link = format_link_media($link); - ptln($link['name'],6); + $w = $item['info'][0]; + $h = $item['info'][1]; + + ptln('('.$w.'×'.$h.' '.filesize_h($item['size']).')<br />',6); + ptln('<a href="javascript:mediaSelect(\''.$item['id'].'\')">'); + + if($w>120){ + print '<img src="'.DOKU_BASE.'fetch.php?w=120&media='.urlencode($item['id']).'" width="120" />'; + }else{ + print '<img src="'.DOKU_BASE.'fetch.php?media='.urlencode($item['id']).'" width="'.$w.'" height="'.$h.'" />'; + } + print '</a>'; }else{ ptln ('('.filesize_h($item['size']).')',6); |