uploads module - how to show only uploaded files by upload author

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
holy_knight
Forum Members
Forum Members
Posts: 17
Joined: Sun Oct 14, 2007 1:06 pm

uploads module - how to show only uploaded files by upload author

Post by holy_knight »

I made page for FEU to upload files. That page consists of upload form and uploaded files. Does someone knows how to make tag to show only files uploaded by that user without making group for every user. I have tried to use this options from help:

# (optional) selectvalue="" - When using the 'select' mode, this parameter specifies the default field value
# (optional) selectnone="" - When using the 'select' mode, this parameter specifies wether 'none' is a valid choice.
# (optional) selectname="" - when using the 'select' mode, this parameter specifies the name of the field

but it doesn't working or I haven't know to use it on properly way.
Last edited by holy_knight on Mon Mar 31, 2008 2:39 pm, edited 1 time in total.
holy_knight
Forum Members
Forum Members
Posts: 17
Joined: Sun Oct 14, 2007 1:06 pm

Re: uploads module - how to show uploaded files only about one author

Post by holy_knight »

I solved problem by making new template and using it. Only difference is that I put one if command. Code is

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}
<table>
  <tr>
    <th>{$name}</th>
    <th>{$author}</th>
    <th>{$date}</th>
    <th>{$size}</th>
    <th>{$details}</th>
    <th>{$summary}</th>
    <th>{$description}</th>
  </tr>
{foreach from=$items item=entry}

{if $entry->author eq $username}
  <tr class="{$entry->rowclass}"> 
    <th></td>
    <td>
      {$entry->name}  
    </td>
    <td>{$entry->author}</td>
    <td>{$entry->date}</td>
    <td>{$entry->size}</td>
    <td>{$entry->detaillink}</td>
    <td>{$entry->summary}</td>
    <td>{$entry->summarylink}</td>
  </tr>
{/if}

{/foreach}
</table>
<!-- End Upload Display Template -->
key code is

Code: Select all

{if $entry->author eq $username}
....
{/if}
Post Reply

Return to “Modules/Add-Ons”