当前位置: 首页>>代码示例>>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;未经允许,请勿转载。