Extension:JQuerySnowfall

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
JQuerySnowfall
Release status: stable
Implementation Tag
Description Allows to make it snow on MediaWiki with the JQuery-Snowfall plugin
Author(s) Nikus Pokus
Latest version 1.0
Database changes No
License GNU Affero General Public License 3.0
Download
Translate the JQuerySnowfall extension if it is available at translatewiki.net
Check usage and version matrix.

This extension makes it snow on MediaWiki web pages with the JQuery-Snowfall plugin.

Installation[edit]

  • Download and place the file(s) in a directory called JQuerySnowfall in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'JQuerySnowfall' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'JQuerySnowfall' );, you need to use:

require_once "$IP/extensions/JQuerySnowfall/JQuerySnowfall.php";

Configuration[edit]

Flake images instead of white dots[edit]

The JQuery-Snowfall plugin supports the use of images for the flakes.
To use an image for the flakes, edit the file "extensions/JQuerySnowfall/init.js":

    // comment the following line
    //$(document).snowfall();

    // add the following line
    $(document).snowfall({image :"https://mywiki.domain.net/images/1/11/Flake.png", minSize: 10, maxSize:32});

You can use the flake image located in extensions/JQuerySnowfall/JQuery-Snowfall/images/flake.png:

  1. import the image in your MediaWiki web site
  2. use the url of the imported image

The JQuery-Snowfall plugin[edit]

This extension is bundled with JQuery-Snowfall version 1.7.4
If you want a different version of the JQuery-Snowfall plugin:

  1. go on the GitHub repository of the project and download it.
  2. remove or rename the extensions/JQuerySnowfall/JQuery-Snowfall folder.
  3. unarchive the custom package in extensions/JQuerySnowfall. You should have a fresh new extensions/JQuerySnowfall/JQuery-Snowfall folder.

See also[edit]