[pmwiki-users] $UploadPrefixFmt and Attach files
Hans
design5 at softflow.co.uk
Thu Apr 3 10:12:32 CDT 2008
Can anyone please help with this problem?
Thanks -
Hans
Monday, March 31, 2008, 1:53:36 AM, Hans 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.
> Setting $UploadPrefixFmt should set the upload path, but it only
> sets it if I also set in config.php
> $UploadDir = 'uploads';
> $UploadPrefixFmt = '/$Group';
> $UploadFileFmt = "$UploadDir$UploadPrefixFmt";
> So I tried to do it conditionally
> # per group subdirectories
> WikiDir = new PageStore('wiki.d/$Group/$FullName');
> $group = PageVar($pagename,'$Group');
> if ($group=='Special') {
> $UploadDir = 'uploads';
> $UploadPrefixFmt = '/$Group';
> $UploadFileFmt = "$UploadDir$UploadPrefixFmt";
> }
> but how will the Attach:filename.jpg work in pages of the 'Special'
> group?
> (The reason for two different file structures is, that some groups
> have per page subdirecories in order to have per page image galleries,
> and others shall not have per page subdirectories, as there will only
> be one image per page, but about a thousand pages....)
> Thanks for any hints!
> ~Hans
More information about the pmwiki-users
mailing list