» » » » Custom Attachments v1.0

Custom Attachments v1.0

MaHarder
MaHarder 14-05-2014, 18:02
Hey, first - sorry that I write in English, because I dn't know turkish.
second, I've got an issue how to add "File Size" to tpl file. I've tried to do something like this

in show.full.php
looked for
if ( count( $attacments ) > 0 ) {

add below
$size = formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $row['onserver'] ) );
						$file["attach_size"] = $size;

after this
$tpl4->set( "{count}", $file['dcount'] );

add this
$tpl4->set( "{fsize}", $file['attach_size'] );

in tpl file add this {fsize}
but, it didn't work. what should I do to manage this problem?
Çözüldü İşleme Alındı Bekliyor Çözülemedi
Bilgilendirme
Yorum Ekleyebilmeniz için Sitemize Kayıt Olmanız Gerekmektedir.
3 779
MaRZoCHi 14 Mayıs 2014 20:32
Alıntı: MaHarder
Alıntı: MaRZoCHi
For adding tag file size.

Thank you very much!

Your welcome :)

--------------------
0
MaHarder 14 Mayıs 2014 19:36
Alıntı: MaRZoCHi
For adding tag file size.

Thank you very much!
3 779
MaRZoCHi 14 Mayıs 2014 18:42
Hello @MaHarder,

For adding file size tag.

Find:
$tpl4->set( "{author}", $file['author'] );


Insert above:
$tpl4->set( "{size}", strtoupper( formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $file['onserver'] ) ) ) );

--------------------