// Autoloadable classes global $wgAutoloadClasses; $dir = dirname(__FILE__) . '/'; $wgAutoloadClasses['CKEditor'] = $dir . 'ckeditor/ckeditor_php5.php'; $wgAutoloadClasses['CKeditorParser'] = $dir . 'CKeditorParser.body.php'; $wgAutoloadClasses['CKeditorParserOptions'] = $dir . 'CKeditorParserOptions.body.php'; $wgAutoloadClasses['CKeditorParserWrapper'] = $dir . 'CKeditorParserWrapper.body.php'; $wgAutoloadClasses['CKeditorLinker'] = $dir . 'CKeditorLinker.php'; $wgAutoloadClasses['CKeditorSkin'] = $dir . 'CKeditorSkin.body.php'; $wgAutoloadClasses['CKeditorEditPage'] = $dir . 'CKeditorEditPage.body.php'; $wgAutoloadClasses['CKeditor_MediaWiki'] = $dir . 'CKeditor.body.php'; // Path to internationalization file $wgExtensionMessagesFiles['CKeditor'] = $dir . 'CKeditor.i18n.php'; // Initialize FCKeditor and the MediaWiki extension $ckeditor = new CKEditor('fake'); $wgFCKEditorIsCompatible = $ckeditor->IsCompatible(); $oCKeditorExtension = new CKeditor_MediaWiki(); // Hooked functions global $wgHooks; $wgHooks['ParserAfterTidy'][] = array($oCKeditorExtension, 'onParserAfterTidy'); $wgHooks['EditPage::showEditForm:initial'][] = array($oCKeditorExtension, 'onEditPageShowEditFormInitial'); $wgHooks['EditPage::showEditForm:fields'][] = array($oCKeditorExtension, 'onEditPageShowEditFormFields'); $wgHooks['EditPageBeforePreviewText'][] = array($oCKeditorExtension, 'onEditPageBeforePreviewText'); $wgHooks['EditPagePreviewTextEnd'][] = array($oCKeditorExtension, 'onEditPagePreviewTextEnd'); $wgHooks['CustomEditor'][] = array($oCKeditorExtension, 'onCustomEditor'); $wgHooks['LanguageGetMagic'][] = 'CKeditor_MediaWiki::onLanguageGetMagic'; $wgHooks['ParserBeforeStrip'][] = 'CKeditor_MediaWiki::onParserBeforeStrip'; $wgHooks['ParserBeforeInternalParse'][] = 'CKeditor_MediaWiki::onParserBeforeInternalParse'; $wgHooks['EditPageBeforeConflictDiff'][] = 'CKeditor_MediaWiki::onEditPageBeforeConflictDiff'; $wgHooks['SanitizerAfterFixTagAttributes'][] = 'CKeditor_MediaWiki::onSanitizerAfterFixTagAttributes'; $wgHooks['MakeGlobalVariablesScript'][] = 'CKeditor_MediaWiki::onMakeGlobalVariablesScript';