Filelink with image-type icon and file-size?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
xmas3
Forum Members
Forum Members
Posts: 41
Joined: Sat Jul 28, 2007 9:22 am
Location: Bratislava / Slovakia

Filelink with image-type icon and file-size?

Post by xmas3 »

Hi all,
I would like to ask you if it is possible to create a file-link, that will include an image-type before the link and the file-size after the link.
F.e., if I will make a link to a pdf file, I wil get the pdf icon, then the link to a file and at the end the file-size?
Thanks a lot,
Miro
zigge
Forum Members
Forum Members
Posts: 75
Joined: Tue Jan 22, 2008 6:53 pm

Re: Filelink with image-type icon and file-size?

Post by zigge »

The upload module have exactly this feature.

example:

Create a category in the Upload module admin, add your files and then put in:

{cms_module module="Uploads" category="my_category" mode="summary" template="my_template"}

The template can be modified to your preference. As a example, I like each row to be in a different color:

Code: Select all

<!-- Start Upload Display Template -->

{if isset($input_filter) }
{$startform}
{$prompt_filter}{$input_filter}{$hidden_params}{$input_submit}
{$endform}
<br/>
{$matches} {$matchestext}
{/if}
<div id="skklinks">
<table>
{foreach from=$items item=entry}

  <tr class="{$entry->rowclass}" style="background: {cycle values="#F3E793, #FFFFFF"}"> 
    <td width="720">     
        <img src="{$entry->iconurl}" border="0"/><a href="{$entry->download_url}">{$entry->name} - {$entry->summary} ({$entry->size} Kb)</a>
    </td>
  </tr>
{/foreach}
</table>
</div>
<!-- End Upload Display Template -->
Mats
http://www.skanskakustfiskeklubben.se
Last edited by zigge on Thu Dec 11, 2008 7:58 pm, edited 1 time in total.
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: Filelink with image-type icon and file-size?

Post by mel »

Hi,
Just discover this really simple plugin, that does just one thing: add icon in front of file.
I just change path to modules/FileManager/icons/themes/default/extensions/16px/, containing a lot more icons images.
Keep it simple!
Mel
Version 1.6-MLE
Post Reply

Return to “Modules/Add-Ons”