[pmwiki-users] managing images
tamouse mailing lists
tamouse.lists at gmail.com
Fri Mar 15 05:30:09 CDT 2013
On Thu, Mar 14, 2013 at 11:50 AM, jdd <jdd at dodin.org> wrote:
> Hello :-)
> I have a lot of pages mostly build with images like this one:
> images come from my image gallery piwigo.
Looking at the page source, I see you're basically just linking to the
images in your gallery, which is good.
> But I would prefere to have the images tied with the pmwiki data (in the
> upload directory), but uploading them is long and tedious (the server is
> online, hosted)
> I just fear, someday, to change inadvertendly some repository of the gallery
> - the gallery itself may change setup.
> if there a script that coul scan the pmwiki pages, and if there is an image
> outside of the pmwiki folder copy it on the right place and fix the link?
> for future use, is there a way to attach an image url and have the image
> copied in pmwki and not just linked?
What I would suggest, as an alternative to moving big chunks of image
data around, that as long as you have them in a gallery/repository of
some kind, is createa custom Page Variable  that encapsulates the
location. Then, if at some point in the future you decide to move
things from piwigo, you can just change the page variable and have it
point at the new location.
The page variable method is really simple; You can construct it in a
local php configuration file (so, say `local/config.php`, or if it is
just for a particular Group, local/Group.php)
$FmtPV['piwigo'] = "'http://dodin.org/piwigo/galleries/'";
(The double quoting is necessary for the way PmWiki references and
uses the page variables.)
Then in your page, you can use it as:
Another thing that is possible is to use InterMap (InterWiki)  mapping, thus:
in the Site.InterMap file, then reference this in your page markup as:
Going another way, you might be able to encapsulate it all inside some
custom MarkUp .
The problem that remains, as I see it, is the paths to each file below
`../galleries/`, which could change if you were to go to a new
gallery/repository thing. To make this more future-proof, you might
want to combine Page Variables and custom MarkUp in some way.
More information about the pmwiki-users