Difference between revisions of "User:Matt/Image inclusion"

From AAPG Wiki
Jump to navigation Jump to search
(testing)
 
(explain)
 
Line 1: Line 1:
 
This page is for testing external image inclusion.  
 
This page is for testing external image inclusion.  
 +
 +
Here's our set-up as of 1 April:
 +
 +
<pre>
 +
# Allow the use of the <img> tag; could use this for Main Page
 +
# but there is no apparent way to limit the allowed URLs.
 +
#$wgAllowImageTag = true;
 +
 +
# Allow a whitelist of image sources, needed for Main Page
 +
# Whitelist is at http://wiki.aapg.org/MediaWiki:External_image_whitelist
 +
$wgEnableImageWhitelist = true;
 +
 +
# InstantCommons allows wiki to use images from http://commons.wikimedia.org
 +
$wgUseInstantCommons = true;
 +
</pre>
 +
 +
So we are allowing aapg.org images as 'naked' URLs (see below), but not allowing the <code><img></code> tag. What follows are various test cases. Some of them might do silly things, depending on what's in '''LocalSettings.php''' right now.
  
 
==From this wiki==
 
==From this wiki==
 +
Currently, these work because images on this wiki are whitelisted.
  
 
http://wiki.aapg.org/images/8/88/MainPage_Newfoundland-hero.jpg
 
http://wiki.aapg.org/images/8/88/MainPage_Newfoundland-hero.jpg

Latest revision as of 18:19, 1 April 2014

This page is for testing external image inclusion.

Here's our set-up as of 1 April:

# Allow the use of the <img> tag; could use this for Main Page
# but there is no apparent way to limit the allowed URLs. 
#$wgAllowImageTag = true;

# Allow a whitelist of image sources, needed for Main Page
# Whitelist is at http://wiki.aapg.org/MediaWiki:External_image_whitelist
$wgEnableImageWhitelist = true;

# InstantCommons allows wiki to use images from http://commons.wikimedia.org
$wgUseInstantCommons = true;

So we are allowing aapg.org images as 'naked' URLs (see below), but not allowing the <img> tag. What follows are various test cases. Some of them might do silly things, depending on what's in LocalSettings.php right now.

From this wiki[edit]

Currently, these work because images on this wiki are whitelisted.

http://wiki.aapg.org/images/8/88/MainPage_Newfoundland-hero.jpg

[1]

<img src="http://wiki.aapg.org/images/8/88/MainPage_Newfoundland-hero.jpg" />

Interwiki site[edit]

http://www.subsurfwiki.org/mediawiki/images/5/54/Downloading_zip_file_example.jpg

[2]

<img src="http://www.subsurfwiki.org/mediawiki/images/5/54/Downloading_zip_file_example.jpg" />

External site[edit]

By Flickr user brewbooks, icensed CC-BY

https://farm4.staticflickr.com/3438/3917864061_fd13882903_z.jpg

[3]

<img src="https://farm4.staticflickr.com/3438/3917864061_fd13882903_z.jpg" />