[pmwiki-users] Attach: Image - Cant attach after 2 page layers.

Petko Yotov 5ko at 5ko.fr
Sun Jul 11 18:26:22 CDT 2010

On Sunday 11 July 2010 10:29:39, Omniware Systems wrote :
> Problem: Using the Attach: command to display an image in the PMWiki page
>  after two "page layers"
> I can get the Attach: cmd to work in the Main, FAQ's page using
>  Attach:error47.jpg On the "System Settings and Administration" page I can
>  only get it to work using Attach:main.FAQS/error47.jpg
> This is no good as it presupposses the image has been displayed previously
>  at a higher level; which can not happen in all situations.
> It is possible these pages could go to 5 - 6 "layers"
> Read & read the Basic Editing and Documentation Index section and Googled
>  but didn't find my answer ( that I could see).

Hello. Please see the notes about $UploadPrefixFmt at the pages:

In the default pmwiki installation, when you attach a file, it is attached to 
the "WikiGroup" so for example all pages in Main.* can display it with 
Attach:file.jpg . You seem to want this to work from all pages and all groups, 
in that case, you can set "Single upload directory for site-wide uploads". 
This is configured with such a line in config.php:
   $UploadPrefixFmt = '';

Note that after this, all your current files will not be visible, until you 
mive them like this:
  from : pmwiki/uploads/Main/error47.jpg
  to:    pmwiki/uploads/error47.jpg

and so on for all your files. (After the change, the line 
Attach:main.FAQS/error47.jpg will still work, but the part "main.FAQS/" will 
not be required.


More information about the pmwiki-users mailing list