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.
uploads module - how to show only uploaded files by upload author
-
- Forum Members
- Posts: 17
- Joined: Sun Oct 14, 2007 1:06 pm
uploads module - how to show only uploaded files by upload author
Last edited by holy_knight on Mon Mar 31, 2008 2:39 pm, edited 1 time in total.
-
- Forum Members
- Posts: 17
- Joined: Sun Oct 14, 2007 1:06 pm
Re: uploads module - how to show uploaded files only about one author
I solved problem by making new template and using it. Only difference is that I put one if command. Code is
key 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 -->
Code: Select all
{if $entry->author eq $username}
....
{/if}