Difference between revisions of "Adaptivethumb"

From ThorstensHome
Jump to: navigation, search
(mediawiki version 1.34 and newer)
Line 17: Line 17:
  
 
== mediawiki version 1.34 and newer ==
 
== mediawiki version 1.34 and newer ==
To install this extension, in this example for Linux,
+
Follow https://www.mediawiki.org/wiki/Extension:AdaptiveThumb
* log in to your web server, go to the IP/extensions folder of mediawiki, for example:
+
cd /var/www/html/mediawiki/extensions/
+
* download the extension
+
wget --no-check-certificate https://github.com/tstaerk/adaptivethumb/archive/master.zip
+
* unpack it
+
unzip master.zip
+
* rename it
+
mv adaptivethumb-master/ adaptivethumb
+
* add the following to LocalSettings.php:
+
$wgAllowExternalImages=true;
+
wfLoadExtension( 'adaptivethumb' );
+
  
 
== mediawiki version 1.21 and older ==
 
== mediawiki version 1.21 and older ==

Revision as of 14:46, 1 January 2021

AdaptiveThumb is a MediaWiki extension that allows you to create a thumbnail for an image that scales with the browser size.

Contents

What can this extension do?

This extension allows you to show images that scale with the browser window. Find an example below:

resize your browser window and I will change my size ;)

You can also define pictures without a caption:

Download instructions

Download the package here: https://github.com/tstaerk/adaptivethumb/archive/master.zip.

Installation

I tested the installation with mediawiki version 1.21 and 1.34. For 1.34, I had to use the newer method wfLoadExtension which was not the case with 1.21.

mediawiki version 1.34 and newer

Follow https://www.mediawiki.org/wiki/Extension:AdaptiveThumb

mediawiki version 1.21 and older

To install this extension, in this example for Linux, unpack it to the $IP/extensions folder:

extensions# unzip master.zip

A new folder $IP/extensions/adaptivethumb will be added. Make sure its owner:group is www-data:www-data or whatever you apache is running as:

extensions# chown -R www-data:www-data adaptivethumb

Add the following to LocalSettings.php:

require_once("$IP/extensions/adaptivethumb/adaptivethumb.php");
$wgAllowExternalImages=true;

Usage

To use this extension, simply put a <pic> tag into your mediawiki markup like this:

<pic src="/mindmap.jpg" width=30% align=text caption="this is a mindmap" />

Pages

Download, Code, Bugreporting here: https://github.com/tstaerk/adaptivethumb

adaptivethumb@mediawiki: https://www.mediawiki.org/wiki/Extension:AdaptiveThumb

See also