[Moin-user] Problems with ImageLink

Arp moin.askthem at gmail.com
Sun May 21 15:19:01 EDT 2006


I'm having problems getting the desired result from the ImageLink macro

(Currently Running: Debian Sarge on Xen, Python: 2.3.5, MoinMoin:
1.5.3-1 on Twisted 2.2.0-2)

I've tried two versions of ImageLink:
 * ImageLink.py (old): Thomas Waldmann 2006-03-10 code refactored
 * ImageLink.py (new): Reimar Bauer 2006-05-09 bug fix of relative
names for images (taintfilename!)

What I want to do is use a little flag icon as a link to jump to a
subpage that has the contents in a different language. So, on a page
ProjectPages/NewProject  a link such as [[ImageLink(de.png,/De)]]
should display a clickable flag icon "de.png" and provide a link to
the subpage ProjectPages/NewProject/De.

No link to SubPage
First problem is that I can get neither version to link to the subpage:
[[ImageLink(de.png,De)]]  results in URL http://mywiki.org/De/  (as
might be expected)
[[ImageLink(de.png,/De)]]  results in URL http://De/
[[ImageLink(de.png,./De)]]  results in URL http://mywiki.org/De/
[[ImageLink(de.png,:/De)]]  results in URL http://mywiki.org/:De/
[[ImageLink(de.png,[:/De])]]  results in URL http://mywiki.org/[:De]/
etc etc -

The only one I get to work is: [[ImageLink(de.png,ProjectPages/NewProject/De)]]
Which is of course not a subpage address at all, but rather the full name.

Image From Other Page
The second problem is that I really wanted to use an icon from the
theme directory like "flag-de.png" for example - the one that can be
addressed as smiley by using the {de} smiley code. I could find _no_
easy way to address these so I resorted to uploading these as
attachments. If this "de.png" is uploaded as an attachment to the
ProjectPages/NewProject the ImageLink works (with the long pathname
for the subpage).

However, this is an icon for general use so I would really want it to
be addressed as an attachment to a different page - possibly
systemwide. At the very least something like so:

I got this working with the old ImageLink macro (last edit by Thomas),
but decided to give the new macro (last edit by Reimar) a try as for
other pictures the use of [[ImageLink(Img/MyPicture.png)]] did display
the picture but did _not_ link to the image as advertised, but instead
to http://Img/MyPicture.png

After replacing the ImageLink.py and restarting mointwisted all pages
with ImageLinks referencing images on the /Img page are now broken (no
image displayed) and substituted by thing like:  Upload new attachment
"Img_de.png"   Note the underscore where a / should be.

So - back to the older version for now.

Is there matbe something wrong with my config or is ImageLink just not
intended to use pictures form other pages and unable to link to
subpages ??

Thanks in advance

More information about the Moin-user mailing list