[pmwiki-users] $UploadPrefixFmt and Attach files
Eemeli Aro
eemeli at gmail.com
Fri Apr 4 04:36:38 CDT 2008
On Mon, Mar 31, 2008 at 3:53 AM, Hans <design5 at softflow.co.uk> wrote:
> I would like to be able to upload in some wiki groups
> so the uploaded files are stored in
> uploads/$Group/$Name/ folders, and in some groups in
> uploads/$Group/ folders.
>
> How do I configure this, and also have the Attach: markup working,
> so that Attach:{$Name}.jpg will work in both cases, i.e. an image file
> with the page name as file name will be displayed in the page without
> needing a Group/ or Group/Name part.
Try setting $UploadFileFmt to something different eg.
'$UploadFolderByPage', and then adding it's definition to $FmtPV.
For example:
$UploadFileFmt = '$UploadFolderByPage';
$FmtPV['$UploadFolderByPage'] = '($group == "Special") ?
"uploads/$group/$page" : "uploads/$group"';
That ought to get FmtPageName to eval the path to the upload depending
on the page to which that upload belongs, and make Attach:anything
work.
eemeli
More information about the pmwiki-users
mailing list