mediawiki image link to an article
Filed Under (mediawiki) by admin on 02-02-2010
Images on a MediaWiki wiki will by default, link to the description page
Here is a work around that when you click an image it will link to an ariticle
[[Image:Wiki.png|50px|link=MediaWiki]]
Note: The code above will work in mediawiki version 1.14 and above only
——————————————————————————————————-
Here is the workaround for older versions
Edit the Common.css
.imagelink_somename a {
width:100px;
height:100px;
display:block;
text-decoration:none;
background-image: url("http://fullurltoimage")
}
In your wiki code:
<div class="imagelink_somename">[[Some link| ]]</div>
——————————————————————————————————–
Or try the quick way
<div style="position: relative; width: {{{width}}}; height: {{{height}}}; overflow: hidden;">
<div style="position: absolute; top: 0px; left: 0px; font-size: 100px; overflow: hidden; line-height: 100px; z-index: 3;">[[{{{link}}}| ]]</div>
<div style="position: absolute; top: 0px; left: 0px; z-index: 2;">[[Image:{{{image}}}|{{{width}}}|{{{link}}}]]</div>
</div>
More workarounds found at mediawiki docs
http://www.mediawiki.org/wiki/Help:Linked_images#link.3D_Syntax_available_since_version_1.14


