Пример #1
0
* Download & Install [[Extension:PageFunctions]] extension
* Download & Install [[Extension:ParserPhase2]] extension
* Dowload all this extension's files and place in the desired directory
* Apply the following changes to 'LocalSettings.php' after the statements of [[Extension:StubManager]]:
<source lang=php>
require('extensions/ScriptingTools/ScriptingTools_stub.php');
</source>

== HISTORY ==

== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[ScriptingTools::thisType][] = array('name' => ScriptingTools::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Provides an interface between MediaWiki scripting tools', 'url' => 'http://mediawiki.org/wiki/Extension:ScriptingTools');
class ScriptingTools
{
    const thisName = 'ScriptingTools';
    const thisType = 'other';
    static $magicWord = '__jsminandstore__';
    static $patterns = array('/<javascript(?:.*)\\>(.*)(?:\\<.?javascript>)/siU', '/<js(?:.*)\\>(.*)(?:\\<.?js>)/siU');
    const open_js = '<script type= "text/javascript">/*<![CDATA[*/';
    const close_js = '/*]]>*/</script>';
    // relative directory from MediaWiki installation.
    static $base = 'BizzWiki/scripts/';
    public function __construct()
    {
        // take on global setting, if present.
        global $bwScriptsDirectory;
        if (isset($bwScriptsDirectory)) {
Пример #2
0
 public function __construct()
 {
     global $wgExtensionCredits;
     $wgExtensionCredits[self::thisType][] = array('name' => self::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Provides Task Scheduling functionality');
 }
Пример #3
0
<?php

/**
 * @author Jean-Lou Dupont
 * @package UserSettingsChangedLog
 * @version $Id$
 */
//<source lang=php>*/
$wgExtensionCredits['other'][] = array('name' => 'UserSettingsChangedLog', 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Provides logging of user settings changed', 'url' => 'http://mediawiki.org/wiki/Extension:UserSettingsChangedLogging');
StubManager::createStub('UserSettingsChangedLog', dirname(__FILE__) . '/UserSettingsChangedLog.body.php', dirname(__FILE__) . '/UserSettingsChangedLog.i18n.php', array('UserSettingsChanged'), true);
//</source>
Пример #4
0
<?php

/*
<!--<wikitext>-->
 <file>
  <name>Etag.php</name>
  <version>$Id$</version>
  <package>Extension.Etag</package>
 </file>
<!--</wikitext>-->
*/
// <source lang=php>
if (class_exists('StubManager')) {
    StubManager::createStub2(array('class' => 'Etag', 'classfilename' => dirname(__FILE__) . '/Etag.body.php', 'tags' => array('etag')));
    $wgExtensionCredits['parser'][] = array('name' => 'Etag', 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'url' => 'http://www.mediawiki.org/wiki/Extension:Backup', 'description' => "Supports the <etag> tag.");
} else {
    echo 'Extension:Etag <b>requires</b> [[Extension:StubManager]]';
}
//</source>
Пример #5
0
require('extensions/RegexTools.php');
require('extensions/RegexNamespaceContext_stub.php');
</source>

== History ==
* Used another parser instance instead of the global wgParser one: better integration with other extensions
* Fixed major bug: needed to 'clone' the wgParser in order to keep all the hooks/parser functions etc.
* Fixed 'skin' related bug: 'ParserAfterTidy' gets called during MediaWiki skin's string processing
* Added special word '__DISABLECONTEXT__' 

== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[RegexNamespaceContext::thisType][] = array('name' => RegexNamespaceContext::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Supports regex based 'edit form' text preloading and 'header'/'footer' wikitext pages insertion.", 'url' => 'http://mediawiki.org/wiki/Extension:RegexNamespaceContext');
class RegexNamespaceContext
{
    const thisType = 'other';
    const thisName = 'RegexNamespaceContext';
    const headerNone = '<!--header_none-->';
    const headerOpen = '<!--header_open-->';
    const headerClose = '<!--header_close-->';
    const footerNone = '<!--footer_none-->';
    const footerOpen = '<!--footer_open-->';
    const footerClose = '<!--footer_close-->';
    static $cpBaseName = 'Context';
    var $cpNsId;
    var $thisPageName;
    var $cpTitle;
    var $cpArticle;
Пример #6
0
<?php

/**
 * @author Jean-Lou Dupont
 * @package AddScriptCss
 */
//<source lang=php>*/
$wgExtensionCredits['other'][] = array('name' => 'AddScriptCss', 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Adds javascript and css scripts to the page HEAD or BODY sections', 'url' => 'http://mediawiki.org/wiki/Extension:AddScriptCss');
StubManager::createStub('AddScriptCss', dirname(__FILE__) . '/AddScriptCss.body.php', null, array('OutputPageBeforeHTML', 'ParserAfterTidy'), false, array('addtohead', 'addscript'), array('addscript'), null);
//</source>
Пример #7
0
<?php

/**
 * @author Jean-Lou Dupont
 * @package RawRight
 */
//<source lang=php>*/
$wgExtensionCredits['other'][] = array('name' => 'RawRight', 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Status: ", 'url' => 'http://mediawiki.org/wiki/Extension:RawRight');
StubManager::createStub('RawRight', dirname(__FILE__) . '/RawRight.body.php', null, array('SpecialVersionExtensionTypes', 'RawPageViewBeforeOutput'), false, null, null, null);
//</source>
Пример #8
0
* added functionality to define a class for handling form processing
* removed dependency on ExtensionClass
* added stubbing capability through StubManager

== See Also ==
* [[Extension:BizzWiki|BizzWiki platform]]

== Code ==
<!--</wikitext>--><source lang=php>*/
/*
	// create stub object.
	require( $IP.'/includes/StubObject.php');
	$wgAutoloadClasses['FormHelper'] = dirname(__FILE__) . "/FormHelper.php" ;
	$bwFormHelper = new StubObject( 'bwFormHelper', 'FormHelper' );
*/
$wgExtensionCredits[FormProc::thisType][] = array('name' => FormProc::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Handles "action=formsubmit" post requests through page based PHP code', 'url' => 'http://mediawiki.org/wiki/Extension:FormProc');
class FormProc
{
    // constants.
    const thisName = 'FormProc';
    const thisType = 'other';
    function __construct()
    {
    }
    public function hUnknownAction($action, &$article)
    {
        // check if request 'action=formsubmit'
        if ($action != 'formsubmit') {
            return true;
        }
        // continue hook-chain.
== Installation ==
To install independantly from BizzWiki:
* Download & Install [[Extension:StubManager]] extension
* Dowload all this extension's files and place in the desired directory
* Apply the following changes to 'LocalSettings.php' after the statements of [[Extension:StubManager]]:
<source lang=php>
require('extensions/RecentChangesManager/RecentChangesManager_stub.php');
</source>

== History ==
* Removed dependency on ExtensionClass
* Added 'stubbing' capability through StubManager

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[RecentChangesManager::thisType][] = array('name' => RecentChangesManager::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Prevents RecentChanges entries from being deleted", 'url' => StubManager::getFullUrl(__FILE__));
class RecentChangesManager
{
    const thisName = 'RecentChangesManager';
    const thisType = 'other';
    // must use this type in order to display useful info in Special:Version
    // Our class defines magic words: tell it to our helper class.
    public function __construct()
    {
    }
    public function hArticleEditUpdatesDeleteFromRecentchanges(&$article)
    {
        // don't delete entries from RecentChanges
        return false;
    }
}
<source lang=php>
require('extensions/DirectoryManager/DirectoryManager_stub.php');
</source>

== History ==
* Fix for empty $files list
* Fix for capital letter annoyance
* Added '#directory' magic word
* Added 'green' anchors for directories

== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[DirectoryManager::thisType][] = array('name' => DirectoryManager::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Provides a namespace 'Directory' for browsing the filesystem of a MediaWiki installation.", 'url' => 'http://mediawiki.org/wiki/Extension:DirectoryManager');
class DirectoryManager
{
    const thisType = 'other';
    const thisName = 'DirectoryManager';
    static $msg;
    static $dirBase;
    // Constants
    const filePatternTag = "/<filepattern(?:.*)\\>(.*)(?:\\<.?filepattern)>/siU";
    const dirPatternTag = "/<dirpattern(?:.*)\\>(.*)(?:\\<.?dirpattern)>/siU";
    const linePatternTag = "/<linepattern(?:.*)\\>(.*)(?:\\<.?linepattern)>/siU";
    // Template related
    var $filePattern;
    var $dirPattern;
    var $linePattern;
    // Variables
Пример #11
0
* [[Extension:StubManager|StubManager]]

== Installation ==
To install independantly from BizzWiki:
* Download & Install [[Extension:StubManager]] extension
* Dowload all this extension's files and place in the desired directory
* Apply the following changes to 'LocalSettings.php' after the statements of [[Extension:StubManager]]:
<source lang=php>
require('extensions/DocProc/DocProc_stub.php');
</source>

== History ==

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[DocProc::thisType][] = array('name' => DocProc::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Documents wikitext with 'markup/magic words' whilst still processing as per normal.", 'url' => 'http://mediawiki.org/wiki/Extension:DocProc');
class DocProc
{
    // constants.
    const thisName = 'DocProc';
    const thisType = 'other';
    static $allowedDocTags = array('code', 'pre');
    static $defaultDocTag = 'code';
    function __construct()
    {
    }
    public function tag_docproc(&$text, &$params, &$parser)
    {
        $tag = @$params['tag'];
        // make sure the user is asking for a valid HTML tag for the documentation part.
        $docTag = in_array($tag, self::$allowedDocTags) ? $tag : self::$defaultDocTag;
* Added support for hook based syntax highlighting
* Moved singleton invocation to end of file to accomodate some PHP versions
* Removed dependency on ExtensionClass
* Added stubbing capability through 'StubManager'
* Added namespace trigger
* Added additional checks to speed-up detection of NS_FILESYSTEM namespace
* Added the pattern '< !--@@ wikitext @@-- >' to hide wikitext when 'copy and paste' operation is used 
to save document in a non-BizzWiki wiki.
* Major simplification - requires less hooks

== Todo ==
* Handle multiple <!--@@ wikitext @@--> sections

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[FileSystemSyntaxColoring::thisType][] = array('name' => FileSystemSyntaxColoring::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Syntax highlights filesystem related pages', 'url' => 'http://mediawiki.org/wiki/Extension:FileSystemSyntaxColoring');
class FileSystemSyntaxColoring
{
    const thisName = 'FileSystem Syntax Coloring';
    const thisType = 'other';
    // must use this type in order to display useful info in Special:Version
    var $text;
    static $patterns = array('/\\<\\?php/siU' => '', '/\\/\\*\\<\\!\\-\\-\\<wikitext\\>\\-\\-\\>/siU' => '', '/\\/*\\<\\!\\-\\-\\<(.?)wikitext\\>\\-\\->/siU' => '', '/\\/\\/\\<(.?)source\\>/siU' => '<$1source>', '/\\<source(.*)\\>\\*\\//siU' => '<source $1>', '/\\<\\!\\-\\-\\@\\@/siU' => '', '/\\@\\@\\-\\-\\>/siU' => '');
    public function __construct()
    {
        $this->text = null;
    }
    public function hArticleAfterFetchContent(&$article, &$content)
    {
        // we are only interested in page views.
        global $action;
Пример #13
0
<?php

/**
 * @author Jean-Lou Dupont
 * @package InterWikiLinkManager
 */
//<source lang=php>*/
$wgExtensionCredits['other'][] = array('name' => 'InterWikiLinkManager', 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => 'Manages the InterWiki links table.', 'url' => 'http://mediawiki.org/wiki/Extension:InterWikiLinkManager');
StubManager::createStub('InterWikiLinkManager', dirname(__FILE__) . '/InterWikiLinkManager.body.php', null, array('ArticleSave', 'EditFormPreloadText'), false, null, array('iwl'), null, array(NS_MEDIAWIKI));
//</source>
Пример #14
0
To install independantly from BizzWiki:
* Download and install [[Extension:StubManager]]
* Dowload all this extension's files and place in the desired directory e.g. '/extensions/PageServer'
and place after the declaration of [[Extension:StubManager]]:
<source lang=php>
require('extensions/PageServer/PageServer_stub.php');
</source>

== History ==

== See Also ==
This extension is part of the [[Extension:BizzWiki|BizzWiki Platform]].

== Code ==
<!--</wikitext>--><source lang=php>*/
$wgExtensionCredits[PageServer::thisType][] = array('name' => PageServer::thisName, 'version' => StubManager::getRevisionId('$Id$'), 'author' => 'Jean-Lou Dupont', 'description' => "Provides functionality to load & parse wiki pages stored in the filesystem.", 'url' => 'http://mediawiki.org/wiki/Extension:PageServer');
class PageServer
{
    const thisType = 'other';
    const thisName = 'PageServer';
    static $instance = null;
    static $parser;
    public function __construct()
    {
        self::$instance = $this;
    }
    // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    // SERVICES to other extensions
    //
    /**
    		Called using PageServer::loadPage()