本文整理汇总了PHP中extAddSpecialPage函数的典型用法代码示例。如果您正苦于以下问题:PHP extAddSpecialPage函数的具体用法?PHP extAddSpecialPage怎么用?PHP extAddSpecialPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了extAddSpecialPage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exit
<?php
/**
* @package MediaWiki
* @subpackage SpecialPage
* @author Piotr Molski <moli@wikia-inc.com> for Wikia.com
* @copyright (C) 2008, Wikia Inc.
* @licence GNU General Public Licence 2.0 or later
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named TagsReport.\n";
exit(1);
}
$wgExtensionCredits['specialpage'][] = array("name" => "Tags report", "description" => "List of articles which use special tags in text (like 'dpl', 'youtube')", "author" => "Piotr Molski");
$wgExtensionMessagesFiles["TagsReport"] = dirname(__FILE__) . '/SpecialTagsReport.i18n.php';
$wgExtensionMessagesFiles['TagsReportAliases'] = __DIR__ . '/SpecialTagsReport.aliases.php';
$wgAvailableRights[] = 'tagsreport';
$wgGroupPermissions['*']['tagsreport'] = true;
extAddSpecialPage(dirname(__FILE__) . '/SpecialTagsReport_body.php', 'TagsReport', 'TagsReportPage');
$wgSpecialPageGroups['TagsReport'] = 'maintenance';
示例2: exit
<?php
/**
* @package MediaWiki
* @subpackage SpecialPage
* @author Piotr Molski <moli@wikia-inc.com> for Wikia.com
* @copyright (C) 2008, Wikia Inc.
* @licence GNU General Public Licence 2.0 or later
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named MultiWikiDelete.\n";
exit(1);
}
require_once dirname(__FILE__) . '/MultiTasksCore.php';
$wgExtensionCredits['specialpage'][] = array("name" => "Multi Wiki Delete", "descriptionmsg" => "multidelete-desc", "author" => "Bartek Łapiński, Piotr Molski", 'url' => 'https://github.com/Wikia/app/tree/dev/extensions/wikia/MultiTasks');
$wgExtensionMessagesFiles["Multidelete"] = dirname(__FILE__) . '/MultiTasks.i18n.php';
$wgExtensionMessagesFiles['MultideleteAliases'] = __DIR__ . '/MultiTasks.aliases.php';
$wgAvailableRights[] = 'multidelete';
$wgGroupPermissions['staff']['multidelete'] = true;
$wgGroupPermissions['helper']['multidelete'] = true;
$wgGroupPermissions['vstf']['multidelete'] = true;
extAddSpecialPage(dirname(__FILE__) . '/SpecialMultiDelete_body.php', 'Multidelete', 'Multidelete');
require_once $IP . "/extensions/wikia/TaskManager/BatchTask.php";
$wgSpecialPageGroups['Multidelete'] = 'pagetools';
示例3: define
define("VAR_GROUPS", "{{{GROUPS}}}");
require_once "PageProtection.i18n.php";
$wgExtensionFunctions[] = "wfPageProtection";
/* register parser hook */
$wgExtensionCredits['parserhook'][] = array('name' => 'PPP', 'author' => 'Fabian Schmitt, Paweł Wilk', 'version' => '2.3b', 'url' => 'http://www.mediawiki.org/wiki/Extension:PPP');
/* register special page hook */
$wgExtensionCredits['specialpage'][] = array('name' => 'PPP', 'author' => 'Paweł Wilk, Fabian Schmitt', 'version' => '2.3b', 'url' => 'http://www.mediawiki.org/wiki/Extension:PPP');
/* Default groups that can read anything */
$wgPppDefaultGroups = array("sysop");
/**
* Extension-function. Registers special page for displaying ciphersuite
*/
if (!function_exists('extAddSpecialPage')) {
require dirname(__FILE__) . '/../ExtensionFunctions.php';
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialCipherSuite.php', 'PageProtectionCipherSuite', 'SpecialPageProtectionCipherSuite');
/**
* Extension-function. Registers parser, hook, messages.
*/
function wfPageProtection()
{
global $wgParser;
global $wgMessageCache, $wgPageProtectionMessages;
foreach ($wgPageProtectionMessages as $key => $value) {
$wgMessageCache->addMessages($wgPageProtectionMessages[$key], $key);
}
$wgParser->setHook(PROTECT_TAG, "protectPage");
global $wgHooks;
$wgHooks['AlternateEdit'][] = 'protectedEdit';
$wgHooks['ArticleSave'][] = 'protectSave';
}
示例4: exit
* @author Piotr Molski <moli@wikia.com>
* @copyright Copyright © 2008, Piotr Molski
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
/**
* implements Special:MostPopularCategories
* @addtogroup SpecialPage
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named MostPopularCategories.\n";
exit(1);
}
$wgExtensionCredits['specialpage'][] = array("name" => "MostPopularCategories", "descriptionmsg" => "mostpopularcategories-desc", "author" => "Moli <moli at wikia.com>", 'url' => 'https://github.com/Wikia/app/tree/dev/extensions/wikia/MostPopularCategories');
$wgHooks['wgQueryPages'][] = 'wfSetupMostPopularCategories';
$wgExtensionFunctions[] = 'wfSetupMostPopularCategories';
#--- messages file
$wgExtensionMessagesFiles["Mostpopularcategories"] = dirname(__FILE__) . '/SpecialMostPopularCategories.i18n.php';
// aliases
$wgExtensionMessagesFiles['MostpopularcategoriesAliases'] = __DIR__ . '/SpecialMostPopularCategories.aliases.php';
if (!function_exists('extAddSpecialPage')) {
require_once "{$IP}/extensions/ExtensionFunctions.php";
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialMostPopularCategories_body.php', 'Mostpopularcategories', 'MostpopularcategoriesSpecialPage');
$wgSpecialPageGroups['Mostpopularcategories'] = 'highuse';
// macbre: fix fatal when accessing this special page via API
$wgAutoloadClasses['MostpopularcategoriesPage'] = dirname(__FILE__) . '/SpecialMostPopularCategories_body.php';
function wfSetupMostPopularCategories(&$queryPages = array())
{
$queryPages[] = array('MostpopularcategoriesPage', 'Mostpopularcategories');
return true;
}
示例5: exit
<?php
/**
* @addtogroup SpecialPage
*
* @author Piotr Molski <moli@wikia.com>
* @copyright Copyright © 2008, Piotr Molski
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
/**
* implements Special:MultiWikiFinder
* @addtogroup SpecialPage
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named Multi-Title Finder.\n";
exit(1);
}
$wgExtensionCredits['specialpage'][] = array("name" => "Multi-Title Finder", "descriptionmsg" => "multiwikifinder-desc", "author" => "Moli <moli at wikia.com>", "url" => "https://github.com/Wikia/app/tree/dev/extensions/wikia/MultiTasks");
#--- messages file
$wgExtensionMessagesFiles["Multiwikifinder"] = dirname(__FILE__) . '/MultiTasks.i18n.php';
$wgExtensionMessagesFiles['MultiwikifinderAliases'] = __DIR__ . '/MultiTasks.aliases.php';
$wgAvailableRights[] = 'multiwikifinder';
$wgGroupPermissions['staff']['multiwikifinder'] = true;
$wgGroupPermissions['helper']['multiwikifinder'] = true;
$wgGroupPermissions['vstf']['multiwikifinder'] = true;
if (!function_exists('extAddSpecialPage')) {
require_once "{$IP}/extensions/ExtensionFunctions.php";
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialMultiWikiFinder_body.php', 'Multiwikifinder', 'MultiwikifinderSpecialPage');
$wgSpecialPageGroups['Multiwikifinder'] = 'pagetools';
示例6: page
$wgNamespaceAliases["Video_talk"] = 7;
break;
case "no":
case "nn":
//$wgExtraNamespaces[6] = "Video";
//$wgExtraNamespaces[7] = "Videodiskusjon";
$wgNamespaceAliases["Video"] = 6;
$wgNamespaceAliases["Video_talk"] = 7;
break;
}
#--- register special page (MW 1.1x way)
if (!function_exists('extAddSpecialPage')) {
require "{$IP}/extensions/ExtensionFunctions.php";
}
$wgExtensionMessagesFiles['WikiaVideoAdd'] = dirname(__FILE__) . '/WikiaVideoAdd.i18n.php';
extAddSpecialPage(dirname(__FILE__) . '/WikiaVideoAdd_body.php', 'WikiaVideoAdd', 'WikiaVideoAddForm');
$wgExtensionMessagesFiles['VideoEmbedTool'] = $dir . '/VideoEmbedTool.i18n.php';
$wgHooks['EditPage::showEditForm:initial2'][] = 'VETSetup';
/**
* @param $article
* @param $user
* @param $text
* @param $summary
* @return bool
*/
function VETArticleSave($article, $user, &$text, $summary)
{
if (NS_VIDEO == $article->mTitle->getNamespace()) {
$text = $article->dataline . $text;
}
return true;
示例7: define
define("WIKISTATS_MIN_STATS_MONTH", '01');
define("WIKISTATS_RANGE_STATS_MIN", 'A');
define("WIKISTATS_RANGE_STATS_MAX", 'K');
define("WIKISTATS_STATS_EMPTY_LINE_TAG", "_empty_%s");
define("WIKISTATS_DEFAULT_WIKIA_XLS_FILENAME", "wikia_xls_%d");
define("WIKISTATS_MAX_CHART_HEIGHT", '180');
define("WIKISTATS_CHART_BAR_WIDTH", '14');
define("WIKISTATS_CHART_BAR_WIDTH_UNIT", 'px');
define("WIKISTATS_CENTRAL_ID", 'wikicities');
define("WIKISTATS_ABSENT_TIME", 60 * 60 * 24 * 30);
define("WIKISTATS_ANON_ARRAY_LGTH", 30);
$wgExtensionCredits['specialpage'][] = array('name' => 'WikiStats', 'url' => 'http://help.wikia.com/wiki/Help:WikiaStats', "description" => "Gathers a wide array of statistics for this wiki and adds an GUI to browse them. Inspired by and partially based on the original [http://meta.wikimedia.org/wiki/Wikistats WikiStats] written by Erik Zachte", "author" => "Piotr Molski (moli) <moli@wikia-inc.com>");
$wgStatsExcludedNonSpecialGroup = array();
$wgStatsSpecialGroupUser = false;
#--- messages file
$wgExtensionMessagesFiles["WikiStats"] = dirname(__FILE__) . '/SpecialWikiStats.i18n.php';
// aliases
$wgExtensionMessagesFiles['WikiStatsAliases'] = __DIR__ . '/SpecialWikiStats.aliases.php';
#--- helper file
require_once dirname(__FILE__) . '/SpecialWikiStats_helper.php';
#--- ajax's method file
require_once dirname(__FILE__) . '/SpecialWikiStats_ajax.php';
#--- xls method file
require_once dirname(__FILE__) . '/SpecialWikiStats_xls.php';
#--- register special page (MW 1.10 way)
if (!function_exists('extAddSpecialPage')) {
require "{$IP}/extensions/ExtensionFunctions.php";
}
$wgStatsIgnoreWikis = array(5, 11, 6745);
extAddSpecialPage(dirname(__FILE__) . '/SpecialWikiStats_body.php', 'WikiStats', 'WikiStatsPage');
示例8: extAddBatchTask
extAddBatchTask(dirname(__FILE__) . "/Tasks/MultiRestoreTask.php", "multirestore", "MultiRestoreTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/ImageGrabberTask.php", "imagegrabber", "ImageGrabberTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/ImageImporterTask.php", "imageimporter", "ImageImporterTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageGrabberTask.php", "pagegrabber", "PageGrabberTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageGrabberDumpTask.php", "pagegrabberdump", "PageGrabberDumpTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/PageImporterTask.php", "pageimporter", "PageImporterTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/SWMSendToGroupTask.php", "SWMSendToGroup", "SWMSendToGroupTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/LocalMaintenanceTask.php", "local-maintenance", "LocalMaintenanceTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/RebuildLocalisationCacheTask.php", "rebuild_localisation_cache", "RebuildLocalisationCacheTask");
extAddBatchTask(dirname(__FILE__) . "/Tasks/UpdateSpecialPagesTask.php", "update_special_pages", "UpdateSpecialPagesTask");
extAddBatchTask(dirname(__FILE__) . "/../AchievementsII/EnableAchievementsTask.php", "enableachievements", "EnableAchievementsTask");
/**
* permissions
*/
$wgAvailableRights[] = 'taskmanager';
$wgGroupPermissions['vstf']['taskmanager'] = true;
$wgGroupPermissions['helper']['taskmanager'] = true;
$wgGroupPermissions['staff']['taskmanager'] = true;
$wgAvailableRights[] = 'taskmanager-action';
$wgGroupPermissions['util']['taskmanager'] = true;
$wgGroupPermissions['util']['taskmanager-action'] = true;
/**
* message file
*/
$wgExtensionMessagesFiles[$sSpecialPage] = dirname(__FILE__) . "/Special{$sSpecialPage}.i18n.php";
/**
* aliases file
*/
$wgExtensionMessagesFiles[$sSpecialPage . 'Aliases'] = __DIR__ . "/Special{$sSpecialPage}.aliases.php";
extAddSpecialPage(dirname(__FILE__) . "/Special{$sSpecialPage}_body.php", $sSpecialPage, "{$sSpecialPage}Page");
$wgSpecialPageGroups[$sSpecialPage] = 'wikia';
示例9: array
* @link http://meta.wikimedia.org/wiki/Cite/SpecialCite.php Documentation
*
* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
* @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
$wgExtensionFunctions[] = 'wfSpecialCite';
$wgExtensionCredits['specialpage'][] = array('name' => 'Cite', 'author' => 'Ævar Arnfjörð Bjarmason', 'description' => 'adds a [[Special:Cite|citation]] special page & toolbox link', 'url' => 'http://www.mediawiki.org/wiki/Extension:Cite/Special:Cite.php');
# Internationalisation file
require_once dirname(__FILE__) . '/SpecialCite.i18n.php';
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialCiteNav';
$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfSpecialCiteToolbox';
if (!function_exists('extAddSpecialPage')) {
require dirname(__FILE__) . '/../ExtensionFunctions.php';
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialCite_body.php', 'Cite', 'SpecialCite');
function wfSpecialCite()
{
# Add messages
global $wgMessageCache, $wgSpecialCiteMessages;
foreach ($wgSpecialCiteMessages as $key => $value) {
$wgMessageCache->addMessages($wgSpecialCiteMessages[$key], $key);
}
}
function wfSpecialCiteNav(&$skintemplate, &$nav_urls, &$oldid, &$revid)
{
if ($skintemplate->mTitle->isContentPage() && $revid !== 0) {
$nav_urls['cite'] = array('text' => wfMsg('cite_article_link'), 'href' => $skintemplate->makeSpecialUrl('Cite', "page=" . wfUrlencode("{$skintemplate->thispage}") . "&id={$revid}"));
}
return true;
}
示例10: exit
<?php
/**#@+
* A special page with the interface for blocking, viewing and unblocking
user names and IP addresses
*
* @package MediaWiki
* @subpackage SpecialPage
*
* @author Bartek Łapiński, Piotr Molski moli at wikia.com
* @copyright Copyright © 2007, Wikia Inc.
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named CreateWiki.\n";
exit(1);
}
$wgExtensionCredits['specialpage'][] = array('name' => 'Regular Expression Name Block', 'author' => 'Bartek Lapinski, Tomasz Klim, Piotr Molski', 'description' => 'alternate user block (by given name, using regular expressions)');
#--- messages file
$wgExtensionMessagesFiles["RegexBlock"] = dirname(__FILE__) . '/RegexBlock.i18n.php';
$wgAvailableRights[] = 'regexblock';
$wgGroupPermissions['staff']['regexblock'] = true;
#--- helper file
require_once dirname(__FILE__) . '/SpecialRegexBlock_helper.php';
#--- register special page (MW 1.1x way)
if (!function_exists('extAddSpecialPage')) {
require "{$IP}/extensions/ExtensionFunctions.php";
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialRegexBlock_body.php', 'RegexBlock', 'RegexBlockForm');
$wgSpecialPageGroups['RegexBlock'] = 'users';
示例11: dirname
$wgAutoloadClasses['MV_ParserCache'] = dirname(__FILE__) . '/MV_ParserCache.php';
$wgAutoloadClasses['MV_Sitting'] = dirname(__FILE__) .'/MV_Sitting.php';
$wgAutoloadClasses['MV_EditSittingPage'] = dirname(__FILE__) .'/MV_EditSittingPage.php';
$wgAutoloadClasses['MV_Editors'] = dirname(__FILE__) .'/MV_Editors.php';
$wgAutoloadClasses['MV_AjaxResponse'] = dirname(__FILE__) .'/MV_AjaxResponse.php';
$wgAutoloadClasses['MV_Reporters'] = dirname(__FILE__) .'/MV_Reporters.php';
$wgAutoloadClasses['MV_Readers'] = dirname(__FILE__) .'/MV_Readers.php';
$wgAutoloadClasses['MV_ManageStaff'] = dirname(__FILE__) .'/MV_ManageStaff.php';
$wgAutoloadClasses['MV_Status'] = dirname(__FILE__) .'/MV_Status.php';
$wgAutoloadClasses['MV_Staff'] = dirname(__FILE__) .'/MV_Staff.php';
$wgAutoloadClasses['MV_Takes'] = dirname(__FILE__) .'/MV_Takes.php';
$markerList = array();
//override special search page: (requires ExtensionFunctions.php)
extAddSpecialPage( dirname(__FILE__) . '/specials/MV_SpecialMediaSearch.php', 'Search', 'MV_SpecialSearch' );
function enableMetavid() {
global $wgExtensionFunctions, $smwgNamespacesWithSemanticLinks;
$wgExtensionFunctions[] = 'mvSetupExtension';
//add in metavid namespace to semanticLinks array:
$smwgNamespacesWithSemanticLinks[MV_NS_STREAM] = true;
$smwgNamespacesWithSemanticLinks[MV_NS_STREAM_TALK] = false;
$smwgNamespacesWithSemanticLinks[MV_NS_SEQUENCE] = true;
$smwgNamespacesWithSemanticLinks[MV_NS_SEQUENCE_TALK] = false;
$smwgNamespacesWithSemanticLinks[MV_NS_MVD] = true;
$smwgNamespacesWithSemanticLinks[MV_NS_MVD_TALK] = false;
$smwgNamespacesWithSemanticLinks[MV_NS_SITTING] = true;
$smwgNamespacesWithSemanticLinks[MV_NS_SITTING_TALK] = false;
return true;
}
示例12: extAddBatchTask
*/
require_once $dir . "/BatchTask.php";
extAddBatchTask($dir . "/Tasks/PageImporterTask.php", "pageimporter", "PageImporterTask");
extAddBatchTask($dir . "/Tasks/SWMSendToGroupTask.php", "SWMSendToGroup", "SWMSendToGroupTask");
extAddBatchTask($dir . "/Tasks/LocalMaintenanceTask.php", "local-maintenance", "LocalMaintenanceTask");
extAddBatchTask($dir . "/Tasks/UpdateSpecialPagesTask.php", "update_special_pages", "UpdateSpecialPagesTask");
/**
* permissions
*/
$wgAvailableRights[] = 'taskmanager';
$wgGroupPermissions['vstf']['taskmanager'] = true;
$wgGroupPermissions['helper']['taskmanager'] = true;
$wgGroupPermissions['staff']['taskmanager'] = true;
$wgAvailableRights[] = 'taskmanager-action';
$wgGroupPermissions['util']['taskmanager'] = true;
$wgGroupPermissions['util']['taskmanager-action'] = true;
/**
* message file
*/
$wgExtensionMessagesFiles[$sSpecialPage] = $dir . "/Special{$sSpecialPage}.i18n.php";
/**
* aliases file
*/
$wgExtensionMessagesFiles[$sSpecialPage . 'Aliases'] = $dir . "/Special{$sSpecialPage}.aliases.php";
extAddSpecialPage($dir . "/Special{$sSpecialPage}_body.php", $sSpecialPage, "{$sSpecialPage}Page");
$wgSpecialPageGroups[$sSpecialPage] = 'wikia';
/**
* hooks
*/
$wgAutoloadClasses['TaskManagerHooks'] = $dir . '/hooks/TaskManagerHooks.class.php';
$wgHooks['APIQuerySiteInfoStatistics'][] = 'TaskManagerHooks::onAPIQuerySiteInfoStatistics';
示例13: exit
<?php
/**
* @package MediaWiki
* @subpackage SpecialPage
* @author Bartek Lapinski <bartek@wikia.com>, Piotr Molski <moli@wikia.com> for Wikia.com
* @copyright (C) 2008, Wikia Inc.
* @licence GNU General Public Licence 2.0 or later
*/
if (!defined('MEDIAWIKI')) {
echo "This is MediaWiki extension named LookupContribs.\n";
exit(1);
}
$wgExtensionCredits['specialpage'][] = array("name" => "LookupContribs", "descriptionmsg" => "lookupcontribs-desc", "author" => array("Bartek Lapinski", "Piotr Molski"), "url" => "https://github.com/Wikia/app/tree/dev/extensions/wikia/LookupContribs");
define("LC_TEST", 0);
define("LC_LIMIT", 25);
$wgExtensionMessagesFiles["SpecialLookupContribs"] = dirname(__FILE__) . '/SpecialLookupContribs.i18n.php';
require_once dirname(__FILE__) . '/SpecialLookupContribs_helper.php';
require_once dirname(__FILE__) . '/SpecialLookupContribs_hooks.php';
require_once dirname(__FILE__) . '/SpecialLookupContribs_ajax.php';
global $wgAjaxExportList;
$wgAjaxExportList[] = "LookupContribsAjax::axData";
$wgAvailableRights[] = 'lookupcontribs';
$wgGroupPermissions['staff']['lookupcontribs'] = true;
extAddSpecialPage(dirname(__FILE__) . '/SpecialLookupContribs_body.php', 'LookupContribs', 'LookupContribsPage');
$wgSpecialPageGroups['LookupContribs'] = 'users';
示例14: die
$wgLuceneDisableSuggestions = true;
$wgLuceneDisableTitleMatches = false;
/** Number of seconds to cache query results */
$wgLuceneCacheExpiry = 60 * 15;
# Not a valid entry point, skip unless MEDIAWIKI is defined
if (!defined('MEDIAWIKI')) {
die("This file is part of MediaWiki, it is not a valid entry point\n");
}
$wgExtensionCredits['specialpage'][] = array('name' => 'LuceneSearch', 'version' => '2.0', 'author' => array('Brion Vibber', 'Robert Stojnić'), 'url' => 'http://www.mediawiki.org/wiki/Extension:LuceneSearch', 'description' => 'Interface for the Apache Lucene search engine', 'descriptionmsg' => 'lucene-desc');
/** Lucene-search (mwsearch) version. from 2.0 we support search prefixes */
$wgLuceneSearchVersion = 1.0;
/** Show additional "exact case" search button,
index needs to be built with exact case option */
$wgLuceneSearchExactCase = false;
# Internationalisation file
require_once 'LuceneSearch.i18n.php';
if (class_exists('Revision')) {
$wgLSuseold = false;
} else {
$wgLSuseold = true;
}
define('LS_PER_PAGE', 10);
if (!function_exists('extAddSpecialPage')) {
require dirname(__FILE__) . '/../ExtensionFunctions.php';
}
extAddSpecialPage(dirname(__FILE__) . '/LuceneSearch_body.php', 'Search', 'LuceneSearch');
$wgExtensionMessagesFiles['LuceneSearch'] = dirname(__FILE__) . '/LuceneSearch.i18n.php';
$wgAutoloadClasses['LuceneResult'] = dirname(__FILE__) . '/LuceneSearch_body.php';
$wgAutoloadClasses['ApiQueryLuceneSearch'] = dirname(__FILE__) . '/ApiQueryLuceneSearch.php';
// Override the default search engine
$wgApiQueryListModules['search'] = 'ApiQueryLuceneSearch';
示例15: array
$wgExtensionCredits['specialpage'][] = array('author' => 'Tim Starling', 'name' => 'Makesysop', 'description' => 'Gives bureaucrats/stewards the ability to modify user levels', 'url' => 'http://www.mediawiki.org/wiki/Extension:Makesysop');
# Internationalisation file
require_once dirname(__FILE__) . '/SpecialMakesysop.i18n.php';
// Set groups to the appropriate sysop/bureaucrat structure:
// * Steward can do 'full' work (makesysop && userrights)
// * Bureaucrat can only do limited work (makesysop)
// BIZZWIKI begin {{
// Permission management is handled by BizzWiki
#$wgGroupPermissions['steward' ]['makesysop' ] = true;
#$wgGroupPermissions['steward' ]['userrights'] = true;
#$wgGroupPermissions['bureaucrat']['makesysop' ] = true;
#$wgGroupPermissions['bureaucrat']['userrights'] = false;
// BIZZWIKI end }}
$wgAvailableRights[] = 'makesysop';
/**
* Quick hack for clusters with multiple master servers; if an alternate
* is listed for the requested database, a connection to it will be opened
* instead of to the current wiki's regular master server.
*
* Requires that the other server be accessible by network, with the same
* username/password as the primary.
*
* eg $wgAlternateMaster['enwiki'] = 'ariel';
*/
$wgAlternateMaster = array();
# Register special page
if (!function_exists('extAddSpecialPage')) {
require dirname(__FILE__) . '/../ExtensionFunctions.php';
}
extAddSpecialPage(dirname(__FILE__) . '/SpecialMakesysop_body.php', 'Makesysop', 'MakeSysopPage');