3
# Not a valid entry point, skip unless MEDIAWIKI is defined
4
if (!defined('MEDIAWIKI')) {
6
To install FCKeditor extension, put the following line in LocalSettings.php:
7
require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" );
13
This library is free software; you can redistribute it and/or
14
modify it under the terms of the GNU Lesser General Public
15
License as published by the Free Software Foundation; either
16
version 2.1 of the License, or (at your option) any later version.
18
This library is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
Lesser General Public License for more details.
23
You should have received a copy of the GNU Lesser General Public
24
License along with this library; if not, write to the Free Software
25
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28
require_once $IP . "/includes/GlobalFunctions.php";
29
require_once $IP . "/includes/EditPage.php";
31
if (version_compare("1.14alpha", $wgVersion, "<=")) {
32
require_once $IP . "/includes/parser/ParserOptions.php";
33
require_once $IP . "/includes/parser/Parser.php";
34
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw14/Parser_OldPP.body.php";
35
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
37
else if (version_compare("1.13alpha", $wgVersion, "<=")) {
38
require_once $IP . "/includes/parser/ParserOptions.php";
39
require_once $IP . "/includes/parser/Parser_OldPP.php";
40
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
42
else if (version_compare("1.12", $wgVersion, "<")) {
43
require_once $IP . "/includes/ParserOptions.php";
44
require_once $IP . "/includes/Parser_OldPP.php";
45
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
48
require_once $IP . "/includes/ParserOptions.php";
49
require_once $IP . "/includes/Parser.php";
50
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw11/FCKeditorParserWrapper.body.php";
53
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParser.body.php";
54
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSajax.body.php";
55
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParserOptions.body.php";
56
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSkin.body.php";
57
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorEditPage.body.php";
58
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditor.body.php";
59
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "fckeditor" . DIRECTORY_SEPARATOR . "fckeditor.php";
61
if (empty ($wgFCKEditorExtDir)) {
62
$wgFCKEditorExtDir = "extensions/FCKeditor";
64
if (empty ($wgFCKEditorDir)) {
65
$wgFCKEditorDir = "extensions/FCKeditor/fckeditor";
67
if (empty ($wgFCKEditorToolbarSet)) {
68
$wgFCKEditorToolbarSet = "Wiki";
70
if (empty ($wgFCKEditorHeight)) {
71
$wgFCKEditorHeight = "0"; // "0" for automatic ("300" minimum).
74
* Enable use of AJAX features.
77
$wgAjaxExportList[] = 'wfSajaxSearchImageFCKeditor';
78
$wgAjaxExportList[] = 'wfSajaxSearchArticleFCKeditor';
79
$wgAjaxExportList[] = 'wfSajaxSearchCategoryFCKeditor';
80
$wgAjaxExportList[] = 'wfSajaxWikiToHTML';
81
$wgAjaxExportList[] = 'wfSajaxGetImageUrl';
82
$wgAjaxExportList[] = 'wfSajaxGetMathUrl';
83
$wgAjaxExportList[] = 'wfSajaxSearchTemplateFCKeditor';
84
$wgAjaxExportList[] = 'wfSajaxSearchSpecialTagFCKeditor';
85
$wgAjaxExportList[] = 'wfSajaxToggleFCKeditor';
87
$wgExtensionCredits['other'][] = array(
88
'name' => 'FCKeditor',
89
'author' => array('FCKeditor.net', 'Wikia'),
90
'version' => 'fckeditor/mw-extension $Rev$ 2008',
91
'url' => 'http://www.mediawiki.org/wiki/Extension:FCKeditor_%28by_FCKeditor_and_Wikia%29',
92
'description' => 'FCKeditor extension for editing wiki pages (WYSIWYG editor)'
95
$fckeditor = new FCKeditor("fake");
96
$wgFCKEditorIsCompatible = $fckeditor->IsCompatible();
98
$oFCKeditorExtension = new FCKeditor_MediaWiki();
100
$oFCKeditorExtension->registerHooks();
102
$wgDefaultUserOptions['riched_use_toggle'] = 1;
103
$wgDefaultUserOptions['riched_start_disabled'] = 1;
104
$wgDefaultUserOptions['riched_use_popup'] = 1;
105
$wgDefaultUserOptions['riched_toggle_remember_state'] = 1;