A simple MediaWiki extension for rendering Scratch blocks.
This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2016-07-25 15:13:20 -04:00
scratchblocks@f1a837958e Update to scratchblocks tag v3.1 2016-05-18 18:51:07 +01:00
.gitattributes Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
.gitignore Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
.gitmodules Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
extension.json Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
inline.css # This is a combination of 48 commits. 2016-05-01 11:33:19 -04:00
LICENSE Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
README.md Update credits 2016-05-18 18:50:19 +01:00
run_scratchblocks.js Select all blocks with the same selector for speed 2016-05-04 21:13:48 -07:00
ScratchblockHooks.php Add some docs, chmod a-x some files 2016-05-04 21:10:36 -07:00
ScratchBlocks.php switched to array syntax that works with PHP5.3 2016-07-25 15:13:20 -04:00

A simple MediaWiki extension for rendering Scratch blocks.

Transforms <scratchblocks> tags inside wiki articles into <pre class="blocks"> in the HTML, which are then rendered to scratch blocks using CSS and JS included in the page. Inline blocks are rendered with <sb> tags, and become <code class="blocks"> tags.

  • Maintained by ErnieParke (@Choco31415).
  • Authored by tjvr

Installation

This repository uses Git submodules. If you git clone, make sure to include the --recursive option.

$ cd extensions
$ git clone --recursive http://github.com/tjvr/wiki-scratchblocks ScratchBlocks

Just drop this folder into MediaWiki's "extensions/" folder, and add

require_once( "$IP/extensions/ScratchBlocks/ScratchBlocks.php" );

to your "LocalSettings.php". If running Mediawiki 1.25 or greater, you can use

wfLoadExtension( "ScratchBlocks" );

instead of the require statement.