for those who need to show NEW UPLOADS to their users, i propose a workaround that allows to show a list of files uploaded in the last xx days. For this you need only two short pieces of macros.
The first macro must go in the section upload-success:
[upload-success]
....
{.if| %user% |{:
{.append| %folder-resource%\{.filename|%item-resource%.}.comment |uploaded by %user% /append.}
{.set|fnam|newuploads{.cut|1|5|%now%.}.lst.}
{.append|{.^fnam.}|<tr><td><a href ="%encoded-folder%\{.filename|%item-resource%.}"> %item-name% </a></td><td>%user%</td><td>%timestamp%</td></tr>.}
:}/if.}
this creates a a daily file named: newuploads(numberof the day).lst
Te second macro is a piece of code for which you can create a section to include in your template, which you could reach with a link. You may even elaborate it to allow the user to input for how many days befor he wants to see the news (1..10 days). I have set it fixed to 4 days in the example. You can modify this table with style or css elements to show the list accordingly to your preferences.
[newuploads]
{.set|day|{.cut|1|5|%now%.}.}
{.set|start|{.sub|{.^day.}|4.}.}
<table>
<th><td>filename</td><td>uploaded by</td><td>upload date</td></th>
{.for|ii|{.^start.}|{.^day.}|{:
{.load|newuploads{.^ii.}.lst.}:}
.}
</table>
The users can download directly form this table the files, also it is not possible to create a archive.tar. Another limit is that this list will only show files added with uploads, not what you add on your system directly by copying or moving to a folder.
Hope this solution can help someone
« Last Edit: February 25, 2009, 12:48:11 AM by bacter »
your computer has no brain - use your own !