-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b1d5ee
commit 774ddc1
Showing
10 changed files
with
162 additions
and
209 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,15 @@ | ||
<?php | ||
/** | ||
* The CopyWatchers extension allows editors to copy watchers from other pages | ||
* using the parser function #copywatchers. | ||
* | ||
* Documentation: http://??? | ||
* Support: http://??? | ||
* Source code: http://??? | ||
* | ||
* @file CopyWatchers.php | ||
* @addtogroup Extensions | ||
* @author James Montalvo | ||
* @copyright © 2013 by James Montalvo | ||
* @licence GNU GPL v3+ | ||
*/ | ||
|
||
# Not a valid entry point, skip unless MEDIAWIKI is defined | ||
if (!defined('MEDIAWIKI')) { | ||
die( "CopyWatchers extension" ); | ||
if ( function_exists( 'wfLoadExtension' ) ) { | ||
wfLoadExtension( 'CopyWatchers' ); | ||
// Keep i18n globals so mergeMessageFileList.php doesn't break | ||
$wgMessagesDirs['CopyWatchers'] = __DIR__ . '/i18n'; | ||
$wgExtensionMessagesFiles['CopyWatchersMagic'] = __DIR__ . '/Magic.php'; | ||
wfWarn( | ||
'Deprecated PHP entry point used for FooBar extension. ' . | ||
'Please use wfLoadExtension instead, ' . | ||
'see https://www.mediawiki.org/wiki/Extension_registration for more details.' | ||
); | ||
return; | ||
} else { | ||
die( 'This version of the CopyWatchers extension requires MediaWiki 1.25+' ); | ||
} | ||
|
||
$wgExtensionCredits['specialpage'][] = array( | ||
'path' => __FILE__, | ||
'name' => 'Copy Watchers', | ||
'url' => 'http://www.mediawiki.org/wiki/Extension:CopyWatchers', | ||
'author' => 'James Montalvo', | ||
'descriptionmsg' => 'copywatchers-desc', | ||
'version' => '0.1.0' | ||
); | ||
|
||
$dir = dirname( __FILE__ ) . '/'; | ||
$wgExtensionMessagesFiles['CopyWatchers'] = $dir . 'CopyWatchers.i18n.php'; | ||
$wgAutoloadClasses['CopyWatchers'] = $dir . 'CopyWatchers.body.php'; | ||
|
||
// Specify the function that will initialize the parser function. | ||
$wgHooks['ParserFirstCallInit'][] = 'CopyWatchers::setup'; | ||
|
||
|
||
/* | ||
$wgAvailableRights[] = 'semanticwatch'; | ||
$wgAvailableRights[] = 'semanticwatchgroups'; | ||
$wgHooks['LoadExtensionSchemaUpdates'][] = 'SWLHooks::onSchemaUpdate'; | ||
$wgHooks['SMWStore::updateDataBefore'][] = 'SWLHooks::onDataUpdate'; | ||
$wgHooks['GetPreferences'][] = 'SWLHooks::onGetPreferences'; | ||
$wgHooks['UserSaveOptions'][] = 'SWLHooks::onUserSaveOptions'; | ||
$wgHooks['AdminLinks'][] = 'SWLHooks::addToAdminLinks'; | ||
$wgHooks['PersonalUrls'][] = 'SWLHooks::onPersonalUrls'; | ||
$wgHooks['SWLGroupNotify'][] = 'SWLHooks::onGroupNotify'; | ||
$wgExtensionFunctions[] = 'wfSetupCatHook'; | ||
$wgHooks['LanguageGetMagic'][] = 'wfCatHookLanguageGetMagic'; | ||
$wgHooks['ParserAfterTidy'][] = 'wfUserPageViewTracker'; | ||
class CategoryWatch { | ||
function __construct() { | ||
global $wgHooks; | ||
$wgHooks['ArticleSave'][] = $this; | ||
$wgHooks['ArticleSaveComplete'][] = $this; | ||
} | ||
... | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
$magicWords = array(); | ||
|
||
/** English (English) **/ | ||
$magicWords['en'] = array( | ||
'copywatchers' => array( 0, 'copywatchers' ), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "Copy Watchers", | ||
"version": "0.10.0", | ||
"author": "James Montalvo", | ||
"url": "http://www.mediawiki.org/wiki/Extension:CopyWatchers", | ||
"descriptionmsg": "copywatchers-desc", | ||
"type": "specialpage", | ||
"ExtensionMessagesFiles": { | ||
"CopyWatchersMagic": "Magic.php" | ||
}, | ||
"AutoloadClasses": { | ||
"CopyWatchers\\Setup": "includes/Setup.php", | ||
"CopyWatchers\\CopyWatchers": "includes/CopyWatchers.php" | ||
}, | ||
"Hooks": { | ||
"ParserFirstCallInit": [ | ||
"CopyWatchers\\Setup::setupParserFunctions" | ||
] | ||
}, | ||
"manifest_version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"copywatchers": "Copy Watchers", | ||
"copywatchers-desc": "Allows editors to copy watchers from other pages using the parser function #copywatchers" | ||
} |
Oops, something went wrong.