Extension:ShrinkTheWeb

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ShrinkTheWeb

Release status:Extension status beta

300px
ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Adds <ShrinkTheWeb> tags that produce a snapshot of any website given between the tags
Author(s)Template:Extension#username Felipe Schenonetalk
Latest versionTemplate:Extension#version 0.1 (2014-03-01)
MediaWikiTemplate:Extension#mediawiki 1.22+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GPL
Download
ExampleTemplate:Extension#example www.auslandssemester-bali.de
TagsTemplate:Extension#tags
<ShrinkTheWeb>
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

Translate the ShrinkTheWeb extension if it is available at translatewiki.net

Check usage and version matrix.

The ShrinkTheWeb extension adds <ShrinkTheWeb> tags that produce a snapshot of any website given between the tags. For example, writing <ShrinkTheWeb>http://www.mediawiki.org/</ShrinkTheWeb> will produce a snapshot of the MediaWiki homepage.

Installation[edit]

  • Download and place the file(s) in a directory called ShrinkTheWeb in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/ShrinkTheWeb/ShrinkTheWeb.php";
    $egShrinkTheWebAccessKey = 'your-access-key';
    
  • Get your access key by registering yourself and your wiki at shrinktheweb.com
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage[edit]

The basic usage of the extension is simply <ShrinkTheWeb>http://www.mediawiki.org/</ShrinkTheWeb>, which produces a snapshot of the website between the tags, in this case the MediaWiki homepage.

There is an optional "size" parameter that allows to vary the size of the snapshot. The possible values for the parameter are "micro", "tiny", "small", "medium" and "large", with the default being "medium". Thus for example, <ShrinkTheWeb size="large">http://www.mediawiki.org/</ShrinkTheWeb> will produce a large snapshot of the MediaWiki homepage.

Another optional parameter is "link". By default, the snapshot will link to the website between the tags. The "link" parameter allows to change that, so that the snapshot links to any desired website. For example, <ShrinkTheWeb link="http://www.wikipedia.org/">http://www.mediawiki.org/</ShrinkTheWeb> will produce a snapshot of the MediaWiki homepage, but will link to the Wikipedia homepage.