Index: trunk/extensions/WikiBhasha/WikiBhasha.php |
— | — | @@ -1,15 +1,5 @@ |
2 | 2 | <?php |
3 | | -/******************************************************** |
4 | | -* * |
5 | | -* Copyright (C) Microsoft. All rights reserved. * |
6 | | -* * |
7 | | -********************************************************/ |
8 | 3 | |
9 | | -/* |
10 | | -Copyright (c) 2010, Microsoft |
11 | | -All rights reserved. |
12 | | -*/ |
13 | | - |
14 | 4 | // WikiBhasha launch Extention script. |
15 | 5 | // Description: this script eases the procedure to launch WikiBhasha by instrumenting |
16 | 6 | // wikipedia pages with links and options to launch the application. It executes the |
Index: trunk/extensions/WikiBhasha/WikiBhashaSpecial.php |
— | — | @@ -1,14 +1,12 @@ |
2 | 2 | <?php |
3 | | -/** |
4 | | - * Special:WikiBhasha |
5 | | - * |
6 | | - * @file |
7 | | - * @ingroup SpecialPage |
8 | | - */ |
9 | 3 | |
10 | | -/** |
11 | | - * |
12 | | - */ |
| 4 | +/* |
| 5 | +* |
| 6 | +* We need to overload the special page constructor to initialize our own data also if we want to change the behavior of the SpecialPage class itself. |
| 7 | +* it will ececute when called from the child class |
| 8 | +* |
| 9 | +*/ |
| 10 | + |
13 | 11 | class wikiBhasha extends SpecialPage { |
14 | 12 | |
15 | 13 | /** |
Index: trunk/extensions/WikiBhasha/WikiBhashaExtClass.php |
— | — | @@ -1,25 +1,13 @@ |
2 | 2 | <?php |
3 | | -/******************************************************** |
4 | | -* * |
5 | | -* Copyright (C) Microsoft. All rights reserved. * |
6 | | -* * |
7 | | -********************************************************/ |
8 | 3 | |
9 | | -/* |
10 | | -Copyright (c) 2010, Microsoft |
11 | | -All rights reserved. |
| 4 | +/* |
| 5 | +WikiBhasha launch Extention base class script. |
| 6 | +Available functions: |
| 7 | +1) wikiBhashaToolbox : adds wikibhasha launch link in the left toolbox menue |
| 8 | +2) wbToolbarIcon : - Looks for "action=edit" in the URL and check if toolbar exists. if present adds a icon to the toolbar for launching WikiBhasha. |
| 9 | +* - Looks for "wbAutoLaunch=true" in the URL and launch WikiBhasha. |
12 | 10 | */ |
13 | 11 | |
14 | | -// WikiBhasha launch Extention script. |
15 | | -// Description: this script eases the procedure to launch WikiBhasha by instrumenting |
16 | | -// wikipedia pages with links and options to launch the application. It executes the |
17 | | -// same routine as the bookmarklet and is portable across Wikipedia installations. |
18 | | -// |
19 | | -// The current functions to launch WikiBhasha: |
20 | | -// 1. Looks for "action=edit" in the URL and check if toolbar exists. if present adds a |
21 | | -// icon to the toolbar for launching WikiBhasha. |
22 | | -// 2. inserts a "WikiBhasha" option in the left side toolbox menu. |
23 | | -// 3. Looks for "wbAutoLaunch=true" in the URL and launch WikiBhasha. |
24 | 12 | class wikiBhashaExt { |
25 | 13 | private $url, $wikiBhashaUrl; |
26 | 14 | function __construct() { |
Index: trunk/extensions/WikiBhasha/WikiBhasha.alias.php |
— | — | @@ -1,5 +1,11 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +/* |
| 5 | +* |
| 6 | +* It allows the page title to be translated to another language. The page title can be customized into another language, the URL of the page would still be something like .../Special:WikiBhasha, even when the user language is not English. |
| 7 | +* |
| 8 | +*/ |
| 9 | + |
4 | 10 | $specialPageAliases = array(); |
5 | 11 | |
6 | 12 | $specialPageAliases['en'] = array( |
Index: trunk/extensions/WikiBhasha/WikiBhasha_body.php |
— | — | @@ -1,5 +1,10 @@ |
2 | 2 | <?php |
3 | | - |
| 3 | +/* |
| 4 | +* |
| 5 | +* The body file will contain a subclass of SpecialPage. It will be loaded automatically when the special page is requested |
| 6 | +* this file contains the functions to populate the content to the special page |
| 7 | +* |
| 8 | +*/ |
4 | 9 | class wikibhasha extends SpecialPage { |
5 | 10 | function __construct() { |
6 | 11 | parent::__construct( 'Wikibhasha' ); |
Index: trunk/extensions/WikiBhasha/WikiBhasha.i18n.php |
— | — | @@ -1,5 +1,14 @@ |
2 | 2 | <?php |
3 | | - |
| 3 | +/* |
| 4 | +* |
| 5 | +* If you want your extension to be used on wikis that have a multi-lingual readership, we will need to add internationalization support to the extension. |
| 6 | +* |
| 7 | +* 1.For any text string displayed to the user, define a message. MediaWiki supports parameterized messages and that feature should be used when a message is dependent on information generated at runtime. Assign each message a lowercase message id. |
| 8 | +* 2.In the setup and implementation code, replace each literal use of the message with a call to wfMsg( $msgID, $param1, $param2, ... ). Example : wfMsg( 'addition', '1', '2', '3' ) |
| 9 | +* 3.Store the message definition in the internalization file (WikiBhasha.i18n.php) . This is normally done by setting up an array that maps language and message id to each string. Each message id should be lowercase and they may not contain spaces |
| 10 | +* |
| 11 | +* |
| 12 | +*/ |
4 | 13 | $messages = array(); |
5 | 14 | |
6 | 15 | /** |