Page 1 of 1

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

Posted: Mon Mar 31, 2008 1:54 pm
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.

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

Posted: Mon Mar 31, 2008 2:36 pm
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}