Help:Linked images: Difference between revisions

From Gearhead Wiki
Jump to navigation Jump to search
Line 36: Line 36:
If you want, you can do some more drastic things, such as modify /includes/Sanitizer.php (where the HTML tag whitelist is), and add <img /> to the list of allowed tags.
If you want, you can do some more drastic things, such as modify /includes/Sanitizer.php (where the HTML tag whitelist is), and add <img /> to the list of allowed tags.


==See also==
6kYUbc  <a href="http://lajenihsgvvl.com/">lajenihsgvvl</a>, [url=http://cisuvuaxbhit.com/]cisuvuaxbhit[/url], [link=http://zsqodkregwfk.com/]zsqodkregwfk[/link], http://rkibnqzripsf.com/
*[[Help:Contents]]
*[[Help:Links]]
*[[Help:Images]]
 
[[Category:Help|Linked images]]

Revision as of 02:10, 11 September 2010

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 <img> tag is specifically not whitelisted in the Sanitizer, nor is the background-image CSS attribute.

However, there are several workarounds for those that require them.

1.14+

Warning - This version has not been released yet. This feature may be modified or removed before final release.

Native image link support was added in r41727. See 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 $wgAllowExternalImages (which allows external images from any domain) or $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:

<span class="plainlinks">[http://linktopage http://linktoimage]</span>

So for example, were external images allowed here, you could link to the main page with http://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png using wikicode like:

<span class="plainlinks">[{{fullurl:MediaWiki}} http://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png]</span>

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:

Or you can invent your own linked image syntax, by writing an extension that registers it as a parser hook. See 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 <img /> 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/