Contents
ImageLink
The ImageLink macro was used to work around some link markup deficiencies in MoinMoin up to version 1.5.x. Starting with 1.6.0, it was replaced by better link/transclusion markup. The migration scripts converted all old content from 1.5 to the new syntax of 1.6, including replacing usage of ImageLink macro by builtin new syntax. Problem: this does not stop wiki users using the ImageLink macro, thus it was removed from the distribution archive for release 1.6.1 (you can still get it from MacroMarket if you insist on using it).
We should have done this for 1.6.0 of course, but well, it was overlooked. If you used moin 1.6.0 and your users have added ImageLink macro calls to the content of your wiki, please use full text search to locate them and replace them as you see below.
How to make links using images in 1.6.1+
Old way:
<<ImageLink(image,target[,width=width[,height=height]][,alt=alttag])>>
New way:
[[target|{{image|alt|width=123,height=456}}]]
You see, this is a quite natural way:
usually you write [[target|text]] when you want to use some text label
- if you rather want an image "label", you just use the image markup instead of the text
the markup for showing (transcluding) an image is {{image|alt|params}}
Description
This macro is used to make a link that displays an image (can be given as either attachment or URL) and links to either an URL or a wiki page. Optionally the size of the image can be adjusted. If no target is given the link will point to the image itself.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
1.6 |
|
|
|
1.5 |
|
|
|
1.5 |
Note: This one was linked to from the MacroMarket page for MoinMoin 1.5 -- JordanCronin 2008-01-30 19:12:49 |
|
|
1.5 |
|
|
|
1.5 |
|
|
|
1.3 |
|
|
|
1.3 |
|
|
|
1.3 |
|
Syntax
<<ImageLink(image,target[,width=width[,height=height]][,alt=alttag])>>
Parameters
image: image attachment file name or the URL of an image target: link target wiki page or URL (optional)
Keyword Parameters
width: rendered image width (optional) height: rendered image heigth (optional) alt: alt text
Examples
<<ImageLink(München.png,München,height=100)>> <<ImageLink(Images/München.png,München,height=100)>> <<ImageLink(http://webcam.portalmuc.de/images/webcam/webcam_marienplatz.jpg,München Marienplatz)>> <<ImageLink(plot.png,width=200)>> <<ImageLink(plot.png,height=200)>> <<ImageLink(plot.png)>> <<ImageLink(http://webcam.portalmuc.de/images/webcam/webcam_marienplatz.jpg,http://www.muenchen.de,width=150)>> <<ImageLink(münchen.png,http://www.muenchen.de,width=50)>> <<ImageLink(http://webcam.portalmuc.de/images/webcam/webcam_marienplatz.jpg)>> <<ImageLink(example.png,alt=whateveryouwant(üöä))>>
Copyright
License
Bugs
We have a wiki farm and a problem with this macro. Our farm has the prefix /xyz and the name of one the instances is /abc so the pages look like http://foo.com/xyz/abc/pagename. When I try to link to an attachment with ImageLink,the macro gives this for the link: http://foo.com/xyz/abc//xyz/abc/%3Faction%3DAttachFile%26do%3Dget%26target%3DExample.png. It adds twice the /xyz/abc/ part. Any ideas how this can be fixed? Thx.
Which moin version and which version of the macro do you use?
We have moin version 1.5.6 and use the ImageLink 1.5.3
Just tested with ImageLink 1.5.2 works fine on moin 1.5.6.
The ImageLink 1.5.3 version was a refactoring of the last ImageLink 1.5.2 version. It should not have created a regression. This code was in a further refactoring removed and replaced by Linking syntax (HelpOnLinking). The 1.5.X code will become no further fixes see SecurityFixes. The last 1.5.X release was 1.5.9. Anyway while the old code works for you you can live with it but 1.5.x is now 3 years old code and you may want to look at all the improvements we did at. -- ReimarBauer 2009-05-13 21:24:17
Discussion
- Status
- in 1.8 this was replaced by transclusion syntax