當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wfLoadExtension函數代碼示例

本文整理匯總了PHP中wfLoadExtension函數的典型用法代碼示例。如果您正苦於以下問題:PHP wfLoadExtension函數的具體用法?PHP wfLoadExtension怎麽用?PHP wfLoadExtension使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wfLoadExtension函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    wfLoadExtension('BoilerPlate');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['BoilerPlate'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['BoilerPlateAlias'] = __DIR__ . '/BoilerPlate.i18n.alias.php';
    wfWarn('Deprecated PHP entry point used for BoilerPlate extension. Please use wfLoadExtension ' . 'instead, see https://www.mediawiki.org/wiki/Extension_registration for more details.');
    return true;
} else {
    die('This version of the BoilerPlate extension requires MediaWiki 1.25+');
}
開發者ID:coderwassananmol,項目名稱:mediawiki-extensions-BoilerPlate,代碼行數:12,代碼來源:BoilerPlate.php

示例2: wfLoadExtension

wfLoadExtension('Renameuser');
wfLoadExtension('SpamBlacklist');
wfLoadExtension('SyntaxHighlight_GeSHi');
wfLoadExtension('TitleBlacklist');
wfLoadExtension('WikiEditor');
require_once "{$IP}/extensions/CreatePage/CreatePage.php";
//added by Eli Sep 8
require_once "{$IP}/extensions/Lockdown/Lockdown.php";
//added by Eli Sep 8
require_once "{$IP}/extensions/TalkRight/TalkRight.php";
//ver 1.5.1 -> This makes EoE_Member write to Talk/Discussion pages but readonly to regular pages
require_once "{$IP}/extensions/ConfirmAccount/ConfirmAccount.php";
//added by Eli Sep 9
require_once "{$IP}/extensions/EmailUsers/EmailUsers.php";
//added by Eli Oct 20
wfLoadExtension('EmbedVideo');
require_once "{$IP}/extensions/UserFunctions/UserFunctions.php";
//added 8-Jun-2016
# End of automatically generated settings.
# Add more configuration options below.
//================================================= UserFunctions: https://www.mediawiki.org/wiki/Extension:UserFunctions
$wgUFEnablePersonalDataFunctions = true;
$wgUFAllowedNamespaces = array(NS_MAIN => true, NS_USER => true);
// $wgUFEnableSpecialContexts = false;
//=================================================
$wgFileExtensions = array_merge($wgFileExtensions, explode(" ", "pdf xls xlsx txt doc png ppt ods jp2 webp PDF XLS XLSX TXT DOC PNG PPT ODS JP2 WEBP svg png jpg jpeg gif bmp SVG PNG JPG JPEG GIF BMP"));
//e.g. array('txt', 'pdf', 'doc') by Eli
$wgFileExtensions = array_unique($wgFileExtensions);
// print_r($wgFileExtensions);exit;
//================================================= EoL: Literature Editor
if ($conf['use_smtp']) {
開發者ID:eliagbayani,項目名稱:LiteratureEditor,代碼行數:31,代碼來源:LocalSettings.php

示例3: wfLoadExtension

    require_once "{$IP}/extensions/TitleKey/TitleKey.php";
}
if ($wmgUseVariables) {
    require_once "{$IP}/extensions/Variables/Variables.php";
}
if ($wmgUseVisualEditor) {
    require_once "{$IP}/extensions/VisualEditor/VisualEditor.php";
    $wgVisualEditorParsoidURL = 'http://parsoid1.miraheze.org:8142';
    $wgVisualEditorParsoidPrefix = "{$wgDBname}";
    if (isset($wgConf->settings['wmgPrivateWiki'][$wgDBname])) {
        $wgVisualEditorParsoidForwardCookies = true;
    }
    $wgDefaultUserOptions['visualeditor-enable'] = 1;
    // Load TemplateData
    wfLoadExtension('TemplateData');
}
if ($wmgUseWikiEditor) {
    wfLoadExtension('WikiEditor');
    wfLoadExtension('CodeEditor');
    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgCodeEditorEnableCore = true;
}
if ($wmgUseYouTube) {
    require_once "{$IP}/extensions/YouTube/YouTube.php";
}
// Permission variables
if ($wmgDisableAnonEditing) {
    $wgGroupPermissions['*']['edit'] = false;
    $wgGroupPermissions['*']['createpage'] = false;
}
開發者ID:OwenBaines,項目名稱:mw-config,代碼行數:31,代碼來源:LocalExtensions.php

示例4: wfLoadExtension

# Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by-sa/3.0/";
$wgRightsText = "Creative Commons Attribution-ShareAlike";
$wgRightsIcon = "{$wgResourceBasePath}/resources/assets/licenses/cc-by-sa.png";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['edit'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = 'Vector';
require_once "{$IP}/skins/Vector/Vector.php";
# End of automatically generated settings.
# Add more configuration options below.
wfLoadExtension('Cite');
wfLoadExtension('CiteThisPage');
wfLoadExtension('Gadgets');
wfLoadExtension('ImageMap');
wfLoadExtension('InputBox');
wfLoadExtension('Interwiki');
wfLoadExtension('LocalisationUpdate');
wfLoadExtension('Nuke');
wfLoadExtension('ParserFunctions');
wfLoadExtension('PdfHandler');
wfLoadExtension('Poem');
wfLoadExtension('Renameuser');
wfLoadExtension('SpamBlacklist');
wfLoadExtension('SyntaxHighlight_GeSHi');
require_once "{$IP}/extensions/SpamBlacklist/SpamBlacklist.php";
require_once "{$IP}/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";
require_once "{$IP}/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";
開發者ID:brandonphuong,項目名稱:mediawiki,代碼行數:31,代碼來源:LocalSettings.php

示例5: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    wfLoadExtension('ConfirmEdit/MathCaptcha');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['MathCaptcha'] = __DIR__ . '/i18n';
    /* wfWarn(
    		'Deprecated PHP entry point used for MathCaptcha extension. Please use wfLoadExtension instead, ' .
    		'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return;
} else {
    die('This version of the MathCaptcha extension requires MediaWiki 1.25+');
}
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:14,代碼來源:MathCaptcha.php

示例6: string

# Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "d9cb5c448d36e6f8c99885e9c8c1115c79bb47aec4cba9aef5f15665428acd59";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "8b797c7e2f09b585";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = "";
# Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/3.0/";
$wgRightsText = "Creative Commons Attribution-ShareAlike";
$wgRightsIcon = "{$wgResourceBasePath}/resources/assets/licenses/cc-by-sa.png";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin('CologneBlue');
wfLoadSkin('Modern');
wfLoadSkin('MonoBook');
wfLoadSkin('Vector');
# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:
wfLoadExtension('SpamBlacklist');
# End of automatically generated settings.
# Add more configuration options below.
開發者ID:sf49ers,項目名稱:gaswiki,代碼行數:31,代碼來源:LocalSettings.php

示例7: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    wfLoadExtension('Gadgets');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['Gadgets'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['GadgetsAlias'] = __DIR__ . '/Gadgets.alias.php';
    /* wfWarn(
    		'Deprecated PHP entry point used for Gadgets extension. Please use wfLoadExtension instead, ' .
    		'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return true;
} else {
    die('This version of the Gadgets extension requires MediaWiki 1.25+');
}
開發者ID:eliagbayani,項目名稱:LiteratureEditor,代碼行數:15,代碼來源:Gadgets.php

示例8: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    if (file_exists(__DIR__ . '/vendor/autoload.php')) {
        require_once __DIR__ . '/vendor/autoload.php';
    }
    wfLoadExtension('WikibaseImport');
} else {
    die('WikibaseImport requires MediaWiki 1.25+');
}
開發者ID:addshore,項目名稱:WikibaseImport,代碼行數:10,代碼來源:WikibaseImport.php

示例9: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    wfLoadExtension('Gather');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['Gather'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['GatherAlias'] = __DIR__ . '/Gather.alias.php';
    /* wfWarn(
    		'Deprecated PHP entry point used for Gather extension. Please use wfLoadExtension instead, ' .
    		'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return;
} else {
    die('This version of the Gather extension requires MediaWiki 1.25+');
}
開發者ID:joakin,項目名稱:mediawiki-extensions-Gather,代碼行數:15,代碼來源:Gather.php

示例10: wfLoadExtension

<?php

if (function_exists('wfLoadExtension')) {
    wfLoadExtension('MobileFrontend');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['MobileFrontend'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['MobileFrontendAlias'] = __DIR__ . '/MobileFrontend.alias.php';
    /* wfWarn(
    		'Deprecated PHP entry point used for MobileFrontend extension. ' .
    		'Please use wfLoadExtension instead, ' .
    		'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return true;
} else {
    die('This version of the MobileFrontend extension requires MediaWiki 1.25+');
}
開發者ID:felixonmars,項目名稱:mediawiki-extensions-MobileFrontend,代碼行數:16,代碼來源:MobileFrontend.php

示例11: wfLoadExtension

<?php

if (version_compare($GLOBALS['wgVersion'], '1.27c', '>')) {
    if (function_exists('wfLoadExtension')) {
        wfLoadExtension('OpenLayers');
        // Keep i18n globals so mergeMessageFileList.php doesn't break
        $GLOBALS['wgMessagesDirs']['OpenLayers'] = __DIR__ . '/i18n';
        /* wfWarn(
        			'Deprecated PHP entry point used for OpenLayers extension. ' .
        			'Please use wfLoadExtension instead, ' .
        			'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
        		); */
        return;
    }
}
$GLOBALS['wgExtensionCredits']['other'][] = ['path' => __FILE__, 'name' => 'OpenLayers', 'version' => '1.0.0', 'author' => ['Yaron Koren', 'Paladox', '...'], 'url' => 'https://www.mediawiki.org/wiki/Extension:OpenLayers', 'descriptionmsg' => 'openlayers-desc', 'license-name' => 'GPL-2.0+'];
// Register client-side modules.
$openlayersResourceTemplate = ['localBasePath' => __DIR__, 'remoteExtPath' => 'OpenLayers'];
$GLOBALS['wgResourceModules'] += ['ext.openlayers.main' => $openlayersResourceTemplate + ['scripts' => ['libs/OpenLayers/OpenLayers.js']]];
開發者ID:wikimedia,項目名稱:mediawiki-extensions-OpenLayers,代碼行數:19,代碼來源:OpenLayers.php

示例12: wfLoadExtension

 *
 * Copyright (c) 2015 Owen Kellie-Smith
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
if (function_exists('wfLoadExtension')) {
    wfLoadExtension('Reservation');
    $wgMessagesDirs['Reservation'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['ReservationAlias'] = __DIR__ . '/Reservation.i18n.alias.php';
    wfWarn('Deprecated PHP entry point used for Reservation extension. Please use wfLoadExtension ' . 'instead, see https://www.mediawiki.org/wiki/Extension_registration for more details.');
    return true;
} else {
    die('This version of the Reservation extension requires MediaWiki 1.25+');
}
/* Based on BoilerPlate extension */
開發者ID:owen-kellie-smith,項目名稱:reservation,代碼行數:31,代碼來源:Reservation.php

示例13: wfLoadSkin

## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin('CologneBlue');
wfLoadSkin('Modern');
wfLoadSkin('MonoBook');
wfLoadSkin('Vector');
# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:
wfLoadExtension('Cite');
wfLoadExtension('CiteThisPage');
require_once "{$IP}/extensions/ConfirmEdit/ConfirmEdit.php";
wfLoadExtension('Gadgets');
wfLoadExtension('ImageMap');
wfLoadExtension('InputBox');
wfLoadExtension('Interwiki');
wfLoadExtension('LocalisationUpdate');
wfLoadExtension('Nuke');
wfLoadExtension('ParserFunctions');
wfLoadExtension('PdfHandler');
wfLoadExtension('Poem');
wfLoadExtension('Renameuser');
wfLoadExtension('SpamBlacklist');
wfLoadExtension('SyntaxHighlight_GeSHi');
wfLoadExtension('TitleBlacklist');
wfLoadExtension('WikiEditor');
# End of automatically generated settings.
# Add more configuration options below.
$wgShowExceptionDetails = true;
開發者ID:psiopic2,項目名稱:psiopic-never,代碼行數:31,代碼來源:LocalSettings.php

示例14: wfLoadExtension

<?php

/**
 * VisualEditor extension
 *
 * This PHP entry point is deprecated. Please use wfLoadExtension() and the extension.json file
 * instead. See https://www.mediawiki.org/wiki/Manual:Extension_registration for more details.
 *
 * @file
 * @ingroup Extensions
 * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
 * @license The MIT License (MIT); see LICENSE.txt
 */
if (function_exists('wfLoadExtension')) {
    wfLoadExtension('VisualEditor');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['VisualEditor'] = array(__DIR__ . '/lib/ve/i18n', __DIR__ . '/modules/ve-mw/i18n', __DIR__ . '/modules/ve-wmf/i18n');
    /* wfWarn(
    	'Deprecated PHP entry point used for VisualEditor extension. Please use wfLoadExtension '.
    	'instead, see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return true;
}
die('This version of the VisualEditor extension requires MediaWiki 1.25+.');
開發者ID:sammykumar,項目名稱:TheVRForums,代碼行數:24,代碼來源:VisualEditor.php

示例15: wfLoadExtension

<?php

/**
 * Initialization file for the External Data extension
 *
 * @file
 * @ingroup ExternalData
 * @author Yaron Koren
 */
// Disabled for now until global variable naming issue is resolved.
if (false) {
    // function_exists( 'wfLoadExtension' ) ) {
    wfLoadExtension('ExternalData');
    // Keep i18n globals so mergeMessageFileList.php doesn't break
    $wgMessagesDirs['ExternalData'] = __DIR__ . '/i18n';
    $wgExtensionMessagesFiles['ExternalDataMagic'] = __DIR__ . '/ExternalData.i18n.magic.php';
    /* wfWarn(
    	'Deprecated PHP entry point used for External Data extension. Please use wfLoadExtension instead, ' .
    	'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
    	); */
    return;
}
if (!defined('MEDIAWIKI')) {
    die;
}
$wgExtensionCredits['parserhook'][] = array('path' => __FILE__, 'name' => 'External Data', 'version' => '1.8.2', 'author' => array('Yaron Koren', '...'), 'url' => 'https://www.mediawiki.org/wiki/Extension:External_Data', 'descriptionmsg' => 'externaldata-desc');
$wgHooks['ParserFirstCallInit'][] = 'ExternalDataHooks::registerParser';
$wgMessagesDirs['ExternalData'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['ExternalData'] = dirname(__FILE__) . '/ExternalData.i18n.php';
$wgExtensionMessagesFiles['ExternalDataMagic'] = dirname(__FILE__) . '/ExternalData.i18n.magic.php';
// Register all special pages and other classes
開發者ID:wjamn,項目名稱:mediawiki-extensions-ExternalData,代碼行數:31,代碼來源:ExternalData.php


注:本文中的wfLoadExtension函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。