TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 79
  • Total: 79

Show filesize in download module

Started by samyweb, May 03, 2006, 03:40:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samyweb

Hello!
Sorry for my english, I'm italian.
I've searched anywhere in this forum, but I didn't found any answer to my question:
How can I display filesize i download module?
I've tried to modify TPdlmanager.template.php in this way:


    // single item needs more info
    if($context['TPortal']['dlaction']=='item'){

         // extra information like downloads, views etc.
         echo '
         <tr>
             <td class="windowbg2" align="center"><img src="'.$settings['images_url'].'/icons/info.gif" alt="" /></td>
             <td class="windowbg2"><span class="smalltext">
                <strong>Filesize:</strong> '.$dlitem['size'].' &nbsp
                 </span>
             </td>
         </tr>
         <tr>
             <td class="windowbg2" align="center"><img src="'.$settings['images_url'].'/icons/info.gif" alt="" /></td>
             <td class="windowbg2"><span class="smalltext">
                <strong>'.$txt['tp-itemviews'].':</strong> '.$dlitem['views'].' &nbsp; <strong>'.$txt['tp-itemdownloads'].':</strong> '.$dlitem['downloads'].'&nbsp;&nbsp;<strong>'.$txt['tp-itemlastdownload'].':</strong> ' , timeformat($dlitem['date_last']) , '
                 </span>
             </td>
         </tr><tr>


and also with $dlitem['filesize'] but it doesn't work...

Can you help me please?
Thank you.

G6Cad

If you uploaded the file through the manager, it allready should show the file size in the list for the content.

samyweb

Maybe not...
See also the download section here: http://www.tinyportal.net/smf/index.php?action=tpmod;dl=item50
There isn't in the teplate the variable for filesize...


bloc

Its only displayed in the actual single file listing currently. But the info is available elsewhere too, just need to be displayed in the template.

samyweb

Quote from: Bloc on May 04, 2006, 12:46:17 AM
Its only displayed in the actual single file listing currently. But the info is available elsewhere too, just need to be displayed in the template.

Sorry but... I don't understand :P
What kind of variable I must use in the code that I've posted to display the filesize?

This website is proudly hosted on Crocweb Cloud Website Hosting.