Index: trunk/extensions/StarterWiki/INSTALL |
— | — | @@ -0,0 +1,24 @@ |
| 2 | + |
| 3 | +==Activating the extension== |
| 4 | +Place one of these lines in your LocalSettings.php |
| 5 | +(depending on the location you put your extensions in) |
| 6 | + |
| 7 | + require_once( "extensions/wiki-tools/StarterWiki/StarterWiki.php" ); |
| 8 | + |
| 9 | + or |
| 10 | + |
| 11 | + require_once( "extensions/StarterWiki/StarterWiki.php" ); |
| 12 | + |
| 13 | +==Activating the maintenance scripts== |
| 14 | +Maintenance scripts must be placed within the "./maintenance" directory |
| 15 | +of your MediaWiki installation. In most cases, it is best to do this via |
| 16 | +a symbolic link, e.g. |
| 17 | + |
| 18 | +% ln -s ./extensions/wiki-tools/StarterWiki/maintenance/createWikiDBFromStarter.php ./maintenance/ |
| 19 | + |
| 20 | + or |
| 21 | + |
| 22 | +% ln -s ./extensions/StarterWiki/maintenance/createWikiDBFromStarter.php ./maintenance/ |
| 23 | + |
| 24 | +Scripts can be run with a command line PHP call if your MediaWiki is |
| 25 | +properly configured to run maintenance scripts. |
Index: trunk/extensions/StarterWiki/StarterWiki.php |
— | — | @@ -0,0 +1,52 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * StarterWiki |
| 5 | + * @package StarterWiki |
| 6 | + * @author Daniel Friesen (http://mediawiki.org/wiki/User:Dantman) <mediawiki@danielfriesen.name> |
| 7 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
| 8 | + * |
| 9 | + * This program is free software; you can redistribute it and/or |
| 10 | + * modify it under the terms of the GNU General Public License |
| 11 | + * as published by the Free Software Foundation; either version 2 |
| 12 | + * of the License, or (at your option) any later version. |
| 13 | + * |
| 14 | + * This program is distributed in the hope that it will be useful, |
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | + * GNU General Public License for more details. |
| 18 | + * |
| 19 | + * You should have received a copy of the GNU General Public License |
| 20 | + * along with this program; if not, write to the Free Software |
| 21 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 22 | + */ |
| 23 | + |
| 24 | +if( !defined( 'MEDIAWIKI' ) ) die( "This is an extension to the MediaWiki package and cannot be run standalone." ); |
| 25 | + |
| 26 | +$wgExtensionCredits['other'][] = array ( |
| 27 | + 'name' => 'StarterWiki', |
| 28 | + 'url' => 'http://wiki-tools.com/wiki/StarterWiki', |
| 29 | + 'version' => '1.2a', |
| 30 | + 'author' => "[http://mediawiki.org/wiki/User:Dantman Daniel Friesen]", |
| 31 | + 'description' => "Provides a set of maintenance scripts and functions to allow for creation of wiki databases based off a starter wiki." |
| 32 | +); |
| 33 | + |
| 34 | +## A list of pages to convert titles and override when cloning the database. |
| 35 | +## Key is the ns:title on starter, value is the ns:title to use on the other wiki. |
| 36 | +$wgStarterWikiPageAliases = array( |
| 37 | + '0:Main_Page/Starter' => '0:Main_Page' |
| 38 | +); |
| 39 | + |
| 40 | +## Array of namespaces to exclude from cloning. |
| 41 | +$wgStarterWikiOmitNamespaces = array( |
| 42 | + NS_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 43 | + NS_USER, # Don't clone userpages, users may not be the same. |
| 44 | + NS_USER_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 45 | + NS_PROJECT_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 46 | + NS_IMAGE, # Don't clone image pages, files are not cloned. |
| 47 | + NS_IMAGE_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 48 | + NS_MEDIAWIKI, # Don't clone messages, a shared system should be used |
| 49 | + NS_MEDIAWIKI_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 50 | + NS_TEMPLATE_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 51 | + NS_HELP_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 52 | + NS_CATEGORY_TALK, # Don't clone talkpages, discussions shouldn't be cloned. |
| 53 | +); |