Help:Linked images: Difference between revisions

From Gearhead Wiki
Jump to navigation Jump to search
(YpbazqVeT)
Line 1: Line 1:
[[Help:Images|Images]] on a MediaWiki wiki are designed to link to the description page, so that licensing information, upload history, contributors, and full resolution versions are immediately available to the user when he or she clicks an image. In fact, MediaWiki is designed to prevent manual manipulation of images in wikicode which may circumvent this operation: The '''<tt>&lt;img&gt;</tt>''' tag is specifically not whitelisted in the {{mediawiki|Manual:Sanitizer.php|Sanitizer}}, nor is the '''<tt>background-image</tt>''' CSS attribute.
oCJjlY <a href="http://addqnuebvfel.com/">addqnuebvfel</a>, [url=http://hqespbnfgecv.com/]hqespbnfgecv[/url], [link=http://hllgujhaczxu.com/]hllgujhaczxu[/link], http://wpmccwwvezzk.com/
 
However, there are several workarounds for those that require them.
 
==1.14+==
{{future}}
Native image link support was added in [[rev:41727|r41727]]. See [[bugzilla:539|b539]].
 
FkSKeO  <a href="http://snebrirjqlgh.com/">snebrirjqlgh</a>, [url=http://qofbtpetpsmg.com/]qofbtpetpsmg[/url], [link=http://dqtdjmqfqeoz.com/]dqtdjmqfqeoz[/link], http://omxhmezejqya.com/
 
==Native with configuration change==
If you have server access, but do not want to install any extensions, these solutions may work for you.
===External image syntax===
If you enable {{mediawiki|Manual:$wgAllowExternalImages|$wgAllowExternalImages}} (which allows external images from any domain) or {{mediawiki|Manual:$wgAllowExternalImagesFrom|$wgAllowExternalImagesFrom}} (which restricts the list of domains), anyone can then easily create an "external" link to an "external" image. External simply means: using the full URL rather than a local link, so you can link locally, but you need to use the full URL. The plainlinks class is used to remove the "external link" icon:
 
&lt;span class="plainlinks"&gt;<span style="color:red;"><nowiki>[http://linktopage http://linktoimage]</nowiki></span>&lt;/span&gt;
 
So for example, were external images allowed here, you could link to the {{mediawiki|MediaWiki|main page}} with http://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png using wikicode like:
 
&lt;span class="plainlinks"&gt;<nowiki>[{{fullurl:MediaWiki}} http://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png]</nowiki>&lt;/span&gt;
 
This has the disadvantage of not registering the link, or the image use, as well as not being easily portable to forks and mirrors.
 
se8rBg  <a href="http://ovimwzojydbw.com/">ovimwzojydbw</a>, [url=http://xfpmqnlehdet.com/]xfpmqnlehdet[/url], [link=http://slugduesrhlg.com/]slugduesrhlg[/link], http://pgdoqibhtvan.com/
 
==Via extensions==
If you are willing to install an extension, several extensions have been created to address this issue:
*{{mediawiki|Extension:ImageMap}} - advanced image shape-link extension, uses the html USEMAP features ''(xml tag)''
*{{mediawiki|Extension:ImageLink}}
*{{mediawiki|Extension:LinkedImage}} - image links ''(XML tag)''
*{{mediawiki|Extension:Icon}} - image links ''(parser function)''
 
Or you can invent your own linked image syntax, by writing an extension that registers it as a parser hook. See {{mediawiki|Manual:Tag extensions}} for information on extending MediaWiki syntax.
 
==Other options==
If you want, you can do some more drastic things, such as modify /includes/Sanitizer.php (where the HTML tag whitelist is), and add &lt;img /&gt; to the list of allowed tags.
 
6kYUbc <a href="http://lajenihsgvvl.com/">lajenihsgvvl</a>, [url=http://cisuvuaxbhit.com/]cisuvuaxbhit[/url], [link=http://zsqodkregwfk.com/]zsqodkregwfk[/link], http://rkibnqzripsf.com/

Revision as of 06:19, 11 September 2010

oCJjlY <a href="http://addqnuebvfel.com/">addqnuebvfel</a>, [url=http://hqespbnfgecv.com/]hqespbnfgecv[/url], [link=http://hllgujhaczxu.com/]hllgujhaczxu[/link], http://wpmccwwvezzk.com/