[pmwiki-users] Inserting files from the local file system

Stirling Westrup sti at pooq.com
Sat Apr 7 23:47:14 CDT 2007


Petko Yotov wrote:
> On Sunday 08 April 2007 04:47, Steven Benmosh wrote:
>> Two questions/problems I am running into:
>>
>> 1. I have pmwiki set up in my web server root. I have a directory called
>> "images", with image files in it, including one called "SantaBarbara.jpg".
>>
>> I would like to attach the image to a wiki page. I can do it by linking to
>> the actual url of the file, in the form
>> http://my.web.site/images/SantaBarbara.jpg. I am wondering if there is a
>> simpler way to connect to a local file, maybe with a relative link, without
>> having to type the whole url and create a static link (that would not
>> change if I move the wiki to another site)?
> 
> Yes, you can use a "Path:" link to point to files on the server, but that are 
> not on the wiki uploads directory structure:
> 
>    Path:/images/SantaBarbara.jpg
> 
> If the link ends with .jpg, .gif or .png, it will be considered as an inline 
> image. To add a tooltip title, use 
>    Path:/images/SantaBarbara.jpg"View from Santa Barbara"
> 
> To only link to the file, use
>    [[Path:/images/SantaBarbara.jpg|this is a link]]
> 
> This way you can also link to other files on the same website, like old HTML 
> pages. See also:
>    http://pmwiki.org/wiki/PmWiki/InterMap
> 

Like Petko said, Intermaps are the way to go. You can also define a custom
intermap entry so that you would just use

  Image:SantaBarbara.jpg

If you ever move the wiki, all you would have to redefine is the intermap
definition for Image.



More information about the pmwiki-users mailing list