Changeset 2077
- Timestamp:
- 2008-06-17 15:01:25 (6 months ago)
- Location:
- MediaWiki/trunk
- Files:
-
- 7 modified
-
FCKeditor.body.php (modified) (15 diffs)
-
FCKeditorEditPage.body.php (modified) (1 diff)
-
FCKeditorParser.body.php (modified) (1 diff)
-
FCKeditorParserOptions.body.php (modified) (1 diff)
-
FCKeditor.php (modified) (4 diffs)
-
FCKeditorSajax.body.php (modified) (11 diffs)
-
FCKeditorSkin.body.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MediaWiki/trunk/FCKeditor.body.php
r2076 r2077 1 1 <?php 2 2 3 class FCKeditor_MediaWiki 4 { 3 class FCKeditor_MediaWiki { 5 4 private $count = array(); 6 5 private $wgFCKBypassText = ""; … … 29 28 static $messagesLoaded = false; 30 29 31 function __call($m,$a) 32 { 30 function __call($m, $a) { 33 31 print "\n#### " . $m . "\n"; 34 32 if (!isset($this->count[$m])) { … … 39 37 } 40 38 41 function onMonoBookTemplateToolboxEnd() 42 { 39 function onMonoBookTemplateToolboxEnd() { 43 40 if ($this->debug) { 44 41 print_r($this->count); … … 46 43 } 47 44 48 private function getExcludedNamespaces() 49 { 45 private function getExcludedNamespaces() { 50 46 global $wgUser; 51 47 … … 62 58 } 63 59 64 public function onLanguageGetMagic(&$magicWords, $langCode) 65 { 60 public function onLanguageGetMagic(&$magicWords, $langCode) { 66 61 $magicWords['NORICHEDITOR'] = array( 0, '__NORICHEDITOR__' ); 67 62 … … 69 64 } 70 65 71 public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state) 72 { 66 public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state) { 73 67 MagicWord::get( 'NORICHEDITOR' )->matchAndRemove( $text ); 74 68 … … 76 70 } 77 71 78 public function onEditPageShowEditFormFields($pageEditor, $wgOut) 79 { 72 public function onEditPageShowEditFormFields($pageEditor, $wgOut) { 80 73 global $wgUser, $wgFCKEditorIsCompatible, $wgTitle, $wgVersion; 81 74 … … 111 104 } 112 105 113 public function onEditPageBeforeConflictDiff($pageEditor, $wgOut) 114 { 106 public function onEditPageBeforeConflictDiff($pageEditor, $wgOut) { 115 107 global $fckPageEditor, $wgRequest; 116 108 … … 125 117 } 126 118 127 public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) 128 { 119 public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) { 129 120 $text = preg_match_all("/Fckmw\d+fckmw/", $text, $matches); 130 121 … … 181 172 } 182 173 183 public function onCustomEditor(&$article, &$user) 184 { 174 public function onCustomEditor(&$article, &$user) { 185 175 global $wgRequest, $mediaWiki; 186 176 … … 204 194 } 205 195 206 public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) 207 { 196 public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) { 208 197 global $wgUser, $wgRequest; 209 198 … … 216 205 } 217 206 218 public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) 219 { 207 public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) { 220 208 global $wgUser; 221 209 … … 227 215 } 228 216 229 public function onParserAfterTidy(&$parser, &$text) 230 { 217 public function onParserAfterTidy(&$parser, &$text) { 231 218 global $wgUseTeX, $wgUser, $wgTitle, $wgFCKEditorIsCompatible; 232 219 … … 248 235 } 249 236 250 public function onMessagesPreLoad() 251 { 237 public function onMessagesPreLoad() { 252 238 global $wgMessageCache, $wgUser, $wgContLanguageCode; 253 239 … … 538 524 var sajax_request_type = "GET"; 539 525 540 function WikiToHTML_Result(result) 541 { 526 function WikiToHTML_Result(result) { 542 527 var oEditor = FCKeditorAPI.GetInstance('wpTextbox1'); 543 528 oEditor.SetHTML(result.responseText); 544 529 } 545 function WikiToHTML_Call() 546 { 530 function WikiToHTML_Call() { 547 531 var oEditor = FCKeditorAPI.GetInstance('wpTextbox1'); 548 532 sajax_do_call('wfSajaxWikiToHTML', [oEditor.GetHTML()], WikiToHTML_Result); -
MediaWiki/trunk/FCKeditorEditPage.body.php
r1929 r2077 1 1 <?php 2 2 3 class FCKeditorEditPage extends EditPage 4 { 3 class FCKeditorEditPage extends EditPage { 5 4 /** 6 5 * Should we show a preview when the edit form is first shown? -
MediaWiki/trunk/FCKeditorParser.body.php
r1941 r2077 1 1 <?php 2 2 3 class FCKeditorParser extends Parser 4 { 3 class FCKeditorParser extends Parser { 5 4 public static $fkc_mw_makeImage_options; 6 5 protected $fck_mw_strtr_span; -
MediaWiki/trunk/FCKeditorParserOptions.body.php
r1660 r2077 1 1 <?php 2 2 3 class FCKeditorParserOptions extends ParserOptions 4 { 5 function getNumberHeadings() {return false;} 6 function getEditSection() {return false;} 3 class FCKeditorParserOptions extends ParserOptions { 4 function getNumberHeadings() { return false; } 5 function getEditSection() { return false; } 7 6 8 7 function getSkin() { -
MediaWiki/trunk/FCKeditor.php
r2075 r2077 4 4 if (!defined('MEDIAWIKI')) { 5 5 echo <<<HEREDOC 6 To install myextension, put the following line in LocalSettings.php:6 To install FCKeditor extension, put the following line in LocalSettings.php: 7 7 require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" ); 8 8 HEREDOC; … … 53 53 54 54 if (empty ($wgFCKEditorExtDir)) { 55 $wgFCKEditorExtDir = "extensions/FCKeditor" ;55 $wgFCKEditorExtDir = "extensions/FCKeditor"; 56 56 } 57 57 if (empty ($wgFCKEditorDir)) { 58 $wgFCKEditorDir = "extensions/FCKeditor/fckeditor" ;58 $wgFCKEditorDir = "extensions/FCKeditor/fckeditor"; 59 59 } 60 60 if (empty ($wgFCKEditorToolbarSet)) { 61 $wgFCKEditorToolbarSet = "Wiki" ;61 $wgFCKEditorToolbarSet = "Wiki"; 62 62 } 63 63 if (empty ($wgFCKEditorHeight)) { 64 $wgFCKEditorHeight = "0" ; // "0" for automatic ("300" minimum).64 $wgFCKEditorHeight = "0"; // "0" for automatic ("300" minimum). 65 65 } 66 66 … … 78 78 79 79 $wgExtensionCredits['other'][] = array( 80 "name" => "FCKeditor extension",81 "author" => "FCKeditor.net (inspired by the code written by Mafs [Meta])",82 "version"=> 'fckeditor/mw-extension $Rev$ 2008',83 "url" => "http://meta.wikimedia.org/wiki/FCKeditor",84 "description" => "FCKeditor extension" 80 'name' => 'FCKeditor', 81 'author' => array('FCKeditor.net', 'Wikia'), 82 'version' => 'fckeditor/mw-extension $Rev$ 2008', 83 'url' => 'http://www.mediawiki.org/wiki/Extension:FCKeditor_%28by_FCKeditor_and_Wikia%29', 84 'description' => 'FCKeditor extension for editing wiki pages (WYSIWYG editor)' 85 85 ); 86 86 … … 91 91 $oFCKeditorExtension->registerHooks(); 92 92 93 94 95 96 97 98 99 -
MediaWiki/trunk/FCKeditorSajax.body.php
r1836 r2077 1 1 <?php 2 2 3 function wfSajaxGetMathUrl( $term ) 4 { 3 function wfSajaxGetMathUrl( $term ) { 5 4 $originalLink = MathRenderer::renderMath( $term ); 6 5 … … 15 14 } 16 15 17 function wfSajaxGetImageUrl( $term ) 18 { 16 function wfSajaxGetImageUrl( $term ) { 19 17 global $wgExtensionFunctions, $wgTitle; 20 18 … … 39 37 } 40 38 41 function wfSajaxSearchSpecialTagFCKeditor($empty) 42 { 39 function wfSajaxSearchSpecialTagFCKeditor($empty) { 43 40 global $wgParser; 44 41 … … 52 49 } 53 50 54 function wfSajaxSearchImageFCKeditor( $term ) 55 { 51 function wfSajaxSearchImageFCKeditor( $term ) { 56 52 global $wgContLang, $wgOut; 57 53 $limit = 10; … … 66 62 return ""; 67 63 68 $db = &wfGetDB( DB_SLAVE );64 $db = wfGetDB( DB_SLAVE ); 69 65 $res = $db->select( 'page', 'page_title', 70 66 array( 'page_namespace' => NS_IMAGE, … … 75 71 76 72 $ret = ""; 77 $i =0;73 $i = 0; 78 74 while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) { 79 75 $ret .= $row->page_title ."\n"; … … 85 81 } 86 82 87 function wfSajaxSearchArticleFCKeditor( $term ) 88 { 83 function wfSajaxSearchArticleFCKeditor( $term ) { 89 84 global $wgContLang, $wgOut; 90 85 $limit = 10; … … 113 108 } 114 109 115 $db = &wfGetDB( DB_SLAVE );110 $db = wfGetDB( DB_SLAVE ); 116 111 $res = $db->select( 'page', 'page_title', 117 112 array( 'page_namespace' => $ns, … … 122 117 123 118 $ret = ""; 124 $i =0;119 $i = 0; 125 120 while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) { 126 121 if (isset($prefix) && !is_null($prefix)) { … … 135 130 } 136 131 137 function wfSajaxSearchTemplateFCKeditor($empty) 138 { 132 function wfSajaxSearchTemplateFCKeditor($empty) { 139 133 global $wgContLang, $wgOut; 140 134 $ns = NS_TEMPLATE; 141 135 142 $db = &wfGetDB( DB_SLAVE );136 $db = wfGetDB( DB_SLAVE ); 143 137 $res = $db->select( 'page', 'page_title', 144 array( 'page_namespace' => $ns),138 array( 'page_namespace' => $ns), 145 139 "wfSajaxSearch" 146 140 ); … … 154 148 } 155 149 156 function wfSajaxWikiToHTML( $wiki ) 157 { 150 function wfSajaxWikiToHTML( $wiki ) { 158 151 global $wgTitle; 159 152 -
MediaWiki/trunk/FCKeditorSkin.body.php
r1854 r2077 1 1 <?php 2 2 3 class FCKeditorSkin 4 { 3 class FCKeditorSkin { 5 4 private $skin; 6 5 … … 20 19 */ 21 20 function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false, 22 $thumb = false, $manual_thumb = '', $valign = '' ) 23 { 21 $thumb = false, $manual_thumb = '', $valign = '' ) { 24 22 $orginal = $nt->getText(); 25 23 $img = new Image( $nt ); … … 216 214 } 217 215 218 function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) 219 { 216 function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) { 220 217 $fname = 'FCKeditorSkin::makeKnownLinkObj'; 221 218 wfProfileIn( $fname ); … … 258 255 } 259 256 260 function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) 261 { 257 function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { 262 258 # Fail gracefully 263 259 if ( ! isset($nt) ) { … … 345 341 } 346 342 347 function __call( $m, $a) 348 { 343 function __call( $m, $a) { 349 344 return call_user_func_array( array( $this->skin, $m ), $a ); 350 345 } 351 346 352 function __construct( &$skin ) 353 { 347 function __construct( &$skin ) { 354 348 $this->skin = $skin; 355 349 }