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.
mw-ScratchBlocks2/ScratchBlocks.php

86 lines
2.4 KiB
PHP
Raw Normal View History

2013-05-22 14:27:16 +01:00
<?php
/*
* ScratchBlocks extension for MediaWiki
* Renders <scratchblocks> tags to shiny scratch blocks
*
* Copyright 2013, Tim Radvan
* MIT Licensed
* http://opensource.org/licenses/MIT
*
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
* Includes scratchblocks v3
* https://github.com/tjvr/scratchblocks
2013-05-22 14:27:16 +01:00
*
*/
if (!defined('MEDIAWIKI')) {
die();
}
// Hooks
$wgExtensionFunctions[] = 'sbSetup';
$wgHooks['ParserFirstCallInit'][] = 'sbParserInit';
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
2013-05-22 14:27:16 +01:00
// Hook callback function into parser
function sbParserInit (Parser $parser) {
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
// Register <scratchblocks> and <sb> tag
2013-05-22 14:27:16 +01:00
$parser->setHook('scratchblocks', 'sbRenderTag');
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
$parser->setHook('sb', 'sbRenderInlineTag');
2013-05-22 14:27:16 +01:00
return true;
}
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
2013-05-22 14:27:16 +01:00
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
// Ouput HTML for <scratchblocks> tag
2013-05-22 14:27:16 +01:00
function sbRenderTag ($input, array $args, Parser $parser, PPFrame $frame) {
return '<pre class="blocks">' . htmlspecialchars($input) . '</pre>';
}
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
// Output HTML for inline <sb> tag
2013-05-22 14:27:16 +01:00
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
function sbRenderInlineTag ($input, array $args, Parser $parser, PPFrame $frame) {
//throw new Exception("what");
return '<code class="blocks">' . htmlspecialchars($input) . '</code>';
}
2013-05-22 14:27:16 +01:00
// Make wiki load resources
function sbSetup () {
global $wgOut;
$wgOut->addModules('ext.scratchBlocks');
}
// Define resources
$wgResourceModules['ext.scratchBlocks'] = array(
'scripts' => array(
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
'ScratchBlocks/src/scratchblocks.js',
'scratchblocks/src/translations.js',
'run_scratchblocks.js',
2013-05-22 14:27:16 +01:00
),
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
'styles' => '/inline.css',
2013-05-22 14:27:16 +01:00
// jQuery is loaded anyway
'dependencies' => array(),
// Where the files are
'localBasePath' => __DIR__,
# This is a combination of 48 commits. # The first commit's message is: Delete .gitmodules # This is the 2nd commit message: Delete LICENSE # This is the 3rd commit message: Delete README.md # This is the 4th commit message: Delete ScratchBlocks2.php # This is the 5th commit message: Delete run_scratchblocks2.js # This is the 6th commit message: Updated to v3. # This is the 7th commit message: Added github link. # This is the 8th commit message: Changed language choosing method. # This is the 9th commit message: Test. # This is the 10th commit message: Deleting every file in folder. Sigh... # This is the 11th commit message: Deleting every file in folder. Sigh... # This is the 12th commit message: Deleting every file in folder. Sigh... # This is the 13th commit message: Deleting every file in folder. Sigh... # This is the 14th commit message: Deleting every file in folder. Sigh... # This is the 15th commit message: Deleting every file in folder. Sigh... # This is the 16th commit message: Deleting every file in folder. Sigh... # This is the 17th commit message: Deleting every file in folder. Sigh... # This is the 18th commit message: Deleting every file in folder. Sigh... # This is the 19th commit message: Deleting every file in folder. Sigh... # This is the 20th commit message: Deleting every file in folder. Sigh... # This is the 21st commit message: Deleting every file in folder. Sigh... # This is the 22nd commit message: Deleting every file in folder. Sigh... # This is the 23rd commit message: Deleting every file in folder. Sigh... # This is the 24th commit message: Deleting every file in folder. Sigh... # This is the 25th commit message: Deleting every file in folder. Sigh... # This is the 26th commit message: Deleting every file in folder. Sigh... # This is the 27th commit message: Deleting every file in folder. Sigh... # This is the 28th commit message: Deleting every file in folder. Sigh... # This is the 29th commit message: Deleting every file in folder. Sigh... # This is the 30th commit message: Deleting every file in folder. Sigh... # This is the 31st commit message: Deleting every file in folder. Sigh... # This is the 32nd commit message: Deleting every file in folder. Sigh... # This is the 33rd commit message: Deleting every file in folder. Sigh... # This is the 34th commit message: Deleting every file in folder. Sigh... # This is the 35th commit message: Deleting every file in folder. Sigh... # This is the 36th commit message: Deleting every file in folder. Sigh... # This is the 37th commit message: Deleting every file in folder. Sigh... # This is the 38th commit message: Deleting every file in folder. Sigh... # This is the 39th commit message: Deleting every file in folder. Sigh... # This is the 40th commit message: Submodule. *Crosses fingers. # This is the 41st commit message: Added inline support, fixed comment. # This is the 42nd commit message: Minor comment tweak. # This is the 43rd commit message: Removed unneeded line. # This is the 44th commit message: Inline SB Update Part 1 # This is the 45th commit message: Part 2 # This is the 46th commit message: Created css file for inline scratchblocks styling. # This is the 47th commit message: Enabled some extra inline scratchblocks styling. # This is the 48th commit message: Unsure what this is. Will rebase in moment.
2016-04-24 11:54:27 -04:00
'remoteExtPath' => 'ScratchBlocks'
2013-05-22 14:27:16 +01:00
);
2016-05-01 19:56:10 -04:00
$wgExtensionCredits['parserhook'][] = array(
'name' => "Scratchblocks", // Name of extension - string
'description' => "This plugin takes text-based Scratch code and renders it in a graphical format.", // Description of what the extension does - string. Omit in favour of descriptionmsg.
'version' => 3.1, // Version number of extension - number or string
'author' => ["ErnieParke","blob8108"], // The extension author's name - string or array for multiple
'url' => "https://github.com/tjvr/wiki-scratchblocks", // URL of extension (usually instructions) - string
'license-name' => "https://github.com/tjvr/wiki-scratchblocks/blob/master/LICENSE", // Short name of the license, links LICENSE or COPYING file if existing - string, added in 1.23.0
);