|
Cookbook /
Recent Uploads LogSummary: List all uploaded files in the RecentUploads pages
Version: 2007-03-12
Maintainer: Petko
Categories: Uploads, Administration
Questions answered by this recipeHow do I track every uploaded file in the RecentChanges and AllRecentChanges pages and easily review it? DescriptionEvery uploaded file is logged in the Group.RecentUploads pages with a link from (All)RecentChanges for easy review. To install this recipe:
The format logged in the (All)RecentChanges pages is as follows:
where Page is a link to the wiki page where the file was attached, and Picture.png is a link to the file itself (click to download/review it). Only the latest upload for a Group is displayed in RecentChanges, however, clicking on the link Group.RecentUploads will show you all uploaded files for the Group. In a new special page RecentUploads (you can go there from the link at the RecentChanges page) are stored logs for all uploaded attachments in the format:
Note that in the current PmWiki core, a page named RecentUploads will be excluded from page lists (with list=normal). Changing the default logging format(For advanced administrators.) The default format is:
$RecentUploadsFmt['$SiteGroup.AllRecentChanges'] =
'* [[{$Group}.RecentUploads]] . . . $CurrentTime $AuthorLink :'
.' [[{$Group}/{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]] ($upsize)';
$RecentUploadsFmt['$Group.RecentChanges'] =
'* [[{$Group}/RecentUploads]] . . . $CurrentTime $AuthorLink :'
.' [[{$Group}/{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]] ($upsize)';
$RecentUploadsFmt['$Group.RecentUploads'] =
'* [[{$Group}/{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]]'
.' . . . $CurrentTime $[by] $AuthorLink ($upsize)';
To change the default format of what is printed in the RecentChanges and RecentUploads pages, you can change the $RecentUploadsFmt variable. It is the same as For example, to list every single upload in Site.AllRecentChanges, you can set something like this in config.php:
$RecentUploadsFmt['$SiteGroup.AllRecentChanges'] =
'* [[{$Group}.{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]]'
.' . . . $CurrentTime $[by] $AuthorLink ($upsize)';
To unset one of the three default pages, where information is logged, set the following in config.php after the include_once() call. To log nothing on Site.AllRecentChanges: unset($RecentUploadsFmt['To log nothing on Group.RecentChanges: unset($RecentUploadsFmt['$Group.RecentChanges']); Notes
Release Notes
CommentsChanging the name of this recipe means the SiteAnalyzer cannot compare versions QuestionsIs there, or is it possible to create, a Site.AllRecentUploads analagous to the Site.AllRecentChanges page.? Sure, you can add to config.php the code: $RecentUploadsFmt['$SiteGroup.AllRecentUploads'] =
'* [[{$Group}.{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]]'
.' . . . $CurrentTime $[by] $AuthorLink ($upsize)'; It will list every upload to Site.AllRecentUploads. --Petko August 21, 2008, at 05:18 AM
See Also
Contributors |