r32727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32726‎ | r32727 | r32728 >
Date:20:23, 2 April 2008
Author:brion
Status:old
Tags:
Comment:
Updated to r1881 of http://svn.fckeditor.net/MediaWiki/trunk
Plus some CRLF->LF normalization... :)

Did a quick local edit test; I'm a bit disappointed that it seems to break images. :(
Modified paths:
  • /trunk/extensions/FCKeditor/FCKeditor.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.ar.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.de.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.en.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.fr.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.gl.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.hsb.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.nl.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.no.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.oc.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pl.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pms.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pt.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.sk.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorParser.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorParserOptions.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorSajax.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorSkin.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/css/fckeditor.css (modified) (history)
  • /trunk/extensions/FCKeditor/fckeditor_config.js (modified) (history)
  • /trunk/extensions/FCKeditor/mw12 (added) (history)
  • /trunk/extensions/FCKeditor/mw12/FCKeditorParser_OldPP.body.php (added) (history)
  • /trunk/extensions/FCKeditor/patches (deleted) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/image.html (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/link.html (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/math.html (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/ref.html (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/special.html (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/template.html (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/fckplugin.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_gallery.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_includeonly.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_noinclude.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_nowiki.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_onlyinclude.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_special.gif (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/images/tb_icon_special.gif (added) (history)

Diff [purge]

Index: trunk/extensions/FCKeditor/FCKeditor.i18n.php
@@ -1,411 +0,0 @@
2 -<?php
3 -/**
4 - * Internationalisation file for extension FCKeditor
5 - *
6 - * @addtogroup Extensions
7 - */
8 -
9 -$messages = array();
10 -
11 -/* English
12 - */
13 -$messages['en'] = array(
14 - 'textrichditor' => 'Rich Editor',
15 - 'textrichditor-desc' => 'Use the FCKeditor for editing wiki pages',
16 - 'tog-riched_disable' => 'Disable rich editor',
17 - 'tog-riched_disable_ns_main' => 'Disable rich editor within the main namespace',
18 - 'tog-riched_disable_ns_talk' => 'Disable rich editor within the "{{ns:talk}}" namespace',
19 - 'tog-riched_disable_ns_user' => 'Disable rich editor within the "{{ns:user}}" namespace',
20 - 'tog-riched_disable_ns_user_talk' => 'Disable rich editor within the "{{ns:user_talk}}" namespace',
21 - 'tog-riched_disable_ns_project' => 'Disable rich editor within the "{{ns:project}}" namespace',
22 - 'tog-riched_disable_ns_project_talk' => 'Disable rich editor within the "{{ns:project_talk}}" namespace',
23 - 'tog-riched_disable_ns_image' => 'Disable rich editor within the "{{ns:image}}" namespace',
24 - 'tog-riched_disable_ns_image_talk' => 'Disable rich editor within the "{{ns:image_talk}}" namespace',
25 - 'tog-riched_disable_ns_mediawiki' => 'Disable rich editor within the "{{ns:mediawiki}}" namespace',
26 - 'tog-riched_disable_ns_mediawiki_talk' => 'Disable rich editor within the "{{ns:mediawiki_talk}}" namespace',
27 - 'tog-riched_disable_ns_template' => 'Disable rich editor within the "{{ns:template}}" namespace',
28 - 'tog-riched_disable_ns_template_talk' => 'Disable rich editor within the "{{ns:template_talk}}" namespace',
29 - 'tog-riched_disable_ns_help' => 'Disable rich editor within the "{{ns:help}}" namespace',
30 - 'tog-riched_disable_ns_help_talk' => 'Disable rich editor within the "{{ns:help_talk}}" namespace',
31 - 'tog-riched_disable_ns_category' => 'Disable rich editor within the "{{ns:category}}" namespace',
32 - 'tog-riched_disable_ns_category_talk' => 'Disable rich editor within the "{{ns:category_talk}}" namespace',
33 -);
34 -
35 -/** Arabic (العربية)
36 - * @author Meno25
37 - */
38 -$messages['ar'] = array(
39 - 'textrichditor' => 'محرر متقدم',
40 - 'textrichditor-desc' => 'استخدم FCKeditor لتعديل صفحات الويكي',
41 - 'tog-riched_disable' => 'عطل المحرر المتقدم',
42 - 'tog-riched_disable_ns_main' => 'عطل المحرر المتقدم في النطاق الرئيسي',
43 - 'tog-riched_disable_ns_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Talk}}"',
44 - 'tog-riched_disable_ns_user' => 'عطل المحرر المتقدم في نطاق "{{ns:User}}"',
45 - 'tog-riched_disable_ns_user_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:User_talk}}"',
46 - 'tog-riched_disable_ns_project' => 'عطل المحرر المتقدم في نطاق "{{ns:Project}}"',
47 - 'tog-riched_disable_ns_project_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Project_talk}}"',
48 - 'tog-riched_disable_ns_image' => 'عطل المحرر المتقدم في نطاق "{{ns:Image}}"',
49 - 'tog-riched_disable_ns_image_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Image_talk}}"',
50 - 'tog-riched_disable_ns_mediawiki' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki}}"',
51 - 'tog-riched_disable_ns_mediawiki_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki_talk}}"',
52 - 'tog-riched_disable_ns_template' => 'عطل المحرر المتقدم في نطاق "{{ns:Template}}"',
53 - 'tog-riched_disable_ns_template_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Template_talk}}"',
54 - 'tog-riched_disable_ns_help' => 'عطل المحرر المتقدم في نطاق "{{ns:Help}}"',
55 - 'tog-riched_disable_ns_help_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Help_talk}}"',
56 - 'tog-riched_disable_ns_category' => 'عطل المحرر المتقدم في نطاق "{{ns:Category}}"',
57 - 'tog-riched_disable_ns_category_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Category_talk}}"',
58 -);
59 -
60 -/** Bulgarian (Български)
61 - * @author DCLXVI
62 - */
63 -$messages['bg'] = array(
64 - 'textrichditor' => 'Разширен редактор',
65 - 'textrichditor-desc' => 'Използване на FCKeditor за редактиране на страниците в уикито',
66 - 'tog-riched_disable' => 'Изключване на разширения редактор',
67 - 'tog-riched_disable_ns_main' => 'Изключване на разширения редактор в основното именно пространство',
68 - 'tog-riched_disable_ns_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Talk}}“',
69 - 'tog-riched_disable_ns_user' => 'Изключване на разширения редактор в именно пространство „{{ns:User}}“',
70 - 'tog-riched_disable_ns_user_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:User_talk}}“',
71 - 'tog-riched_disable_ns_project' => 'Изключване на разширения редактор в именно пространство „{{ns:Project}}“',
72 - 'tog-riched_disable_ns_project_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Project_talk}}“',
73 - 'tog-riched_disable_ns_image' => 'Изключване на разширения редактор в именно пространство „{{ns:Image}}“',
74 - 'tog-riched_disable_ns_image_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Image_talk}}“',
75 - 'tog-riched_disable_ns_mediawiki' => 'Изключване на разширения редактор в именно пространство „{{ns:MediaWiki}}“',
76 - 'tog-riched_disable_ns_mediawiki_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:MediaWiki_talk}}“',
77 - 'tog-riched_disable_ns_template' => 'Изключване на разширения редактор в именно пространство „{{ns:Template}}“',
78 - 'tog-riched_disable_ns_template_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Template_talk}}“',
79 - 'tog-riched_disable_ns_help' => 'Изключване на разширения редактор в именно пространство „{{ns:Help}}“',
80 - 'tog-riched_disable_ns_help_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Help_talk}}“',
81 - 'tog-riched_disable_ns_category' => 'Изключване на разширения редактор в именно пространство „{{ns:Category}}“',
82 - 'tog-riched_disable_ns_category_talk' => 'Изключване на разширения редактор в именно пространство „{{ns:Category_talk}}“',
83 -);
84 -
85 -/** French (Français)
86 - * @author Sherbrooke
87 - * @author Grondin
88 - */
89 -$messages['fr'] = array(
90 - 'textrichditor' => "''Rich Editor''",
91 - 'textrichditor-desc' => "Utilise FCKeditor pour l'édition des pages wiki",
92 - 'tog-riched_disable' => "Désactiver ''Rich Editor''",
93 - 'tog-riched_disable_ns_main' => "Désactiver ''Rich Editor'' dans l'espace de noms principal.",
94 - 'tog-riched_disable_ns_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Talk}}''.",
95 - 'tog-riched_disable_ns_user' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:User}}''.",
96 - 'tog-riched_disable_ns_user_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:User_talk}}''.",
97 - 'tog-riched_disable_ns_project' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Project}}''.",
98 - 'tog-riched_disable_ns_project_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Project_talk}}''.",
99 - 'tog-riched_disable_ns_image' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Image}}''.",
100 - 'tog-riched_disable_ns_image_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Image_talk}}''.",
101 - 'tog-riched_disable_ns_mediawiki' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:MediaWiki}}''.",
102 - 'tog-riched_disable_ns_mediawiki_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:MediaWiki_talk}}''.",
103 - 'tog-riched_disable_ns_template' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Template}}''.",
104 - 'tog-riched_disable_ns_template_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Template_talk}}''.",
105 - 'tog-riched_disable_ns_help' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Help}}''.",
106 - 'tog-riched_disable_ns_help_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Help_talk}}''.",
107 - 'tog-riched_disable_ns_category' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Category}}''.",
108 - 'tog-riched_disable_ns_category_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Category_talk}}''.",
109 -);
110 -
111 -$messages['gl'] = array(
112 - 'textrichditor' => 'Editor Rico',
113 - 'tog-riched_disable' => 'Desactivar o editor rico',
114 - 'tog-riched_disable_ns_main' => 'Desactivar o editor rico no espazo de nomes principal',
115 - 'tog-riched_disable_ns_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Talk}}"',
116 - 'tog-riched_disable_ns_user' => 'Desactivar o editor rico no espazo de nomes "{{ns:User}}"',
117 - 'tog-riched_disable_ns_user_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:User_Talk}}"',
118 - 'tog-riched_disable_ns_project' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project}}"',
119 - 'tog-riched_disable_ns_project_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project_Talk}}"',
120 - 'tog-riched_disable_ns_image' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image}}"',
121 - 'tog-riched_disable_ns_image_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image_talk}}"',
122 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki}}"',
123 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki_talk}}"',
124 - 'tog-riched_disable_ns_template' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template}}"',
125 - 'tog-riched_disable_ns_template_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template_talk}}"',
126 - 'tog-riched_disable_ns_help' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help}}"',
127 - 'tog-riched_disable_ns_help_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help_talk}}"',
128 - 'tog-riched_disable_ns_category' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category}}"',
129 - 'tog-riched_disable_ns_category_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category_talk}}"',
130 -);
131 -
132 -/** Upper Sorbian (Hornjoserbsce)
133 - * @author Michawiki
134 - */
135 -$messages['hsb'] = array(
136 - 'textrichditor' => 'Rich editor',
137 - 'textrichditor-desc' => 'FCKeditor za wobdźěłowanje wikijowych stronow wužiwać',
138 - 'tog-riched_disable' => 'Rich editor deaktiwizować',
139 - 'tog-riched_disable_ns_main' => 'Rich editor znutřka hłowneho mjenoweho ruma deaktiwizować',
140 - 'tog-riched_disable_ns_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Talk}}" deaktiwizować',
141 - 'tog-riched_disable_ns_user' => 'Rich editor znutřka mjenoweho ruma "{{ns:User}}" deaktiwizować',
142 - 'tog-riched_disable_ns_user_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:User_talk}}" deaktiwizować',
143 - 'tog-riched_disable_ns_project' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project}}" deaktiwizować',
144 - 'tog-riched_disable_ns_project_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project_talk}}" deaktiwizować',
145 - 'tog-riched_disable_ns_image' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image}}" deaktiwizować',
146 - 'tog-riched_disable_ns_image_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image_talk}}" deaktiwizować',
147 - 'tog-riched_disable_ns_mediawiki' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki}}" deaktiwizować',
148 - 'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki_talk}}" deaktiwizować',
149 - 'tog-riched_disable_ns_template' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template}}" deaktiwizować',
150 - 'tog-riched_disable_ns_template_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template_talk}}" deaktiwizować',
151 - 'tog-riched_disable_ns_help' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help}}" deaktiwizować',
152 - 'tog-riched_disable_ns_help_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help_talk}}" deaktiwizować',
153 - 'tog-riched_disable_ns_category' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category}}" deaktiwizować',
154 - 'tog-riched_disable_ns_category_talk' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category_talk}}" deaktiwizować',
155 -);
156 -
157 -/** Marathi (मराठी)
158 - * @author Kaustubh
159 - */
160 -$messages['mr'] = array(
161 - 'textrichditor' => 'वाढीव संपादक',
162 - 'textrichditor-desc' => 'विकि पाने संपादित करण्यासाठी FCKeditor वापरा',
163 - 'tog-riched_disable' => 'वाढीव संपादक रद्द करा',
164 - 'tog-riched_disable_ns_main' => 'मुख्य नामविश्वात वाढीव संपादक रद्द करा',
165 - 'tog-riched_disable_ns_talk' => '"{{ns:Talk}}" नामविश्वात वाढीव संपादक रद्द करा',
166 - 'tog-riched_disable_ns_user' => '"{{ns:User}}" नामविश्वात वाढीव संपादक रद्द करा',
167 - 'tog-riched_disable_ns_user_talk' => '"{{ns:User_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
168 - 'tog-riched_disable_ns_project' => '"{{ns:Project}}" नामविश्वात वाढीव संपादक रद्द करा',
169 - 'tog-riched_disable_ns_project_talk' => '"{{ns:Project_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
170 - 'tog-riched_disable_ns_image' => '"{{ns:Image}}" नामविश्वात वाढीव संपादक रद्द करा',
171 - 'tog-riched_disable_ns_image_talk' => '"{{ns:Image_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
172 - 'tog-riched_disable_ns_mediawiki' => '"{{ns:MediaWiki}}" नामविश्वात वाढीव संपादक रद्द करा',
173 - 'tog-riched_disable_ns_mediawiki_talk' => '"{{ns:MediaWiki_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
174 - 'tog-riched_disable_ns_template' => '"{{ns:Template}}" नामविश्वात वाढीव संपादक रद्द करा',
175 - 'tog-riched_disable_ns_template_talk' => '"{{ns:Template_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
176 - 'tog-riched_disable_ns_help' => '"{{ns:Help}}" नामविश्वात वाढीव संपादक रद्द करा',
177 - 'tog-riched_disable_ns_help_talk' => '"{{ns:Help_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
178 - 'tog-riched_disable_ns_category' => '"{{ns:Category}}" नामविश्वात वाढीव संपादक रद्द करा',
179 - 'tog-riched_disable_ns_category_talk' => '"{{ns:Category_talk}}" नामविश्वात वाढीव संपादक रद्द करा',
180 -);
181 -
182 -$messages['nl'] = array(
183 - 'textrichditor' => 'Uitgebreide editor',
184 - 'textrichditor-desc' => 'Gebruik de FCKeditor voor het bewerken van wiki pagina\'s',
185 - 'tog-riched_disable' => 'Uitgebreide editor uitschakelen',
186 - 'tog-riched_disable_ns_main' => 'Uitgebreide editor uitschakelen binnen de hoofdnaamruimte',
187 - 'tog-riched_disable_ns_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Talk}}"',
188 - 'tog-riched_disable_ns_user' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User}}"',
189 - 'tog-riched_disable_ns_user_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User_talk}}"',
190 - 'tog-riched_disable_ns_project' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project}}"',
191 - 'tog-riched_disable_ns_project_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project_talk}}"',
192 - 'tog-riched_disable_ns_image' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image}}"',
193 - 'tog-riched_disable_ns_image_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image_talk}}"',
194 - 'tog-riched_disable_ns_mediawiki' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki}}"',
195 - 'tog-riched_disable_ns_mediawiki_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki_talk}}"',
196 - 'tog-riched_disable_ns_template' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template}}"',
197 - 'tog-riched_disable_ns_template_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template_talk}}"',
198 - 'tog-riched_disable_ns_help' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help}}"',
199 - 'tog-riched_disable_ns_help_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help_talk}}"',
200 - 'tog-riched_disable_ns_category' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category}}"',
201 - 'tog-riched_disable_ns_category_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category_talk}}"',
202 -);
203 -
204 -/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
205 - * @author Jon Harald Søby
206 - * @author Lejonel
207 - */
208 -$messages['no'] = array(
209 - 'textrichditor' => 'Rik tekstredigering',
210 - 'textrichditor-desc' => 'Bruk FCKeditor for å redigere wikisider',
211 - 'tog-riched_disable' => 'Slå av rik tekstredigering',
212 - 'tog-riched_disable_ns_main' => 'Slå av rik tekstredigering i hovednavnerommet',
213 - 'tog-riched_disable_ns_talk' => 'Slå av rik tekstredigering i «{{ns:Talk}}»-navnerommet',
214 - 'tog-riched_disable_ns_user' => 'Slå av rik tekstredigering i «{{ns:User}}»-navnerommet',
215 - 'tog-riched_disable_ns_user_talk' => 'Slå av rik tekstredigering i «{{ns:User_talk}}»-navnerommet',
216 - 'tog-riched_disable_ns_project' => 'Slå av rik tekstredigering i «{{ns:Project}}»-navnerommet',
217 - 'tog-riched_disable_ns_project_talk' => 'Slå av rik tekstredigering i «{{ns:Project_talk}}»-navnerommet',
218 - 'tog-riched_disable_ns_image' => 'Slå av rik tekstredigering i «{{ns:Image}}»-navnerommet',
219 - 'tog-riched_disable_ns_image_talk' => 'Slå av rik tekstredigering i «{{ns:Image_talk}}»-navnerommet',
220 - 'tog-riched_disable_ns_mediawiki' => 'Slå av rik tekstbehandler i navnerommet «{{ns:MediaWiki}}»',
221 - 'tog-riched_disable_ns_mediawiki_talk' => 'Slå av rik tekstbehandler i navnerommet «{{ns:MediaWiki_talk}}»',
222 - 'tog-riched_disable_ns_template' => 'Slå av rik tekstredigering i «{{ns:Template}}»-navnerommet',
223 - 'tog-riched_disable_ns_template_talk' => 'Slå av rik tekstredigering i «{{ns:Template_talk}}»-navnerommet',
224 - 'tog-riched_disable_ns_help' => 'Slå av rik tekstredigering i «{{ns:Help}}»-navnerommet',
225 - 'tog-riched_disable_ns_help_talk' => 'Slå av rik tekstredigering i «{{ns:Help_talk}}»-navnerommet',
226 - 'tog-riched_disable_ns_category' => 'Slå av rik tekstredigering i «{{ns:Category}}»-navnerommet',
227 - 'tog-riched_disable_ns_category_talk' => 'Slå av rik tekstredigering i «{{ns:Category_talk}}»-navnerommet',
228 -);
229 -
230 -/** Occitan (Occitan)
231 - * @author Cedric31
232 - */
233 -$messages['oc'] = array(
234 - 'textrichditor' => "''Rich Editor''",
235 - 'textrichditor-desc' => "Utiliza FCKeditor per l'edicion de las paginas wiki",
236 - 'tog-riched_disable' => "Desactivar ''Rich Editor''",
237 - 'tog-riched_disable_ns_main' => "Desactivar ''Rich Editor'' dins l'espaci de noms principal.",
238 - 'tog-riched_disable_ns_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Talk}}''.",
239 - 'tog-riched_disable_ns_user' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:User}}''.",
240 - 'tog-riched_disable_ns_user_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:User_talk}}''.",
241 - 'tog-riched_disable_ns_project' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Project}}''.",
242 - 'tog-riched_disable_ns_project_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Project_talk}}''.",
243 - 'tog-riched_disable_ns_image' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image}}''.",
244 - 'tog-riched_disable_ns_image_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image_talk}}''.",
245 - 'tog-riched_disable_ns_mediawiki' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image_talk}}''.",
246 - 'tog-riched_disable_ns_mediawiki_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:MediaWiki_talk}}''.",
247 - 'tog-riched_disable_ns_template' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Template}}''.",
248 - 'tog-riched_disable_ns_template_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Template_talk}}''.",
249 - 'tog-riched_disable_ns_help' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Help}}''.",
250 - 'tog-riched_disable_ns_help_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Help_talk}}''.",
251 - 'tog-riched_disable_ns_category' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Category}}''.",
252 - 'tog-riched_disable_ns_category_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Category_talk}}''.",
253 -);
254 -
255 -$messages['pl'] = array(
256 - 'textrichditor' => 'Rich Editor',
257 - 'tog-riched_disable' => 'Wyłącz Rich Editora',
258 - 'tog-riched_disable_ns_main' => 'Wyłącz Rich Editora wewątrz głównej przestrzeni nazw',
259 - 'tog-riched_disable_ns_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Talk}}"',
260 - 'tog-riched_disable_ns_user' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User}}"',
261 - 'tog-riched_disable_ns_user_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User_talk}}"',
262 - 'tog-riched_disable_ns_project' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project}}"',
263 - 'tog-riched_disable_ns_project_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project_talk}}"',
264 - 'tog-riched_disable_ns_image' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image}}"',
265 - 'tog-riched_disable_ns_image_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image_talk}}"',
266 - 'tog-riched_disable_ns_mediawiki' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki}}"',
267 - 'tog-riched_disable_ns_mediawiki_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki_talk}}"',
268 - 'tog-riched_disable_ns_template' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template}}"',
269 - 'tog-riched_disable_ns_template_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template_talk}}"',
270 - 'tog-riched_disable_ns_help' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help}}"',
271 - 'tog-riched_disable_ns_help_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help_talk}}"',
272 - 'tog-riched_disable_ns_category' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category}}"',
273 - 'tog-riched_disable_ns_category_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category_talk}}"',
274 -);
275 -
276 -$messages['pms'] = array(
277 - 'textrichditor' => 'Editor svicio',
278 - 'tog-riched_disable' => 'Disabilité l\'editor svicio',
279 - 'tog-riched_disable_ns_main' => 'Disabilité l\'editor svicio ant lë spassi nominal prinsipal',
280 - 'tog-riched_disable_ns_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Talk}}"',
281 - 'tog-riched_disable_ns_user' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User}}"',
282 - 'tog-riched_disable_ns_user_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User_talk}}"',
283 - 'tog-riched_disable_ns_project' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project}}"',
284 - 'tog-riched_disable_ns_project_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project_talk}}"',
285 - 'tog-riched_disable_ns_image' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image}}"',
286 - 'tog-riched_disable_ns_image_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image_talk}}"',
287 - 'tog-riched_disable_ns_mediawiki' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki}}"',
288 - 'tog-riched_disable_ns_mediawiki_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki_talk}}"',
289 - 'tog-riched_disable_ns_template' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template}}"',
290 - 'tog-riched_disable_ns_template_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template_talk}}"',
291 - 'tog-riched_disable_ns_help' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help}}"',
292 - 'tog-riched_disable_ns_help_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help_talk}}"',
293 - 'tog-riched_disable_ns_category' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category}}"',
294 - 'tog-riched_disable_ns_category_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category_talk}}"',
295 -);
296 -
297 -/** Portuguese (Português)
298 - * @author Malafaya
299 - */
300 -$messages['pt'] = array(
301 - 'textrichditor' => 'Editor Rico',
302 - 'textrichditor-desc' => 'Use o FCKeditor para editar páginas wiki',
303 - 'tog-riched_disable' => 'Desactivar editor rico',
304 - 'tog-riched_disable_ns_main' => 'Desactivar editor rico no espaço nominal principal',
305 - 'tog-riched_disable_ns_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Talk}}"',
306 - 'tog-riched_disable_ns_user' => 'Desactivar editor rico no espaço nominal "{{ns:User}}"',
307 - 'tog-riched_disable_ns_user_talk' => 'Desactivar editor rico no espaço nominal "{{ns:User_talk}}"',
308 - 'tog-riched_disable_ns_project' => 'Desactivar editor rico no espaço nominal "{{ns:Project}}"',
309 - 'tog-riched_disable_ns_project_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Project_talk}}"',
310 - 'tog-riched_disable_ns_image' => 'Desactivar editor rico no espaço nominal "{{ns:Image}}"',
311 - 'tog-riched_disable_ns_image_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Image_talk}}"',
312 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki}}"',
313 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki_talk}}"',
314 - 'tog-riched_disable_ns_template' => 'Desactivar editor rico no espaço nominal "{{ns:Template}}"',
315 - 'tog-riched_disable_ns_template_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Template_talk}}"',
316 - 'tog-riched_disable_ns_help' => 'Desactivar editor rico no espaço nominal "{{ns:Help}}"',
317 - 'tog-riched_disable_ns_help_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Help_talk}}"',
318 - 'tog-riched_disable_ns_category' => 'Desactivar editor rico no espaço nominal "{{ns:Category}}"',
319 - 'tog-riched_disable_ns_category_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Category_talk}}"',
320 -);
321 -
322 -/** Russian (Русский)
323 - * @author .:Ajvol:.
324 - */
325 -$messages['ru'] = array(
326 - 'textrichditor' => 'Визуальный редактор',
327 - 'textrichditor-desc' => 'Использование FCKeditor для редактирования вики-страниц',
328 - 'tog-riched_disable' => 'Отключить визуальный редактор',
329 - 'tog-riched_disable_ns_main' => 'Отключить визуальный редактор в главном пространстве имён',
330 - 'tog-riched_disable_ns_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Talk}}»',
331 - 'tog-riched_disable_ns_user' => 'Отключить визуальный редактор в пространстве имён «{{ns:User}}»',
332 - 'tog-riched_disable_ns_user_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:User_talk}}»',
333 - 'tog-riched_disable_ns_project' => 'Отключить визуальный редактор в пространстве имён «{{ns:Project}}»',
334 - 'tog-riched_disable_ns_project_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Project_talk}}»',
335 - 'tog-riched_disable_ns_image' => 'Отключить визуальный редактор в пространстве имён «{{ns:Image}}»',
336 - 'tog-riched_disable_ns_image_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Image_talk}}»',
337 - 'tog-riched_disable_ns_mediawiki' => 'Отключить визуальный редактор в пространстве имён «{{ns:MediaWiki}}»',
338 - 'tog-riched_disable_ns_mediawiki_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:MediaWiki_talk}}»',
339 - 'tog-riched_disable_ns_template' => 'Отключить визуальный редактор в пространстве имён «{{ns:Template}}»',
340 - 'tog-riched_disable_ns_template_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Template_talk}}»',
341 - 'tog-riched_disable_ns_help' => 'Отключить визуальный редактор в пространстве имён «{{ns:Help}}»',
342 - 'tog-riched_disable_ns_help_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Help_talk}}»',
343 - 'tog-riched_disable_ns_category' => 'Отключить визуальный редактор в пространстве имён «{{ns:Category}}»',
344 - 'tog-riched_disable_ns_category_talk' => 'Отключить визуальный редактор в пространстве имён «{{ns:Category_talk}}»',
345 -);
346 -
347 -/** Slovak (Slovenčina)
348 - * @author Helix84
349 - */
350 -$messages['sk'] = array(
351 - 'textrichditor' => 'Editor formátovaného textu',
352 - 'textrichditor-desc' => 'Použiť na úpravu wiki stránok FCKeditor',
353 - 'tog-riched_disable' => 'Vypnúť editor formátovaného textu',
354 - 'tog-riched_disable_ns_main' => 'Vypnúť editor formátovaného textu v hlavnom mennom priestore',
355 - 'tog-riched_disable_ns_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Talk}}“',
356 - 'tog-riched_disable_ns_user' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User}}“',
357 - 'tog-riched_disable_ns_user_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User_talk}}“',
358 - 'tog-riched_disable_ns_project' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project}}“',
359 - 'tog-riched_disable_ns_project_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project_talk}}“',
360 - 'tog-riched_disable_ns_image' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image}}“',
361 - 'tog-riched_disable_ns_image_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image_talk}}“',
362 - 'tog-riched_disable_ns_mediawiki' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki}}“',
363 - 'tog-riched_disable_ns_mediawiki_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki_talk}}“',
364 - 'tog-riched_disable_ns_template' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template}}“',
365 - 'tog-riched_disable_ns_template_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template_talk}}“',
366 - 'tog-riched_disable_ns_help' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help}}“',
367 - 'tog-riched_disable_ns_help_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help_talk}}“',
368 - 'tog-riched_disable_ns_category' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category}}“',
369 - 'tog-riched_disable_ns_category_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category_talk}}“',
370 -);
371 -
372 -/** Swedish (Svenska)
373 - * @author Lejonel
374 - * @author M.M.S.
375 - */
376 -$messages['sv'] = array(
377 - 'textrichditor' => 'Rik textredigering',
378 - 'textrichditor-desc' => 'Använder FCKeditor för att redigera wiki-sidor',
379 - 'tog-riched_disable' => 'Slå av rik textredigering',
380 - 'tog-riched_disable_ns_main' => 'Slå av rik textredigering i huvudnamnrymden',
381 - 'tog-riched_disable_ns_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Talk}}"',
382 - 'tog-riched_disable_ns_user' => 'Slå av rik textredigering i namnrymden "{{ns:User}}"',
383 - 'tog-riched_disable_ns_user_talk' => 'Slå av rik textredigering i namnrymden "{{ns:User_talk}}"',
384 - 'tog-riched_disable_ns_project' => 'Slå av rik textredigering i namnrymden "{{ns:Project}}"',
385 - 'tog-riched_disable_ns_project_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Project_talk}}"',
386 - 'tog-riched_disable_ns_image' => 'Slå av rik textredigering i namnrymden "{{ns:Image}}"',
387 - 'tog-riched_disable_ns_image_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Image_talk}}"',
388 - 'tog-riched_disable_ns_mediawiki' => 'Slå av rik textredigering i namnrymden "{{ns:MediaWiki}}"',
389 - 'tog-riched_disable_ns_mediawiki_talk' => 'Slå av rik textredigering i namnrymden "{{ns:MediaWiki_talk}}"',
390 - 'tog-riched_disable_ns_template' => 'Slå av rik textredigering i namnrymden "{{ns:Template}}"',
391 - 'tog-riched_disable_ns_template_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Template_talk}}"',
392 - 'tog-riched_disable_ns_help' => 'Slå av rik textredigering i namnrymden "{{ns:Help}}"',
393 - 'tog-riched_disable_ns_help_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Help_talk}}"',
394 - 'tog-riched_disable_ns_category' => 'Slå av rik textredigering i namnrymden "{{ns:Category}}"',
395 - 'tog-riched_disable_ns_category_talk' => 'Slå av rik textredigering i namnrymden "{{ns:Category_talk}}"',
396 -);
397 -
398 -/** Telugu (తెలుగు)
399 - * @author Veeven
400 - */
401 -$messages['te'] = array(
402 - 'textrichditor' => 'సిరి కూర్పరి',
403 - 'tog-riched_disable' => 'సిరి కూర్పరిని అచేతనం చేయండి',
404 -);
405 -
406 -/** Vietnamese (Tiếng Việt)
407 - * @author Minh Nguyen
408 - */
409 -$messages['vi'] = array(
410 - 'textrichditor-desc' => 'Dùng FCKeditor để sửa đổi trang wiki',
411 -);
412 -
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.oc.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => '\'\'Rich Editor\'\'',
 6+ 'tog-riched_disable' => 'Desactivar \'\'Rich Editor\'\'',
 7+ 'tog-riched_disable_ns_main' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms principal.',
 8+ 'tog-riched_disable_ns_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Talk}}\'\'.',
 9+ 'tog-riched_disable_ns_user' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:User}}\'\'.',
 10+ 'tog-riched_disable_ns_user_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:User_talk}}\'\'.',
 11+ 'tog-riched_disable_ns_project' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Project}}\'\'.',
 12+ 'tog-riched_disable_ns_project_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Project_talk}}\'\'.',
 13+ 'tog-riched_disable_ns_image' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image}}\'\'.',
 14+ 'tog-riched_disable_ns_image_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image_talk}}\'\'.',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image_talk}}\'\'.',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:MediaWiki_talk}}\'\'.',
 17+ 'tog-riched_disable_ns_template' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Template}}\'\'.',
 18+ 'tog-riched_disable_ns_template_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Template_talk}}\'\'.',
 19+ 'tog-riched_disable_ns_help' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Help}}\'\'.',
 20+ 'tog-riched_disable_ns_help_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Help_talk}}\'\'.',
 21+ 'tog-riched_disable_ns_category' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Category}}\'\'.',
 22+ 'tog-riched_disable_ns_category_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Category_talk}}\'\'.',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.oc.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.gl.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => 'Editor Rico',
 6+ 'tog-riched_disable' => 'Desactivar o editor rico',
 7+ 'tog-riched_disable_ns_main' => 'Desactivar o editor rico no espazo de nomes principal',
 8+ 'tog-riched_disable_ns_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Talk}}"',
 9+ 'tog-riched_disable_ns_user' => 'Desactivar o editor rico no espazo de nomes "{{ns:User}}"',
 10+ 'tog-riched_disable_ns_user_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:User_Talk}}"',
 11+ 'tog-riched_disable_ns_project' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project}}"',
 12+ 'tog-riched_disable_ns_project_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project_Talk}}"',
 13+ 'tog-riched_disable_ns_image' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image}}"',
 14+ 'tog-riched_disable_ns_image_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image_talk}}"',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki}}"',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki_talk}}"',
 17+ 'tog-riched_disable_ns_template' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template}}"',
 18+ 'tog-riched_disable_ns_template_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template_talk}}"',
 19+ 'tog-riched_disable_ns_help' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help}}"',
 20+ 'tog-riched_disable_ns_help_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help_talk}}"',
 21+ 'tog-riched_disable_ns_category' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category}}"',
 22+ 'tog-riched_disable_ns_category_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category_talk}}"',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.gl.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.en.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+'textrichditor' => 'Rich Editor',
 6+'tog-riched_disable' => 'Disable rich editor',
 7+'tog-riched_disable_ns_main' => 'Disable rich editor within the main namespace',
 8+'tog-riched_disable_ns_talk' => 'Disable rich editor within the "{{ns:Talk}}" namespace',
 9+'tog-riched_disable_ns_user' => 'Disable rich editor within the "{{ns:User}}" namespace',
 10+'tog-riched_disable_ns_user_talk' => 'Disable rich editor within the "{{ns:User_talk}}" namespace',
 11+'tog-riched_disable_ns_project' => 'Disable rich editor within the "{{ns:Project}}" namespace',
 12+'tog-riched_disable_ns_project_talk' => 'Disable rich editor within the "{{ns:Project_talk}}" namespace',
 13+'tog-riched_disable_ns_image' => 'Disable rich editor within the "{{ns:Image}}" namespace',
 14+'tog-riched_disable_ns_image_talk' => 'Disable rich editor within the "{{ns:Image_talk}}" namespace',
 15+'tog-riched_disable_ns_mediawiki' => 'Disable rich editor within the "{{ns:MediaWiki}}" namespace',
 16+'tog-riched_disable_ns_mediawiki_talk' => 'Disable rich editor within the "{{ns:MediaWiki_talk}}" namespace',
 17+'tog-riched_disable_ns_template' => 'Disable rich editor within the "{{ns:Template}}" namespace',
 18+'tog-riched_disable_ns_template_talk' => 'Disable rich editor within the "{{ns:Template_talk}}" namespace',
 19+'tog-riched_disable_ns_help' => 'Disable rich editor within the "{{ns:Help}}" namespace',
 20+'tog-riched_disable_ns_help_talk' => 'Disable rich editor within the "{{ns:Help_talk}}" namespace',
 21+'tog-riched_disable_ns_category' => 'Disable rich editor within the "{{ns:Category}}" namespace',
 22+'tog-riched_disable_ns_category_talk' => 'Disable rich editor within the "{{ns:Category_talk}}" namespace',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.en.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.ar.php
@@ -0,0 +1,21 @@
 2+<?php
 3+$messages = array(
 4+ 'textrichditor' => 'محرر متقدم',
 5+ 'tog-riched_disable' => 'عطل المحرر المتقدم',
 6+ 'tog-riched_disable_ns_main' => 'عطل المحرر المتقدم في النطاق الرئيسي',
 7+ 'tog-riched_disable_ns_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Talk}}"',
 8+ 'tog-riched_disable_ns_user' => 'عطل المحرر المتقدم في نطاق "{{ns:User}}"',
 9+ 'tog-riched_disable_ns_user_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:User_talk}}"',
 10+ 'tog-riched_disable_ns_project' => 'عطل المحرر المتقدم في نطاق "{{ns:Project}}"',
 11+ 'tog-riched_disable_ns_project_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Project_talk}}"',
 12+ 'tog-riched_disable_ns_image' => 'عطل المحرر المتقدم في نطاق "{{ns:Image}}"',
 13+ 'tog-riched_disable_ns_image_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Image_talk}}"',
 14+ 'tog-riched_disable_ns_mediawiki' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki}}"',
 15+ 'tog-riched_disable_ns_mediawiki_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki_talk}}"',
 16+ 'tog-riched_disable_ns_template' => 'عطل المحرر المتقدم في نطاق "{{ns:Template}}"',
 17+ 'tog-riched_disable_ns_template_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Template_talk}}"',
 18+ 'tog-riched_disable_ns_help' => 'عطل المحرر المتقدم في نطاق "{{ns:Help}}"',
 19+ 'tog-riched_disable_ns_help_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Help_talk}}"',
 20+ 'tog-riched_disable_ns_category' => 'عطل المحرر المتقدم في نطاق "{{ns:Category}}"',
 21+ 'tog-riched_disable_ns_category_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Category_talk}}"',
 22+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.ar.php
___________________________________________________________________
Added: svn:eol-style
123 + native
Index: trunk/extensions/FCKeditor/FCKeditorSkin.body.php
@@ -2,11 +2,11 @@
33
44 class FCKeditorSkin
55 {
6 - private $skin;
 6+ private $skin;
77
8 - /**
9 - * Create image link in MediaWiki 1.10
10 - *
 8+ /**
 9+ * Create image link in MediaWiki 1.10
 10+ *
1111 * @param Title $nt
1212 * @param string $label label text
1313 * @param string $alt alt text
@@ -16,265 +16,275 @@
1717 * @param boolean $thumb shows image as thumbnail in a frame
1818 * @param string $manual_thumb image name for the manual thumbnail
1919 * @param string $valign vertical alignment: baseline, sub, super, top, text-top, middle, bottom, text-bottom
20 - * @return string *
21 - */
22 - function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false,
23 - $thumb = false, $manual_thumb = '', $valign = '' )
24 - {
25 - $orginal = $nt->getText();
26 - $img = new Image( $nt );
27 - $imgName = $img->getName();
28 - $found = $img->getURL();
 20+ * @return string *
 21+ */
 22+ function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false,
 23+ $thumb = false, $manual_thumb = '', $valign = '' )
 24+ {
 25+ $orginal = $nt->getText();
 26+ $img = new Image( $nt );
 27+ $imgName = $img->getName();
 28+ $found = $img->getURL();
2929
30 - if ($found) {
31 - //trick to get real Url for image:
32 - $originalLink = strip_tags(Linker::makeImageLinkObj($nt, $label, $alt, $align , $params , $framed , $thumb , $manual_thumb , $valign ), "<img>");
33 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
34 - $url = strtok($srcPart, '"');
35 - }
 30+ if ($found) {
 31+ //trick to get real Url for image:
 32+ $originalLink = strip_tags(Linker::makeImageLinkObj($nt, $label, $alt, $align , $params , $framed , $thumb , $manual_thumb , $valign ), "<img>");
 33+ $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
 34+ $url = strtok($srcPart, '"');
 35+ }
3636
37 - $ret = "<img ";
 37+ $ret = "<img ";
3838
39 - if ($found) {
40 - $ret .= "src=\"{$url}\" ";
41 - }
42 - else {
43 - $ret .= "_fck_mw_valid=\"false"."\" ";
44 - }
45 - $ret .= "_fck_mw_filename=\"{$orginal}\" ";
 39+ if ($found) {
 40+ $ret .= "src=\"{$url}\" ";
 41+ }
 42+ else {
 43+ $ret .= "_fck_mw_valid=\"false"."\" ";
 44+ }
 45+ $ret .= "_fck_mw_filename=\"{$orginal}\" ";
4646
47 - if ($align) {
48 - $ret .= "_fck_mw_location=\"".strtolower($align)."\" ";
49 - }
50 - if (!empty($params)) {
51 - if (isset($params['width'])) {
52 - $ret .= "_fck_mw_width=\"".$params['width']."\" ";
53 - }
54 - if (isset($params['height'])) {
55 - $ret .= "_fck_mw_height=\"".$params['height']."\" ";
56 - }
57 - }
58 - $class = "";
59 - if ($thumb) {
60 - $ret .= "_fck_mw_type=\"thumb"."\" ";
61 - $class .= "fck_mw_frame";
62 - }
63 - else if ($framed) {
64 - $ret .= "_fck_mw_type=\"frame"."\" ";
65 - $class .= "fck_mw_frame";
66 - }
 47+ if ($align) {
 48+ $ret .= "_fck_mw_location=\"".strtolower($align)."\" ";
 49+ }
 50+ if (!empty($params)) {
 51+ if (isset($params['width'])) {
 52+ $ret .= "_fck_mw_width=\"".$params['width']."\" ";
 53+ }
 54+ if (isset($params['height'])) {
 55+ $ret .= "_fck_mw_height=\"".$params['height']."\" ";
 56+ }
 57+ }
 58+ $class = "";
 59+ if ($thumb) {
 60+ $ret .= "_fck_mw_type=\"thumb"."\" ";
 61+ $class .= "fck_mw_frame";
 62+ }
 63+ else if ($framed) {
 64+ $ret .= "_fck_mw_type=\"frame"."\" ";
 65+ $class .= "fck_mw_frame";
 66+ }
6767
68 - if ($align == "right") {
69 - $class .= ($class?" ":"") . "fck_mw_right";
70 - }
71 - else if($align == "center") {
72 - $class .= ($class?" ":"") . "fck_mw_center";
73 - }
74 - else if($align == "left") {
75 - $class .= ($class?" ":"") . "fck_mw_left";
76 - }
77 - else if($framed || $thumb) {
78 - $class .= ($class?" ":"") . "fck_mw_right";
79 - }
 68+ if ($align == "right") {
 69+ $class .= ($class?" ":"") . "fck_mw_right";
 70+ }
 71+ else if($align == "center") {
 72+ $class .= ($class?" ":"") . "fck_mw_center";
 73+ }
 74+ else if($align == "left") {
 75+ $class .= ($class?" ":"") . "fck_mw_left";
 76+ }
 77+ else if($framed || $thumb) {
 78+ $class .= ($class?" ":"") . "fck_mw_right";
 79+ }
8080
81 - if (!$found) {
82 - $class .= ($class?" ":"") . "fck_mw_notfound";
83 - }
 81+ if (!$found) {
 82+ $class .= ($class?" ":"") . "fck_mw_notfound";
 83+ }
8484
85 - if (!is_null($alt) && !empty($alt) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $alt) && $alt != "Image:" . $orginal) {
86 - $ret .= "alt=\"".htmlspecialchars($alt)."\" ";
87 - }
88 - else {
89 - $ret .= "alt=\"\" ";
90 - }
 85+ if (!is_null($alt) && !empty($alt) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $alt) && $alt != "Image:" . $orginal) {
 86+ $ret .= "alt=\"".htmlspecialchars($alt)."\" ";
 87+ }
 88+ else {
 89+ $ret .= "alt=\"\" ";
 90+ }
9191
92 - if ($class) {
93 - $ret .= "class=\"$class\" ";
94 - }
 92+ if ($class) {
 93+ $ret .= "class=\"$class\" ";
 94+ }
9595
96 - $ret .= "/>";
 96+ $ret .= "/>";
9797
98 - return $ret;
99 - }
 98+ return $ret;
 99+ }
100100
101 - /**
 101+ /**
102102 * Make an image link in Mediawiki 1.11
103103 * @param Title $title Title object
104104 * @param File $file File object, or false if it doesn't exist
105105 *
106 - * @param array $frameParams Associative array of parameters external to the media handler.
107 - * Boolean parameters are indicated by presence or absence, the value is arbitrary and
108 - * will often be false.
109 - * thumbnail If present, downscale and frame
110 - * manualthumb Image name to use as a thumbnail, instead of automatic scaling
111 - * framed Shows image in original size in a frame
112 - * frameless Downscale but don't frame
113 - * upright If present, tweak default sizes for portrait orientation
114 - * upright_factor Fudge factor for "upright" tweak (default 0.75)
115 - * border If present, show a border around the image
116 - * align Horizontal alignment (left, right, center, none)
117 - * valign Vertical alignment (baseline, sub, super, top, text-top, middle,
118 - * bottom, text-bottom)
119 - * alt Alternate text for image (i.e. alt attribute). Plain text.
120 - * caption HTML for image caption.
 106+ * @param array $frameParams Associative array of parameters external to the media handler.
 107+ * Boolean parameters are indicated by presence or absence, the value is arbitrary and
 108+ * will often be false.
 109+ * thumbnail If present, downscale and frame
 110+ * manualthumb Image name to use as a thumbnail, instead of automatic scaling
 111+ * framed Shows image in original size in a frame
 112+ * frameless Downscale but don't frame
 113+ * upright If present, tweak default sizes for portrait orientation
 114+ * upright_factor Fudge factor for "upright" tweak (default 0.75)
 115+ * border If present, show a border around the image
 116+ * align Horizontal alignment (left, right, center, none)
 117+ * valign Vertical alignment (baseline, sub, super, top, text-top, middle,
 118+ * bottom, text-bottom)
 119+ * alt Alternate text for image (i.e. alt attribute). Plain text.
 120+ * caption HTML for image caption.
121121 *
122 - * @param array $handlerParams Associative array of media handler parameters, to be passed
123 - * to transform(). Typical keys are "width" and "page".
 122+ * @param array $handlerParams Associative array of media handler parameters, to be passed
 123+ * to transform(). Typical keys are "width" and "page".
124124 */
125 - function makeImageLink2( Title $nt, $file, $frameParams = array(), $handlerParams = array() ) {
126 - $orginal = $nt->getText();
127 - $img = new Image( $nt );
128 - $imgName = $img->getName();
129 - $found = $img->getURL();
 125+ function makeImageLink2( Title $nt, $file, $frameParams = array(), $handlerParams = array() ) {
 126+ $orginal = $nt->getText();
 127+ $img = new Image( $nt );
 128+ $imgName = $img->getName();
 129+ $found = $img->getURL();
130130
131 - if ($found) {
132 - $originalLink = Linker::makeImageLink2( $nt, $file, $frameParams, $handlerParams);
 131+ if ($found) {
 132+ $linker = new Linker();
 133+ $originalLink = $linker->makeImageLink2( $nt, $file, $frameParams, $handlerParams);
133134
134 - if (false !== strpos($originalLink, "src=\"")) {
135 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
136 - $url = strtok($srcPart, '"');
137 - }
138 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
139 - $url = strtok($srcPart, '"');
140 - }
 135+ if (false !== strpos($originalLink, "src=\"")) {
 136+ $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
 137+ $url = strtok($srcPart, '"');
 138+ }
 139+ $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
 140+ $url = strtok($srcPart, '"');
 141+ }
141142
142 - // Shortcuts
143 - $fp =& $frameParams;
144 - $hp =& $handlerParams;
 143+ // Shortcuts
 144+ $fp =& $frameParams;
 145+ $hp =& $handlerParams;
145146
146 - if (!isset($fp['align'])) {
147 - $fp['align'] = '';
148 - }
 147+ if (!isset($fp['align'])) {
 148+ $fp['align'] = '';
 149+ }
149150
150 - $ret = "<img ";
 151+ $ret = "<img ";
151152
152 - if ($found) {
153 - $ret .= "src=\"{$url}\" ";
154 - }
155 - else {
156 - $ret .= "_fck_mw_valid=\"false"."\" ";
157 - }
158 - $ret .= "_fck_mw_filename=\"{$orginal}\" ";
 153+ if ($found) {
 154+ $ret .= "src=\"{$url}\" ";
 155+ }
 156+ else {
 157+ $ret .= "_fck_mw_valid=\"false"."\" ";
 158+ }
 159+ $ret .= "_fck_mw_filename=\"{$orginal}\" ";
159160
160 - if ($fp['align']) {
161 - $ret .= "_fck_mw_location=\"".strtolower($fp['align'])."\" ";
162 - }
163 - if (!empty($hp)) {
164 - if (isset($hp['width'])) {
165 - $ret .= "_fck_mw_width=\"".$hp['width']."\" ";
166 - }
167 - if (isset($hp['height'])) {
168 - $ret .= "_fck_mw_height=\"".$hp['height']."\" ";
169 - }
170 - }
171 - $class = "";
172 - if (isset($fp['thumbnail'])) {
173 - $ret .= "_fck_mw_type=\"thumb"."\" ";
174 - $class .= "fck_mw_frame";
175 - }
176 - else if (isset($fp['framed'])) {
177 - $ret .= "_fck_mw_type=\"frame"."\" ";
178 - $class .= "fck_mw_frame";
179 - }
 161+ if ($fp['align']) {
 162+ $ret .= "_fck_mw_location=\"".strtolower($fp['align'])."\" ";
 163+ }
 164+ if (!empty($hp)) {
 165+ if (isset($hp['width'])) {
 166+ $ret .= "_fck_mw_width=\"".$hp['width']."\" ";
 167+ }
 168+ if (isset($hp['height'])) {
 169+ $ret .= "_fck_mw_height=\"".$hp['height']."\" ";
 170+ }
 171+ }
 172+ $class = "";
 173+ if (isset($fp['thumbnail'])) {
 174+ $ret .= "_fck_mw_type=\"thumb"."\" ";
 175+ $class .= "fck_mw_frame";
 176+ }
 177+ else if (isset($fp['border'])) {
 178+ $ret .= "_fck_mw_type=\"border"."\" ";
 179+ $class .= "fck_mw_border";
 180+ }
 181+ else if (isset($fp['framed'])) {
 182+ $ret .= "_fck_mw_type=\"frame"."\" ";
 183+ $class .= "fck_mw_frame";
 184+ }
180185
181 - if ($fp['align'] == "right") {
182 - $class .= ($class?" ":"") . "fck_mw_right";
183 - }
184 - else if($fp['align'] == "center") {
185 - $class .= ($class?" ":"") . "fck_mw_center";
186 - }
187 - else if($fp['align'] == "left") {
188 - $class .= ($class?" ":"") . "fck_mw_left";
189 - }
190 - else if(isset($fp['framed']) || isset($fp['thumbnail'])) {
191 - $class .= ($class?" ":"") . "fck_mw_right";
192 - }
 186+ if ($fp['align'] == "right") {
 187+ $class .= ($class?" ":"") . "fck_mw_right";
 188+ }
 189+ else if($fp['align'] == "center") {
 190+ $class .= ($class?" ":"") . "fck_mw_center";
 191+ }
 192+ else if($fp['align'] == "left") {
 193+ $class .= ($class?" ":"") . "fck_mw_left";
 194+ }
 195+ else if(isset($fp['framed']) || isset($fp['thumbnail'])) {
 196+ $class .= ($class?" ":"") . "fck_mw_right";
 197+ }
193198
194 - if (!$found) {
195 - $class .= ($class?" ":"") . "fck_mw_notfound";
196 - }
 199+ if (!$found) {
 200+ $class .= ($class?" ":"") . "fck_mw_notfound";
 201+ }
197202
198 - if (isset($fp['alt']) && !empty($fp['alt']) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $fp['alt']) && $fp['alt'] != "Image:" . $orginal) {
199 - $ret .= "alt=\"".htmlspecialchars($fp['alt'])."\" ";
200 - }
201 - else {
202 - $ret .= "alt=\"\" ";
203 - }
 203+ if (isset($fp['alt']) && !empty($fp['alt']) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $fp['alt']) && $fp['alt'] != "Image:" . $orginal) {
 204+ $ret .= "alt=\"".htmlspecialchars($fp['alt'])."\" ";
 205+ }
 206+ else {
 207+ $ret .= "alt=\"\" ";
 208+ }
204209
205 - if ($class) {
206 - $ret .= "class=\"$class\" ";
207 - }
 210+ if ($class) {
 211+ $ret .= "class=\"$class\" ";
 212+ }
208213
209 - $ret .= "/>";
 214+ $ret .= "/>";
210215
211 - return $ret;
212 - }
 216+ return $ret;
 217+ }
213218
214 - function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' )
215 - {
216 - $fname = 'FCKeditorSkin::makeKnownLinkObj';
217 - wfProfileIn( $fname );
 219+ function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' )
 220+ {
 221+ $fname = 'FCKeditorSkin::makeKnownLinkObj';
 222+ wfProfileIn( $fname );
218223
219 - if ( !is_object( $nt ) ) {
220 - wfProfileOut( $fname );
221 - return $text;
222 - }
 224+ if ( !is_object( $nt ) ) {
 225+ wfProfileOut( $fname );
 226+ return $text;
 227+ }
223228
224 - //$u = $nt->escapeLocalURL( $query );
225 - $u = $nt->getFullText();
 229+ //$u = $nt->escapeLocalURL( $query );
 230+ $u = $nt->getFullText();
226231
227 - if ( $nt->getFragment() != '' ) {
228 - if( $nt->getPrefixedDbkey() == '' ) {
229 - $u = '';
230 - if ( '' == $text ) {
231 - $text = htmlspecialchars( $nt->getFragment() );
232 - }
233 - }
234 - //see ticket 1386 why it is commented
235 - //$u .= $nt->getFragmentForURL();
236 - }
237 - if ( $text == '' ) {
238 - $text = htmlspecialchars( $nt->getPrefixedText() );
239 - }
 232+ if ( $nt->getFragment() != '' ) {
 233+ if( $nt->getPrefixedDbkey() == '' ) {
 234+ $u = '';
 235+ if ( '' == $text ) {
 236+ $text = htmlspecialchars( $nt->getFragment() );
 237+ }
 238+ }
 239+
 240+ /*
 241+ * See tickets 1386 and 1690 before changing anything
 242+ */
 243+ if( $nt->getPartialUrl() == '' ) {
 244+ $u .= $nt->getFragmentForURL();
 245+ }
 246+ }
 247+ if ( $text == '' ) {
 248+ $text = htmlspecialchars( $nt->getPrefixedText() );
 249+ }
240250
241 - if ($nt->getNamespace() == NS_CATEGORY) {
242 - $u = ':' . $u;
243 - }
 251+ if ($nt->getNamespace() == NS_CATEGORY) {
 252+ $u = ':' . $u;
 253+ }
244254
245 - list( $inside, $trail ) = Linker::splitTrail( $trail );
246 - $r = "<a href=\"{$u}\">{$prefix}{$text}{$inside}</a>{$trail}";
247 - wfProfileOut( $fname );
248 - return $r;
249 - }
 255+ list( $inside, $trail ) = Linker::splitTrail( $trail );
 256+ $r = "<a href=\"{$u}\">{$prefix}{$text}{$inside}</a>{$trail}";
 257+ wfProfileOut( $fname );
 258+ return $r;
 259+ }
250260
251 - function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' )
252 - {
253 - # Fail gracefully
254 - if ( ! isset($nt) ) {
255 - # throw new MWException();
256 - return "<!-- ERROR -->{$prefix}{$text}{$trail}";
257 - }
 261+ function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' )
 262+ {
 263+ # Fail gracefully
 264+ if ( ! isset($nt) ) {
 265+ # throw new MWException();
 266+ return "<!-- ERROR -->{$prefix}{$text}{$trail}";
 267+ }
258268
259 - $fname = 'FCKeditorSkin::makeBrokenLinkObj';
260 - wfProfileIn( $fname );
 269+ $fname = 'FCKeditorSkin::makeBrokenLinkObj';
 270+ wfProfileIn( $fname );
261271
262 - $u = $nt->getFullText();
 272+ $u = $nt->getFullText();
263273
264 - if ( '' == $text ) {
265 - $text = htmlspecialchars( $nt->getPrefixedText() );
266 - }
267 - if ($nt->getNamespace() == NS_CATEGORY) {
268 - $u = ':' . $u;
269 - }
 274+ if ( '' == $text ) {
 275+ $text = htmlspecialchars( $nt->getPrefixedText() );
 276+ }
 277+ if ($nt->getNamespace() == NS_CATEGORY) {
 278+ $u = ':' . $u;
 279+ }
270280
271 - list( $inside, $trail ) = Linker::splitTrail( $trail );
272 - $s = "<a href=\"{$u}\">{$prefix}{$text}{$inside}</a>{$trail}";
 281+ list( $inside, $trail ) = Linker::splitTrail( $trail );
 282+ $s = "<a href=\"{$u}\">{$prefix}{$text}{$inside}</a>{$trail}";
273283
274 - wfProfileOut( $fname );
275 - return $s;
276 - }
 284+ wfProfileOut( $fname );
 285+ return $s;
 286+ }
277287
278 - /**
 288+ /**
279289 * Create a direct link to a given uploaded file.
280290 *
281291 * @param $title Title object.
@@ -284,63 +294,63 @@
285295 * @public
286296 * @todo Handle invalid or missing images better.
287297 */
288 - function makeMediaLinkObj( $title, $text = '' ) {
289 - if( is_null( $title ) ) {
290 - ### HOTFIX. Instead of breaking, return empty string.
291 - return $text;
292 - } else {
293 - $orginal = $title->getPartialURL();
294 - // Mediawiki 1.11
295 - if ( function_exists('wfFindFile') ) {
296 - $img = wfFindFile( $title );
297 - if( $img ) {
298 - $url = $img->getURL();
299 - $class = 'internal';
300 - } else {
301 - $upload = SpecialPage::getTitleFor( 'Upload' );
302 - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDBkey() ) );
303 - $class = 'new';
304 - }
305 - }
306 - // Mediawiki 1.10
307 - else {
308 - $img = new Image( $title );
309 - if( $img->exists() ) {
310 - $url = $img->getURL();
311 - $class = 'internal';
312 - } else {
313 - $upload = SpecialPage::getTitleFor( 'Upload' );
314 - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $img->getName() ) );
315 - $class = 'new';
316 - }
317 - }
318 - $alt = htmlspecialchars( $title->getText() );
319 - if( $text == '' ) {
320 - $text = $alt;
321 - }
322 - $u = htmlspecialchars( $url );
323 - return "<a href=\"{$orginal}\" class=\"$class\" _fck_mw_filename=\"{$orginal}\" _fck_mw_type=\"media\" title=\"{$alt}\">{$text}</a>";
324 - }
325 - }
 298+ function makeMediaLinkObj( $title, $text = '' ) {
 299+ if( is_null( $title ) ) {
 300+ ### HOTFIX. Instead of breaking, return empty string.
 301+ return $text;
 302+ } else {
 303+ $orginal = $title->getPartialURL();
 304+ // Mediawiki 1.11
 305+ if ( function_exists('wfFindFile') ) {
 306+ $img = wfFindFile( $title );
 307+ if( $img ) {
 308+ $url = $img->getURL();
 309+ $class = 'internal';
 310+ } else {
 311+ $upload = SpecialPage::getTitleFor( 'Upload' );
 312+ $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDbKey() ) );
 313+ $class = 'new';
 314+ }
 315+ }
 316+ // Mediawiki 1.10
 317+ else {
 318+ $img = new Image( $title );
 319+ if( $img->exists() ) {
 320+ $url = $img->getURL();
 321+ $class = 'internal';
 322+ } else {
 323+ $upload = SpecialPage::getTitleFor( 'Upload' );
 324+ $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $img->getName() ) );
 325+ $class = 'new';
 326+ }
 327+ }
 328+ $alt = htmlspecialchars( $title->getText() );
 329+ if( $text == '' ) {
 330+ $text = $alt;
 331+ }
 332+ $u = htmlspecialchars( $url );
 333+ return "<a href=\"{$orginal}\" class=\"$class\" _fck_mw_filename=\"{$orginal}\" _fck_mw_type=\"media\" title=\"{$alt}\">{$text}</a>";
 334+ }
 335+ }
326336
327 - function makeExternalLink( $url, $text, $escape = true, $linktype = '', $ns = null ) {
328 - $url = htmlspecialchars( $url );
329 - if( $escape ) {
330 - $text = htmlspecialchars( $text );
331 - }
332 - if ($linktype == 'autonumber') {
333 - return '<a href="'.$url.'">[n]</a>';
334 - }
335 - return '<a href="'.$url.'">'.$text.'</a>';
336 - }
 337+ function makeExternalLink( $url, $text, $escape = true, $linktype = '', $ns = null ) {
 338+ $url = htmlspecialchars( $url );
 339+ if( $escape ) {
 340+ $text = htmlspecialchars( $text );
 341+ }
 342+ if ($linktype == 'autonumber') {
 343+ return '<a href="'.$url.'">[n]</a>';
 344+ }
 345+ return '<a href="'.$url.'">'.$text.'</a>';
 346+ }
337347
338 - function __call( $m, $a)
339 - {
340 - return call_user_func_array( array( $this->skin, $m ), $a );
341 - }
 348+ function __call( $m, $a)
 349+ {
 350+ return call_user_func_array( array( $this->skin, $m ), $a );
 351+ }
342352
343 - function __construct( &$skin )
344 - {
345 - $this->skin = $skin;
346 - }
 353+ function __construct( &$skin )
 354+ {
 355+ $this->skin = $skin;
 356+ }
347357 }
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/special.html
@@ -0,0 +1,223 @@
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 3+<!--
 4+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 5+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 6+ *
 7+ * == BEGIN LICENSE ==
 8+ *
 9+ * Licensed under the terms of any of the following licenses at your
 10+ * choice:
 11+ *
 12+ * - GNU General Public License Version 2 or later (the "GPL")
 13+ * http://www.gnu.org/licenses/gpl.html
 14+ *
 15+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 16+ * http://www.gnu.org/licenses/lgpl.html
 17+ *
 18+ * - Mozilla Public License Version 1.1 or later (the "MPL")
 19+ * http://www.mozilla.org/MPL/MPL-1.1.html
 20+ *
 21+ * == END LICENSE ==
 22+ *
 23+ * Link dialog window.
 24+-->
 25+<html>
 26+<head>
 27+ <title>Special Tag Properties</title>
 28+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 29+ <meta name="robots" content="noindex, nofollow" />
 30+ <script type="text/javascript">
 31+
 32+var oEditor = window.parent.InnerDialogLoaded() ;
 33+var FCK = oEditor.FCK ;
 34+var FCKLang = oEditor.FCKLang ;
 35+var FCKConfig = oEditor.FCKConfig ;
 36+var FCKRegexLib = oEditor.FCKRegexLib ;
 37+var FCKTools = oEditor.FCKTools ;
 38+
 39+document.write( '<script src="' + FCKConfig.BasePath + 'dialog/common/fck_dialog_common.js" type="text/javascript"><\/script>' ) ;
 40+
 41+ </script>
 42+ <script type="text/javascript">
 43+
 44+// Get the selected flash embed (if available).
 45+var oFakeImage = FCK.Selection.GetSelectedElement() ;
 46+var oTemplateSpan ;
 47+var sFakeClass = 'FCK__MWSpecial';
 48+var sSelectedTag = "";
 49+
 50+if ( oFakeImage )
 51+{
 52+ if ( oFakeImage.tagName == 'IMG' )
 53+ {
 54+ if ( oFakeImage.getAttribute('_fck_mw_special') )
 55+ {
 56+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 57+ sFakeClass = 'FCK__MWSpecial';
 58+ }
 59+ else if ( oFakeImage.getAttribute('_fck_mw_nowiki') )
 60+ {
 61+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 62+ sFakeClass = 'FCK__MWNowiki';
 63+ }
 64+ else if ( oFakeImage.getAttribute('_fck_mw_noinclude') )
 65+ {
 66+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 67+ sFakeClass = 'FCK__MWNoinclude';
 68+ }
 69+ else if ( oFakeImage.getAttribute('_fck_mw_gallery') )
 70+ {
 71+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 72+ sFakeClass = 'FCK__MWGallery';
 73+ }
 74+ else if ( oFakeImage.getAttribute('_fck_mw_onlyinclude') )
 75+ {
 76+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 77+ sFakeClass = 'FCK__MWOnlyinclude';
 78+ }
 79+ else if ( oFakeImage.getAttribute('_fck_mw_includeonly') )
 80+ {
 81+ oTemplateSpan = FCK.GetRealElement( oFakeImage ) ;
 82+ sFakeClass = 'FCK__MWIncludeonly';
 83+ }
 84+ else
 85+ oFakeImage = null ;
 86+ }
 87+ else
 88+ oFakeImage = null ;
 89+}
 90+
 91+window.onload = function()
 92+{
 93+ // Translate the dialog box texts.
 94+ oEditor.FCKLanguageManager.TranslatePage(document) ;
 95+
 96+ // Load the selected link information (if any).
 97+ LoadSelection() ;
 98+ LoadDocumentation();
 99+
 100+ // Activate the "OK" button.
 101+ window.parent.SetOkButton( true ) ;
 102+ window.parent.SetAutoSize( true ) ;
 103+}
 104+
 105+function LoadSearchResults( result )
 106+{
 107+ var results = result.responseText.Trim().split( '\n' ) ;
 108+ var select = GetE( 'xSelectTag' ) ;
 109+
 110+ if ( results.length > 0 && !( results.length == 1 && results[0].length == 0 ) )
 111+ {
 112+ for ( var i = 0 ; i < results.length ; i++ )
 113+ FCKTools.AddSelectOption( select, results[i], results[i] ) ;
 114+ }
 115+
 116+ if ( sSelectedTag ) {
 117+ select.value = sSelectedTag ;
 118+ }
 119+}
 120+
 121+
 122+function LoadSelection()
 123+{
 124+ // Make an Ajax search for the pages.
 125+ var empty = '';
 126+ oEditor.window.parent.sajax_request_type = 'GET' ;
 127+ oEditor.window.parent.sajax_do_call( 'wfSajaxSearchSpecialTagFCKeditor',[empty], LoadSearchResults ) ;
 128+
 129+ if ( !oTemplateSpan ) return ;
 130+
 131+ GetE('xTemplateRaw').value = FCKTools.HTMLDecode(oTemplateSpan.innerHTML).replace(/fckLR/g,'\r\n' ).replace( /&quot;/g, '"' ) ;
 132+ var tagName = oTemplateSpan.getAttribute('_fck_mw_tagname').toLowerCase();
 133+
 134+ sSelectedTag = tagName ;
 135+ GetE('xSelectTag').value = tagName;
 136+}
 137+
 138+function LoadDocumentation()
 139+{
 140+ var tagName = GetE('xSelectTag').value;
 141+ if (tagName == 'dpl')
 142+ GetE('xDefinition').innerHTML = 'DPL stands for Dynamic Page List, and allows to generate a formatted list of pages based on selection criteria. See <a href="#" onclick="javascript:window.open(\'http://semeb.com/dpldemo/index.php?title=Dynamic_Page_List\')">manual</a> for details';
 143+
 144+ if (tagName == 'inputbox')
 145+ GetE('xDefinition').innerHTML = 'Inputbox allows to create a form for users to create new pages. The new pages edit box can be pre-loaded with any template. See <a href="#" onclick="javascript:window.open(\'http://meta.wikimedia.org/wiki/Help:Inputbox\')">manual</a> for details';
 146+}
 147+
 148+//#### The OK button was hit.
 149+function Ok()
 150+{
 151+ if ( !oTemplateSpan )
 152+ {
 153+ oTemplateSpan = FCK.EditorDocument.createElement( 'SPAN' ) ;
 154+ oTemplateSpan.className = 'fck_mw_special' ;
 155+ SetAttribute( oTemplateSpan, '_fck_mw_customtag', 'true' ) ;
 156+ }
 157+
 158+ var templateData = FCKTools.HTMLEncode(GetE('xTemplateRaw').value.Trim().replace(/(\r\n|\n)/g, 'fckLR' )).replace( /"/g, '&quot;' ) ;
 159+
 160+ oTemplateSpan.innerHTML = templateData ;
 161+ SetAttribute( oTemplateSpan, '_fck_mw_tagname', GetE('xSelectTag').value ) ;
 162+
 163+ switch (GetE('xSelectTag').value)
 164+ {
 165+ case 'noinclude':
 166+ sFakeClass = 'FCK__MWNoinclude';
 167+ break;
 168+ case 'gallery':
 169+ sFakeClass = 'FCK__MWGallery';
 170+ break;
 171+ case 'nowiki':
 172+ sFakeClass = 'FCK__MWNowiki';
 173+ break;
 174+ case 'includeonly':
 175+ sFakeClass = 'FCK__MWIncludeonly';
 176+ break;
 177+ case 'onlyinclude':
 178+ sFakeClass = 'FCK__MWOnlyinclude';
 179+ break;
 180+ default:
 181+ sFakeClass = 'FCK__MWSpecial';
 182+ break;
 183+ }
 184+
 185+ if ( !oFakeImage )
 186+ {
 187+ oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( sFakeClass, oTemplateSpan ) ;
 188+ oFakeImage.setAttribute( '_fck_mw_special', 'true', 0 ) ;
 189+ oFakeImage = FCK.InsertElement( oFakeImage ) ;
 190+ }
 191+ else
 192+ oFakeImage.className = sFakeClass ;
 193+
 194+ return true ;
 195+}
 196+
 197+ </script>
 198+</head>
 199+<body style="overflow: hidden">
 200+ <div id="divInfo">
 201+ <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
 202+ <tr>
 203+ <td>
 204+ <span>Current Special Tag:</span>
 205+ <select id="xSelectTag" onchange="LoadDocumentation()">
 206+ </select><br>
 207+ <i><span id="xDefinition"></span></i>
 208+ </td>
 209+ </tr>
 210+ <tr>
 211+ <td>
 212+ <hr>
 213+ Special tag parameters:
 214+ </tr>
 215+ <tr>
 216+ <td height="100%">
 217+ <textarea id="xTemplateRaw" style="width: 100%; height: 100%; font-family: Monospace"
 218+ cols="50" rows="10" wrap="off"></textarea>
 219+ </td>
 220+ </tr>
 221+ </table>
 222+ </div>
 223+</body>
 224+</html>
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/image.html
@@ -1,4 +1,4 @@
2 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
33 <!--
44 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
55 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/math.html
@@ -1,4 +1,4 @@
2 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
33 <!--
44 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
55 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/template.html
@@ -1,4 +1,4 @@
2 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
33 <!--
44 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
55 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
@@ -40,6 +40,18 @@
4141 </script>
4242 <script type="text/javascript">
4343
 44+//#### Dialog Tabs
 45+
 46+// Set the dialog tabs.
 47+window.parent.AddTab( 'Edit', 'Edit' ) ;
 48+window.parent.AddTab( 'Manual', 'Manual' ) ;
 49+
 50+function OnDialogTabChange( tabCode )
 51+{
 52+ ShowE('divEdit' , ( tabCode == 'Edit' ) ) ;
 53+ ShowE('divManual' , ( tabCode == 'Manual' ) ) ;
 54+}
 55+
4456 // Get the selected flash embed (if available).
4557 var oFakeImage = FCK.Selection.GetSelectedElement() ;
4658 var oTemplateSpan ;
@@ -65,13 +77,48 @@
6678 window.parent.SetAutoSize( true ) ;
6779 }
6880
 81+function LoadSearchResults( result )
 82+{
 83+ var results = result.responseText.Trim().split( '\n' ) ;
 84+ var select = GetE( 'xWikiResults' ) ;
 85+
 86+ if ( results.length > 0 && !( results.length == 1 && results[0].length == 0 ) )
 87+ {
 88+ for ( var i = 0 ; i < results.length ; i++ )
 89+ FCKTools.AddSelectOption( select, 'Template:' + results[i], results[i] ) ;
 90+ }
 91+}
 92+
6993 function LoadSelection()
7094 {
 95+ // Make an Ajax search for the pages.
 96+ var empty = '';
 97+ oEditor.window.parent.sajax_request_type = 'GET' ;
 98+ oEditor.window.parent.sajax_do_call( 'wfSajaxSearchTemplateFCKeditor',[empty], LoadSearchResults ) ;
 99+
71100 if ( !oTemplateSpan ) return ;
72101
73 - GetE('xTemplateRaw').value = FCKTools.HTMLDecode( oTemplateSpan.innerHTML ).replace( /&quot;/g, '"' ) ;
 102+ var inputText = FCKTools.HTMLDecode(oTemplateSpan.innerHTML);
 103+ if (inputText.length>0 && inputText.indexOf('{{#')<0 && inputText.indexOf('{{:')<0 )
 104+ {
 105+ var templateName = inputText.substring(2,inputText.indexOf('fckLR'));
 106+ if (inputText.indexOf('fckLR')<1)
 107+ templateName = inputText.substring(2,inputText.indexOf('|'));
 108+ if (inputText.indexOf('|')<1)
 109+ templateName = inputText.substring(2,inputText.indexOf('}}'));
 110+
 111+ SetUrl(templateName.charAt(0).toUpperCase() + templateName.substr(1));
 112+ }
 113+ GetE('xTemplateRaw').value = inputText.replace(/fckLR/g,'\r\n').replace( /&quot;/g, '"' );
74114 }
75115
 116+function SetUrl(link)
 117+{
 118+ var urlTemplate = oEditor.window.parent.location.pathname + '?title=Template:' + link + '&printable=yes';
 119+ SetAttribute(GetE('xTemplateManual'),'src',urlTemplate);
 120+ GetE('xTemplateRaw').value = "{{" + link + "}}";
 121+}
 122+
76123 //#### The OK button was hit.
77124 function Ok()
78125 {
@@ -81,7 +128,7 @@
82129 oTemplateSpan.className = 'fck_mw_template' ;
83130 }
84131
85 - var templateData = FCKTools.HTMLEncode( GetE('xTemplateRaw').value ).Trim().replace( /"/g, '&quot;' ) ;
 132+ var templateData = FCKTools.HTMLEncode(GetE('xTemplateRaw').value.Trim().replace(/(\r\n|\n)/g, 'fckLR')).replace( /"/g, '&quot;' ) ;
86133
87134 if ( !( /^{{[\s\S]+}}$/.test( templateData ) ) )
88135 {
@@ -98,13 +145,14 @@
99146 oFakeImage = FCK.InsertElement( oFakeImage ) ;
100147 }
101148
 149+ //GetE('xTestSpan').innerHTML = GetE('xTemplateRaw').value.Trim().replace( /"/g, '&quot;' ).replace(/(\r\n|\n)/g, '___') ;
102150 return true ;
103151 }
104152
105153 </script>
106154 </head>
107155 <body style="overflow: hidden">
108 - <div id="divInfo">
 156+ <div id="divEdit">
109157 <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
110158 <tr>
111159 <td>
@@ -117,7 +165,26 @@
118166 cols="50" rows="10" wrap="off"></textarea>
119167 </td>
120168 </tr>
 169+ <tr>
 170+ <td>
 171+ <span id="xTestSpan" class="fck_mw_template"></span>
 172+ </td>
 173+ </tr>
121174 </table>
122175 </div>
 176+ <div id="divManual" style="display: none">
 177+ <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
 178+ <tr>
 179+ <select id="xWikiResults" style="width: 100%;" onchange="SetUrl( this.value );">
 180+ <option value="">&lt;Pick up a template manual here&gt;</option>
 181+ </select>
 182+ </tr>
 183+ <tr>
 184+ <td>
 185+ <iframe id="xTemplateManual" width="100%" scrolling="yes" height="100%" src="" style="margin:5px;padding:0px;"></iframe>
 186+ </td>
 187+ </tr>
 188+ </table>
 189+ </div>
123190 </body>
124191 </html>
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/ref.html
@@ -1,4 +1,4 @@
2 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
33 <!--
44 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
55 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
Index: trunk/extensions/FCKeditor/plugins/mediawiki/dialogs/link.html
@@ -1,4 +1,4 @@
2 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
33 <!--
44 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
55 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
@@ -45,6 +45,8 @@
4646 if ( oLink )
4747 FCK.Selection.SelectNode( oLink ) ;
4848
 49+var bLinkEqualsName = false ;
 50+
4951 window.onload = function()
5052 {
5153 // Translate the dialog box texts.
@@ -66,6 +68,9 @@
6769 var sHRef = oLink.getAttribute( '_fcksavedurl' ) ;
6870 if ( sHRef == null )
6971 sHRef = oLink.getAttribute( 'href' , 2 ) || '' ;
 72+
 73+ if ( sHRef == oLink.innerHTML )
 74+ bLinkEqualsName = true ;
7075
7176 GetE('txtUrl').value = sHRef ;
7277 }
@@ -204,7 +209,10 @@
205210 oLink.href = sUri ;
206211 SetAttribute( oLink, '_fcksavedurl', sUri ) ;
207212
208 - oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML
 213+ if ( bLinkEqualsName )
 214+ oLink.innerHTML = sUri ;
 215+ else
 216+ oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML
209217
210218 }
211219
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_gallery.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_gallery.gif
___________________________________________________________________
Added: svn:mime-type
212220 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_noinclude.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_noinclude.gif
___________________________________________________________________
Added: svn:mime-type
213221 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_nowiki.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_nowiki.gif
___________________________________________________________________
Added: svn:mime-type
214222 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_special.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_special.gif
___________________________________________________________________
Added: svn:mime-type
215223 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_includeonly.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_includeonly.gif
___________________________________________________________________
Added: svn:mime-type
216224 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_onlyinclude.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/icon_onlyinclude.gif
___________________________________________________________________
Added: svn:mime-type
217225 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/images/tb_icon_special.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/images/tb_icon_special.gif
___________________________________________________________________
Added: svn:mime-type
218226 + application/octet-stream
Index: trunk/extensions/FCKeditor/plugins/mediawiki/fckplugin.js
@@ -44,13 +44,19 @@
4545 tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_math.gif' ;
4646 FCKToolbarItems.RegisterItem( 'MW_Math', tbButton ) ;
4747
 48+tbButton = new FCKToolbarButton( 'MW_Special', 'Special Tag', 'Insert/Edit Special Tag' ) ;
 49+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_special.gif' ;
 50+FCKToolbarItems.RegisterItem( 'MW_Special', tbButton ) ;
 51+
4852 // Override some dialogs.
4953 FCKCommands.RegisterCommand( 'MW_Template', new FCKDialogCommand( 'MW_Template', 'Template Properties', FCKConfig.PluginsPath + 'mediawiki/dialogs/template.html', 400, 330 ) ) ;
5054 FCKCommands.RegisterCommand( 'MW_Ref', new FCKDialogCommand( 'MW_Ref', 'Reference Properties', FCKConfig.PluginsPath + 'mediawiki/dialogs/ref.html', 400, 250 ) ) ;
5155 FCKCommands.RegisterCommand( 'MW_Math', new FCKDialogCommand( 'MW_Math', 'Formula', FCKConfig.PluginsPath + 'mediawiki/dialogs/math.html', 400, 300 ) ) ;
 56+FCKCommands.RegisterCommand( 'MW_Special', new FCKDialogCommand( 'MW_Special', 'Special Tag Properties', FCKConfig.PluginsPath + 'mediawiki/dialogs/special.html', 400, 330 ) ) ; //YC
5257 FCKCommands.RegisterCommand( 'Link', new FCKDialogCommand( 'Link', FCKLang.DlgLnkWindowTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/link.html', 400, 250 ) ) ;
5358 FCKCommands.RegisterCommand( 'Image', new FCKDialogCommand( 'Image', FCKLang.DlgImgTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/image.html', 450, 300 ) ) ;
5459
 60+
5561 // MediaWiki Wikitext Data Processor implementation.
5662 FCK.DataProcessor =
5763 {
@@ -89,8 +95,8 @@
9096 rootNode.normalize() ;
9197
9298 var stringBuilder = new Array() ;
93 - this._AppendNode( rootNode, stringBuilder ) ;
94 - return stringBuilder.join( '' ).Trim() ;
 99+ this._AppendNode( rootNode, stringBuilder, '' ) ;
 100+ return stringBuilder.join( '' ).RTrim().replace(/^\n*/, "") ;
95101 },
96102
97103 /*
@@ -125,7 +131,7 @@
126132 } ,
127133
128134 // This function is based on FCKXHtml._AppendNode.
129 - _AppendNode : function( htmlNode, stringBuilder )
 135+ _AppendNode : function( htmlNode, stringBuilder, prefix )
130136 {
131137 if ( !htmlNode )
132138 return ;
@@ -190,14 +196,36 @@
191197 var basicElement = this._BasicElements[ sNodeName ] ;
192198 if ( basicElement )
193199 {
194 - if ( basicElement[0] )
195 - stringBuilder.push( basicElement[0] ) ;
 200+ var basic0 = basicElement[0];
 201+ var basic1 = basicElement[1];
196202
 203+ if ( ( basicElement[0] == "''" || basicElement[0] == "'''" ) && stringBuilder.length > 2 )
 204+ {
 205+ var pr1 = stringBuilder[stringBuilder.length-1];
 206+ var pr2 = stringBuilder[stringBuilder.length-2];
 207+
 208+ if ( pr1 + pr2 == "'''''") {
 209+ if ( basicElement[0] == "''")
 210+ {
 211+ basic0 = '<i>';
 212+ basic1 = '</i>';
 213+ }
 214+ if ( basicElement[0] == "'''")
 215+ {
 216+ basic0 = '<b>';
 217+ basic1 = '</b>';
 218+ }
 219+ }
 220+ }
 221+
 222+ if ( basic0 )
 223+ stringBuilder.push( basic0 ) ;
 224+
197225 if ( !basicElement[2] )
198 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 226+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
199227
200 - if ( basicElement[1] )
201 - stringBuilder.push( basicElement[1] ) ;
 228+ if ( basic1 )
 229+ stringBuilder.push( basic1 ) ;
202230 }
203231 else
204232 {
@@ -205,38 +233,49 @@
206234 {
207235 case 'ol' :
208236 case 'ul' :
209 - var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li' ) ;
 237+ var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dt', 'dd' ) ;
210238
211 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 239+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
212240
213 - if ( isFirstLevel )
 241+ if ( isFirstLevel && stringBuilder[ stringBuilder.length - 1 ] != "\n" ) {
214242 stringBuilder.push( '\n' ) ;
 243+ }
215244
216245 break ;
217246
218247 case 'li' :
219248
220 - stringBuilder.push( '\n' ) ;
221 -
222 - var listPrefix = '' ;
 249+ if( stringBuilder.length > 1)
 250+ {
 251+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
 252+ if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*")
 253+ stringBuilder.push( '\n' + prefix ) ;
 254+ }
 255+
223256 var parent = htmlNode.parentNode ;
224 -
 257+ var listType = "#" ;
 258+
225259 while ( parent )
226260 {
227261 if ( parent.nodeName.toLowerCase() == 'ul' )
228 - listPrefix = '*' + listPrefix ;
 262+ {
 263+ listType = "*" ;
 264+ break ;
 265+ }
229266 else if ( parent.nodeName.toLowerCase() == 'ol' )
230 - listPrefix = '#' + listPrefix ;
 267+ {
 268+ listType = "#" ;
 269+ break ;
 270+ }
231271 else if ( parent.nodeName.toLowerCase() != 'li' )
232272 break ;
233273
234274 parent = parent.parentNode ;
235275 }
236 -
237 - stringBuilder.push( listPrefix ) ;
238 - stringBuilder.push( ' ' ) ;
239 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
240 -
 276+
 277+ stringBuilder.push( listType ) ;
 278+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + listType ) ;
 279+
241280 break ;
242281
243282 case 'a' :
@@ -248,42 +287,61 @@
249288 if ( href == null )
250289 href = htmlNode.getAttribute( 'href' , 2 ) || '' ;
251290
 291+ var isWikiUrl = true ;
 292+
252293 if ( hrefType == "media" )
253 - {
254 - var isWikiUrl = true ;
255294 stringBuilder.push( '[[Media:' ) ;
256 - }
 295+ else if ( htmlNode.className == "extiw" )
 296+ stringBuilder.push( '[[' ) ;
257297 else
258298 {
259299 var isWikiUrl = !( href.StartsWith( 'mailto:' ) || /^\w+:\/\//.test( href ) ) ;
260300 stringBuilder.push( isWikiUrl ? '[[' : '[' ) ;
261301 }
262302 stringBuilder.push( href ) ;
263 - if ( href != htmlNode.innerHTML && htmlNode.innerHTML != '[n]' )
 303+ //if ( href != htmlNode.innerHTML && htmlNode.innerHTML != '[n]' )
 304+ if ( htmlNode.innerHTML != '[n]' )
264305 {
265306 stringBuilder.push( isWikiUrl? '|' : ' ' ) ;
266 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 307+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
267308 }
268309 stringBuilder.push( isWikiUrl ? ']]' : ']' ) ;
269310
270311 break ;
271312
272313 case 'dl' :
273 - stringBuilder.push( '\n' ) ;
274 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
275 - if (stringBuilder.length > 0 && !stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ))
276 - stringBuilder.push( '\n' ) ;
 314+
 315+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
 316+ var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dd', 'dt' ) ;
 317+ if ( isFirstLevel && stringBuilder[ stringBuilder.length - 1 ] != "\n" )
 318+ stringBuilder.push( '\n') ;
 319+
277320 break ;
278321
279322 case 'dt' :
 323+
 324+ if( stringBuilder.length > 1)
 325+ {
 326+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
 327+ if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*" )
 328+ stringBuilder.push( '\n' + prefix ) ;
 329+ }
280330 stringBuilder.push( ';' ) ;
281 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 331+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + ";") ;
 332+
282333 break ;
283334
284335 case 'dd' :
 336+
 337+ if( stringBuilder.length > 1)
 338+ {
 339+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
 340+ if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*" )
 341+ stringBuilder.push( '\n' + prefix ) ;
 342+ }
285343 stringBuilder.push( ':' ) ;
286 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
287 - stringBuilder.push( '\n' ) ;
 344+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + ":" ) ;
 345+
288346 break ;
289347
290348 case 'table' :
@@ -298,7 +356,7 @@
299357 if ( htmlNode.caption && htmlNode.caption.innerHTML.length > 0 )
300358 {
301359 stringBuilder.push( '|+ ' ) ;
302 - this._AppendChildNodes( htmlNode.caption, stringBuilder ) ;
 360+ this._AppendChildNodes( htmlNode.caption, stringBuilder, prefix ) ;
303361 stringBuilder.push( '\n' ) ;
304362 }
305363
@@ -315,7 +373,10 @@
316374 {
317375 attribs = this._GetAttributesStr( htmlNode.rows[r].cells[c] ) ;
318376
319 - stringBuilder.push( '|' ) ;
 377+ if ( htmlNode.rows[r].cells[c].tagName.toLowerCase() == "th" )
 378+ stringBuilder.push( '!' ) ;
 379+ else
 380+ stringBuilder.push( '|' ) ;
320381
321382 if ( attribs.length > 0 )
322383 stringBuilder.push( attribs + ' |' ) ;
@@ -323,7 +384,7 @@
324385 stringBuilder.push( ' ' ) ;
325386
326387 this._IsInsideCell = true ;
327 - this._AppendChildNodes( htmlNode.rows[r].cells[c], stringBuilder ) ;
 388+ this._AppendChildNodes( htmlNode.rows[r].cells[c], stringBuilder, prefix ) ;
328389 this._IsInsideCell = false ;
329390
330391 stringBuilder.push( '\n' ) ;
@@ -405,7 +466,7 @@
406467 return ;
407468
408469 case 'fck_mw_template' :
409 - stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML) ) ;
 470+ stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;
410471 return ;
411472
412473 case 'fck_mw_magic' :
@@ -424,8 +485,13 @@
425486 sNodeName = 'noinclude' ;
426487 break ;
427488
 489+ case 'fck_mw_gallery' :
 490+ sNodeName = 'gallery' ;
 491+ break ;
 492+
428493 case 'fck_mw_onlyinclude' :
429494 sNodeName = 'onlyinclude' ;
 495+
430496 break ;
431497 }
432498
@@ -440,11 +506,9 @@
441507 {
442508 stringBuilder.push( "\n " ) ;
443509 this._inLSpace = true ;
444 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 510+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
445511 this._inLSpace = false ;
446 - if ( stringBuilder[stringBuilder.length-2] == "\n" && stringBuilder[stringBuilder.length-1] == " " )
447 - stringBuilder.pop() ;
448 - else
 512+ if ( !stringBuilder[stringBuilder.length-1].EndsWith("\n") )
449513 stringBuilder.push( "\n" ) ;
450514 }
451515 else
@@ -457,11 +521,12 @@
458522
459523 stringBuilder.push( '>' ) ;
460524 this._inPre = true ;
461 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 525+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
462526 this._inPre = false ;
 527+
463528 stringBuilder.push( '<\/' ) ;
464529 stringBuilder.push( sNodeName ) ;
465 - stringBuilder.push( '>' ) ;
 530+ stringBuilder.push( '>' ) ;
466531 }
467532
468533 break ;
@@ -475,7 +540,7 @@
476541 stringBuilder.push( attribs ) ;
477542
478543 stringBuilder.push( '>' ) ;
479 - this._AppendChildNodes( htmlNode, stringBuilder ) ;
 544+ this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
480545 stringBuilder.push( '<\/' ) ;
481546 stringBuilder.push( sNodeName ) ;
482547 stringBuilder.push( '>' ) ;
@@ -491,36 +556,40 @@
492557
493558 var parentIsSpecialTag = htmlNode.parentNode.getAttribute( '_fck_mw_customtag' ) ;
494559 var textValue = htmlNode.nodeValue;
495 -
 560+
496561 if ( !parentIsSpecialTag )
497562 {
 563+ if ( FCKBrowserInfo.IsIE && this._inLSpace ) {
 564+ textValue = textValue.replace(/\r/, "\r ") ;
 565+ }
 566+
498567 textValue = textValue.replace( /[\n\t]/g, ' ' ) ;
 568+
499569 textValue = FCKTools.HTMLEncode( textValue ) ;
500570 textValue = textValue.replace( /\u00A0/g, '&nbsp;' ) ;
501571
502 - if ( !htmlNode.previousSibling ||
503 - ( stringBuilder.length > 0 && stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ) ) && !this._inLSpace )
 572+ if ( ( !htmlNode.previousSibling ||
 573+ ( stringBuilder.length > 0 && stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ) ) ) && !this._inLSpace && !this._inPre )
504574 {
505575 textValue = textValue.LTrim() ;
506576 }
507577
508 - if ( !htmlNode.nextSibling && !this._inLSpace )
 578+ if ( !htmlNode.nextSibling && !this._inLSpace && !this._inPre && (!htmlNode.parentNode || !htmlNode.parentNode.nextSibling))
509579 textValue = textValue.RTrim() ;
510580
511 - textValue = textValue.replace( / {2,}/g, ' ' ) ;
 581+ if (!this._inLSpace && !this._inPre)
 582+ textValue = textValue.replace( / {2,}/g, ' ' ) ;
512583
513584 if ( this._inLSpace && textValue.length == 1 && textValue.charCodeAt(0) == 13 )
514585 textValue = textValue + " " ;
515 -
516586 if ( this._IsInsideCell )
517587 textValue = textValue.replace( /\|/g, '&#124;' ) ;
518 -
519588 }
520589 else
521590 {
522 - textValue = FCKTools.HTMLDecode( textValue ) ;
 591+ textValue = FCKTools.HTMLDecode(textValue).replace(/fckLR/g,'\r\n');
523592 }
524 -
 593+
525594 stringBuilder.push( textValue ) ;
526595 return ;
527596
@@ -536,18 +605,18 @@
537606 try { stringBuilder.push( htmlNode.nodeValue ) ; }
538607 catch (e) { /* Do nothing... probably this is a wrong format comment. */ }
539608
540 - stringBuilder.push( " -->" ) ;
 609+ stringBuilder.push( "-->" ) ;
541610 return ;
542611 }
543612 },
544613
545 - _AppendChildNodes : function( htmlNode, stringBuilder, isBlockElement )
 614+ _AppendChildNodes : function( htmlNode, stringBuilder, listPrefix )
546615 {
547616 var child = htmlNode.firstChild ;
548617
549618 while ( child )
550619 {
551 - this._AppendNode( child, stringBuilder ) ;
 620+ this._AppendNode( child, stringBuilder, listPrefix ) ;
552621 child = child.nextSibling ;
553622 }
554623 },
@@ -581,13 +650,16 @@
582651 if ( sAttValue.length == 0 )
583652 continue ;
584653 }
 654+ else if ( sAttName == 'style' && FCKBrowserInfo.IsIE ) {
 655+ sAttValue = htmlNode.style.cssText.toLowerCase() ;
 656+ }
585657 // XHTML doens't support attribute minimization like "CHECKED". It must be trasformed to cheched="checked".
586658 else if ( oAttribute.nodeValue === true )
587659 sAttValue = sAttName ;
588660 else
589661 sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined.
590662
591 - attStr += ' ' + sAttName + '="' + sAttValue.replace( '"', '&quot;' ) + '"' ;
 663+ attStr += ' ' + sAttName + '="' + String(sAttValue).replace( '"', '&quot;' ) + '"' ;
592664 }
593665 }
594666 return attStr ;
@@ -650,10 +722,33 @@
651723 if ( className == null )
652724 className = 'FCK__MWReferences' ;
653725 case 'fck_mw_template' :
 726+ if ( className == null ) //YC
 727+ className = 'FCK__MWTemplate' ; //YC
654728 case 'fck_mw_magic' :
655729 if ( className == null )
656 - className = 'FCK__MWTemplate' ;
657 -
 730+ className = 'FCK__MWMagicWord' ;
 731+ case 'fck_mw_magic' :
 732+ if ( className == null )
 733+ className = 'FCK__MWMagicWord' ;
 734+ case 'fck_mw_special' : //YC
 735+ if ( className == null )
 736+ className = 'FCK__MWSpecial' ;
 737+ case 'fck_mw_nowiki' :
 738+ if ( className == null )
 739+ className = 'FCK__MWNowiki' ;
 740+ case 'fck_mw_includeonly' :
 741+ if ( className == null )
 742+ className = 'FCK__MWIncludeonly' ;
 743+ case 'fck_mw_gallery' :
 744+ if ( className == null )
 745+ className = 'FCK__MWGallery' ;
 746+ case 'fck_mw_noinclude' :
 747+ if ( className == null )
 748+ className = 'FCK__MWNoinclude' ;
 749+ case 'fck_mw_onlyinclude' :
 750+ if ( className == null )
 751+ className = 'FCK__MWOnlyinclude' ;
 752+
658753 var oImg = FCKDocumentProcessor_CreateFakeImage( className, eSpan.cloneNode(true) ) ;
659754 oImg.setAttribute( '_' + eSpan.className, 'true', 0 ) ;
660755
@@ -662,6 +757,19 @@
663758 break ;
664759 }
665760 }
 761+
 762+ // Templates and magic words.
 763+ var aHrefs = document.getElementsByTagName( 'A' ) ;
 764+ var a ;
 765+ var i = aHrefs.length - 1 ;
 766+ while ( i >= 0 && ( a = aHrefs[i--] ) )
 767+ {
 768+ if (a.className == 'extiw')
 769+ {
 770+ a.href = a.innerHTML = ":" + a.title ;
 771+ a.setAttribute( '_fcksavedurl', ":" + a.title ) ;
 772+ }
 773+ }
666774 }
667775
668776 // Context menu for templates.
@@ -690,6 +798,11 @@
691799 contextMenu.AddSeparator() ;
692800 contextMenu.AddItem( 'MW_Math', 'Edit Formula' ) ;
693801 }
 802+ if ( tag.getAttribute( '_fck_mw_special' ) || tag.getAttribute( '_fck_mw_nowiki' ) || tag.getAttribute( '_fck_mw_includeonly' ) || tag.getAttribute( '_fck_mw_noinclude' ) || tag.getAttribute( '_fck_mw_onlyinclude' ) || tag.getAttribute( '_fck_mw_gallery' )) //YC
 803+ {
 804+ contextMenu.AddSeparator() ;
 805+ contextMenu.AddItem( 'MW_Special', 'Special Tag Properties' ) ;
 806+ }
694807 }
695808 }
696 -}) ;
\ No newline at end of file
 809+}) ;
Index: trunk/extensions/FCKeditor/FCKeditorSajax.body.php
@@ -2,133 +2,165 @@
33
44 function wfSajaxGetMathUrl( $term )
55 {
6 - $originalLink = MathRenderer::renderMath( $term );
 6+ $originalLink = MathRenderer::renderMath( $term );
77
8 - if (false == strpos($originalLink, "src=\"")) {
9 - return "";
10 - }
 8+ if (false == strpos($originalLink, "src=\"")) {
 9+ return "";
 10+ }
1111
12 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
13 - $url = strtok($srcPart, '"');
 12+ $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
 13+ $url = strtok($srcPart, '"');
1414
15 - return $url;
 15+ return $url;
1616 }
1717
1818 function wfSajaxGetImageUrl( $term )
1919 {
20 - global $wgExtensionFunctions, $wgTitle;
 20+ global $wgExtensionFunctions, $wgTitle;
2121
22 - $options = new FCKeditorParserOptions();
23 - $options->setTidy(true);
24 - $parser = new FCKeditorParser();
 22+ $options = new FCKeditorParserOptions();
 23+ $options->setTidy(true);
 24+ $parser = new FCKeditorParser();
2525
26 - if (in_array("wfCite", $wgExtensionFunctions)) {
27 - $parser->setHook('ref', array($parser, 'ref'));
28 - $parser->setHook('references', array($parser, 'references'));
29 - }
30 - $parser->setOutputType(OT_HTML);
31 - $originalLink = $parser->parse("[[Image:".$term."]]", $wgTitle, $options)->getText();
32 - if (false == strpos($originalLink, "src=\"")) {
33 - return "";
34 - }
 26+ if (in_array("wfCite", $wgExtensionFunctions)) {
 27+ $parser->setHook('ref', array($parser, 'ref'));
 28+ $parser->setHook('references', array($parser, 'references'));
 29+ }
 30+ $parser->setOutputType(OT_HTML);
 31+ $originalLink = $parser->parse("[[Image:".$term."]]", $wgTitle, $options)->getText();
 32+ if (false == strpos($originalLink, "src=\"")) {
 33+ return "";
 34+ }
3535
36 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
37 - $url = strtok($srcPart, '"');
 36+ $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
 37+ $url = strtok($srcPart, '"');
3838
39 - return $url;
 39+ return $url;
4040 }
4141
 42+function wfSajaxSearchSpecialTagFCKeditor($empty)
 43+{
 44+ global $wgParser;
 45+
 46+ $ret = "nowiki\nincludeonly\nonlyinclude\nnoinclude\ngallery\n";
 47+ foreach ($wgParser->getTags() as $h) {
 48+ if (!in_array($h, array("pre", "math", "ref", "references"))) {
 49+ $ret .= $h ."\n";
 50+ }
 51+ }
 52+ return $ret;
 53+}
 54+
4255 function wfSajaxSearchImageFCKeditor( $term )
4356 {
44 - global $wgContLang, $wgOut;
45 - $limit = 10;
 57+ global $wgContLang, $wgOut;
 58+ $limit = 10;
4659
47 - $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
48 - $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
49 - $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
50 - $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
51 - $term = $term1;
 60+ $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
 61+ $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
 62+ $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
 63+ $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
 64+ $term = $term1;
5265
53 - if ( strlen( str_replace( '_', '', $term ) )<3 )
54 - return "";
 66+ if ( strlen( str_replace( '_', '', $term ) )<3 )
 67+ return "";
5568
56 - $db =& wfGetDB( DB_SLAVE );
57 - $res = $db->select( 'page', 'page_title',
58 - array( 'page_namespace' => NS_IMAGE,
59 - "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
60 - "wfSajaxSearch",
61 - array( 'LIMIT' => $limit+1 )
62 - );
 69+ $db =& wfGetDB( DB_SLAVE );
 70+ $res = $db->select( 'page', 'page_title',
 71+ array( 'page_namespace' => NS_IMAGE,
 72+ "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
 73+ "wfSajaxSearch",
 74+ array( 'LIMIT' => $limit+1 )
 75+ );
6376
64 - $ret = "";
65 - $i=0;
66 - while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
67 - $ret .= $row->page_title ."\n";
68 - }
 77+ $ret = "";
 78+ $i=0;
 79+ while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
 80+ $ret .= $row->page_title ."\n";
 81+ }
6982
70 - $term = htmlspecialchars( $term );
 83+ $term = htmlspecialchars( $term );
7184
72 - return $ret;
 85+ return $ret;
7386 }
7487
7588 function wfSajaxSearchArticleFCKeditor( $term )
7689 {
77 - global $wgContLang, $wgOut;
78 - $limit = 10;
79 - $ns = NS_MAIN;
 90+ global $wgContLang, $wgOut;
 91+ $limit = 10;
 92+ $ns = NS_MAIN;
8093
81 - $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
 94+ $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
8295
83 - if (strpos($term, "Category:") === 0) {
84 - $ns = NS_CATEGORY;
85 - $term = substr($term, 9);
86 - $prefix = "Category:";
87 - }
88 - else if (strpos($term, ":Category:") === 0) {
89 - $ns = NS_CATEGORY;
90 - $term = substr($term, 10);
91 - $prefix = ":Category:";
92 - }
 96+ if (strpos($term, "Category:") === 0) {
 97+ $ns = NS_CATEGORY;
 98+ $term = substr($term, 9);
 99+ $prefix = "Category:";
 100+ }
 101+ else if (strpos($term, ":Category:") === 0) {
 102+ $ns = NS_CATEGORY;
 103+ $term = substr($term, 10);
 104+ $prefix = ":Category:";
 105+ }
93106
94 - $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
95 - $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
96 - $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
97 - $term = $term1;
 107+ $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
 108+ $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
 109+ $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
 110+ $term = $term1;
98111
99 - if ( strlen( str_replace( '_', '', $term ) )<3 ) {
100 - return "";
101 - }
 112+ if ( strlen( str_replace( '_', '', $term ) )<3 ) {
 113+ return "";
 114+ }
102115
103 - $db =& wfGetDB( DB_SLAVE );
104 - $res = $db->select( 'page', 'page_title',
105 - array( 'page_namespace' => $ns,
106 - "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
107 - "wfSajaxSearch",
108 - array( 'LIMIT' => $limit+1 )
109 - );
 116+ $db =& wfGetDB( DB_SLAVE );
 117+ $res = $db->select( 'page', 'page_title',
 118+ array( 'page_namespace' => $ns,
 119+ "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ),
 120+ "wfSajaxSearch",
 121+ array( 'LIMIT' => $limit+1 )
 122+ );
110123
111 - $ret = "";
112 - $i=0;
113 - while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
114 - if (isset($prefix) && !is_null($prefix)) {
115 - $ret .= $prefix;
116 - }
117 - $ret .= $row->page_title ."\n";
118 - }
 124+ $ret = "";
 125+ $i=0;
 126+ while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
 127+ if (isset($prefix) && !is_null($prefix)) {
 128+ $ret .= $prefix;
 129+ }
 130+ $ret .= $row->page_title ."\n";
 131+ }
119132
120 - $term = htmlspecialchars( $term );
 133+ $term = htmlspecialchars( $term );
121134
122 - return $ret;
 135+ return $ret;
123136 }
124137
 138+function wfSajaxSearchTemplateFCKeditor($empty)
 139+{
 140+ global $wgContLang, $wgOut;
 141+ $ns = NS_TEMPLATE;
 142+
 143+ $db =& wfGetDB( DB_SLAVE );
 144+ $res = $db->select( 'page', 'page_title',
 145+ array( 'page_namespace' => $ns),
 146+ "wfSajaxSearch"
 147+ );
 148+
 149+ $ret = "";
 150+ while ( $row = $db->fetchObject( $res ) ) {
 151+ $ret .= $row->page_title ."\n";
 152+ }
 153+
 154+ return $ret;
 155+}
 156+
125157 function wfSajaxWikiToHTML( $wiki )
126158 {
127 - global $wgTitle;
 159+ global $wgTitle;
128160
129 - $options = new FCKeditorParserOptions();
130 - $options->setTidy(true);
131 - $parser = new FCKeditorParser();
132 - $parser->setOutputType(OT_HTML);
 161+ $options = new FCKeditorParserOptions();
 162+ $options->setTidy(true);
 163+ $parser = new FCKeditorParser();
 164+ $parser->setOutputType(OT_HTML);
133165
134 - return $parser->parse($wiki, $wgTitle, $options)->getText();
 166+ return $parser->parse($wiki, $wgTitle, $options)->getText();
135167 }
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.fr.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => '\'\'Rich Editor\'\'',
 6+ 'tog-riched_disable' => 'Désactiver \'\'Rich Editor\'\'',
 7+ 'tog-riched_disable_ns_main' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms principal.',
 8+ 'tog-riched_disable_ns_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Talk}}\'\'.',
 9+ 'tog-riched_disable_ns_user' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:User}}\'\'.',
 10+ 'tog-riched_disable_ns_user_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:User_talk}}\'\'.',
 11+ 'tog-riched_disable_ns_project' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Project}}\'\'.',
 12+ 'tog-riched_disable_ns_project_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Project_talk}}\'\'.',
 13+ 'tog-riched_disable_ns_image' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Image}}\'\'.',
 14+ 'tog-riched_disable_ns_image_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Image_talk}}\'\'.',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:MediaWiki}}\'\'.',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:MediaWiki_talk}}\'\'.',
 17+ 'tog-riched_disable_ns_template' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Template}}\'\'.',
 18+ 'tog-riched_disable_ns_template_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Template_talk}}\'\'.',
 19+ 'tog-riched_disable_ns_help' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Help}}\'\'.',
 20+ 'tog-riched_disable_ns_help_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Help_talk}}\'\'.',
 21+ 'tog-riched_disable_ns_category' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Category}}\'\'.',
 22+ 'tog-riched_disable_ns_category_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Category_talk}}\'\'.',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.fr.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditorParserOptions.body.php
@@ -2,8 +2,8 @@
33
44 class FCKeditorParserOptions extends ParserOptions
55 {
6 - function getNumberHeadings() {return false;}
7 - function getEditSection() {return false;}
 6+ function getNumberHeadings() {return false;}
 7+ function getEditSection() {return false;}
88
99 function getSkin() {
1010 if ( !isset( $this->mSkin ) ) {
Index: trunk/extensions/FCKeditor/mw12/FCKeditorParser_OldPP.body.php
@@ -0,0 +1,649 @@
 2+<?php
 3+
 4+class FCKeditorParser extends Parser_OldPP
 5+{
 6+ public static $fkc_mw_makeImage_options;
 7+ protected $fck_mw_strtr_span;
 8+ protected $fck_mw_strtr_span_counter=1;
 9+ protected $fck_mw_taghook;
 10+ protected $fck_internal_parse_text;
 11+ protected $fck_matches = array();
 12+
 13+ private $FCKeditorMagicWords = array(
 14+ '__NOTOC__',
 15+ '__FORCETOC__',
 16+ '__NOEDITSECTION__',
 17+ '__START__',
 18+ '__NOTITLECONVERT__',
 19+ '__NOCONTENTCONVERT__',
 20+ '__END__',
 21+ '__TOC__',
 22+ '__NOTC__',
 23+ '__NOCC__',
 24+ "__FORCETOC__",
 25+ "__NEWSECTIONLINK__",
 26+ "__NOGALLERY__",
 27+ );
 28+
 29+ function __construct() {
 30+ global $wgParser;
 31+ parent::__construct();
 32+
 33+ foreach ($wgParser->getTags() as $h) {
 34+ if (!in_array($h, array("pre"))) {
 35+ $this->setHook($h, array($this, "fck_genericTagHook"));
 36+ }
 37+ }
 38+ }
 39+
 40+ /**
 41+ * Add special string (that would be changed by Parser) to array and return simple unique string
 42+ * that will remain unchanged during whole parsing operation.
 43+ * At the end we'll replace all this unique strings with original content
 44+ *
 45+ * @param string $text
 46+ * @return string
 47+ */
 48+ private function fck_addToStrtr($text, $replaceLineBreaks = true) {
 49+ $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
 50+ $this->fck_mw_strtr_span_counter++;
 51+ if ($replaceLineBreaks) {
 52+ $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text);
 53+ }
 54+ else {
 55+ $this->fck_mw_strtr_span[$key] = $text;
 56+ }
 57+ return $key;
 58+ }
 59+
 60+ /**
 61+ * Handle link to subpage if necessary
 62+ * @param string $target the source of the link
 63+ * @param string &$text the link text, modified as necessary
 64+ * @return string the full name of the link
 65+ * @private
 66+ */
 67+ function maybeDoSubpageLink($target, &$text) {
 68+ return $target;
 69+ }
 70+
 71+ /**
 72+ * Callback function for custom tags: feed, ref, references etc.
 73+ *
 74+ * @param string $str Input
 75+ * @param array $argv Arguments
 76+ * @return string
 77+ */
 78+ function fck_genericTagHook( $str, $argv, $parser ) {
 79+ if (in_array($this->fck_mw_taghook, array("ref", "math", "references"))) {
 80+ $class = $this->fck_mw_taghook;
 81+ }
 82+ else {
 83+ $class = "special";
 84+ }
 85+
 86+ if (empty($argv)) {
 87+ $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">";
 88+ }
 89+ else {
 90+ $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\"";
 91+ foreach ($argv as $key=>$value) {
 92+ $ret .= " ".$key."=\"".$value."\"";
 93+ }
 94+ $ret .=">";
 95+ }
 96+ if (is_null($str)) {
 97+ $ret = substr($ret, 0, -1) . " />";
 98+ }
 99+ else {
 100+ $ret .= htmlspecialchars($str);
 101+ $ret .= "</span>";
 102+ }
 103+
 104+ $replacement = $this->fck_addToStrtr($ret);
 105+ return $replacement;
 106+ }
 107+
 108+ /**
 109+ * Callback function for wiki tags: nowiki, includeonly, noinclude
 110+ *
 111+ * @param string $tagName tag name, eg. nowiki, math
 112+ * @param string $str Input
 113+ * @param array $argv Arguments
 114+ * @return string
 115+ */
 116+ function fck_wikiTag( $tagName, $str, $argv = array()) {
 117+ if (empty($argv)) {
 118+ $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">";
 119+ }
 120+ else {
 121+ $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">";
 122+ foreach ($argv as $key=>$value) {
 123+ $ret .= " ".$key."=\"".$value."\"";
 124+ }
 125+ $ret .=">";
 126+ }
 127+ if (is_null($str)) {
 128+ $ret = substr($ret, 0, -1) . " />";
 129+ }
 130+ else {
 131+ $ret .= htmlspecialchars($str);
 132+ $ret .= "</span>";
 133+ }
 134+
 135+ $replacement = $this->fck_addToStrtr($ret);
 136+
 137+ return $replacement;
 138+ }
 139+
 140+ /**
 141+ * Strips and renders nowiki, pre, math, hiero
 142+ * If $render is set, performs necessary rendering operations on plugins
 143+ * Returns the text, and fills an array with data needed in unstrip()
 144+ *
 145+ * @param StripState $state
 146+ *
 147+ * @param bool $stripcomments when set, HTML comments <!-- like this -->
 148+ * will be stripped in addition to other tags. This is important
 149+ * for section editing, where these comments cause confusion when
 150+ * counting the sections in the wikisource
 151+ *
 152+ * @param array dontstrip contains tags which should not be stripped;
 153+ * used to prevent stipping of <gallery> when saving (fixes bug 2700)
 154+ *
 155+ * @private
 156+ */
 157+ function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
 158+ global $wgContLang;
 159+
 160+ wfProfileIn( __METHOD__ );
 161+ $render = ($this->mOutputType == OT_HTML);
 162+
 163+ $uniq_prefix = $this->mUniqPrefix;
 164+ $commentState = new ReplacementArray;
 165+ $nowikiItems = array();
 166+ $generalItems = array();
 167+
 168+ $elements = array_merge(
 169+ array( 'nowiki', 'gallery' ),
 170+ array_keys( $this->mTagHooks ) );
 171+ global $wgRawHtml;
 172+ if( $wgRawHtml ) {
 173+ $elements[] = 'html';
 174+ }
 175+ if( $this->mOptions->getUseTeX() ) {
 176+ $elements[] = 'math';
 177+ }
 178+
 179+ # Removing $dontstrip tags from $elements list (currently only 'gallery', fixing bug 2700)
 180+ foreach ( $elements AS $k => $v ) {
 181+ if ( !in_array ( $v , $dontstrip ) ) continue;
 182+ unset ( $elements[$k] );
 183+ }
 184+
 185+ $matches = array();
 186+ $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
 187+
 188+ foreach( $matches as $marker => $data ) {
 189+ list( $element, $content, $params, $tag ) = $data;
 190+ if( $render ) {
 191+ $tagName = strtolower( $element );
 192+ wfProfileIn( __METHOD__."-render-$tagName" );
 193+ switch( $tagName ) {
 194+ case '!--':
 195+ // Comment
 196+ if( substr( $tag, -3 ) == '-->' ) {
 197+ $output = $tag;
 198+ } else {
 199+ // Unclosed comment in input.
 200+ // Close it so later stripping can remove it
 201+ $output = "$tag-->";
 202+ }
 203+ break;
 204+ case 'html':
 205+ if( $wgRawHtml ) {
 206+ $output = $content;
 207+ break;
 208+ }
 209+ // Shouldn't happen otherwise. :)
 210+ case 'nowiki':
 211+ $output = $this->fck_wikiTag('nowiki', $content, $params); //required by FCKeditor
 212+ break;
 213+ case 'math':
 214+ $output = $wgContLang->armourMath( MathRenderer::renderMath( $content ) );
 215+ break;
 216+ case 'gallery':
 217+ $output = $this->fck_wikiTag('gallery', $content, $params); //required by FCKeditor
 218+ //$output = $this->renderImageGallery( $content, $params );
 219+ break;
 220+ default:
 221+ if( isset( $this->mTagHooks[$tagName] ) ) {
 222+ $this->fck_mw_taghook = $tagName; //required by FCKeditor
 223+ $output = call_user_func_array( $this->mTagHooks[$tagName],
 224+ array( $content, $params, $this ) );
 225+ } else {
 226+ throw new MWException( "Invalid call hook $element" );
 227+ }
 228+ }
 229+ wfProfileOut( __METHOD__."-render-$tagName" );
 230+ } else {
 231+ // Just stripping tags; keep the source
 232+ $output = $tag;
 233+ }
 234+
 235+ // Unstrip the output, to support recursive strip() calls
 236+ $output = $state->unstripBoth( $output );
 237+
 238+ if( !$stripcomments && $element == '!--' ) {
 239+ $commentState->setPair( $marker, $output );
 240+ } elseif ( $element == 'html' || $element == 'nowiki' ) {
 241+ $nowikiItems[$marker] = $output;
 242+ } else {
 243+ $generalItems[$marker] = $output;
 244+ }
 245+ }
 246+ # Add the new items to the state
 247+ # We do this after the loop instead of during it to avoid slowing
 248+ # down the recursive unstrip
 249+ $state->nowiki->mergeArray( $nowikiItems );
 250+ $state->general->mergeArray( $generalItems );
 251+
 252+ # Unstrip comments unless explicitly told otherwise.
 253+ # (The comments are always stripped prior to this point, so as to
 254+ # not invoke any extension tags / parser hooks contained within
 255+ # a comment.)
 256+ if ( !$stripcomments ) {
 257+ // Put them all back and forget them
 258+ $text = $commentState->replace( $text );
 259+ }
 260+
 261+ $this->fck_matches = $matches;
 262+ wfProfileOut( __METHOD__ );
 263+ return $text;
 264+ }
 265+
 266+ /** Replace HTML comments with unique text using fck_addToStrtr function
 267+ *
 268+ * @private
 269+ * @param string $text
 270+ * @return string
 271+ */
 272+ private function fck_replaceHTMLcomments( $text ) {
 273+ wfProfileIn( __METHOD__ );
 274+ while (($start = strpos($text, '<!--')) !== false) {
 275+ $end = strpos($text, '-->', $start + 4);
 276+ if ($end === false) {
 277+ # Unterminated comment; bail out
 278+ break;
 279+ }
 280+
 281+ $end += 3;
 282+
 283+ # Trim space and newline if the comment is both
 284+ # preceded and followed by a newline
 285+ $spaceStart = max($start - 1, 0);
 286+ $spaceLen = $end - $spaceStart;
 287+ while (substr($text, $spaceStart, 1) === ' ' && $spaceStart > 0) {
 288+ $spaceStart--;
 289+ $spaceLen++;
 290+ }
 291+ while (substr($text, $spaceStart + $spaceLen, 1) === ' ')
 292+ $spaceLen++;
 293+ if (substr($text, $spaceStart, 1) === "\n" and substr($text, $spaceStart + $spaceLen, 1) === "\n") {
 294+ # Remove the comment, leading and trailing
 295+ # spaces, and leave only one newline.
 296+ $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1), false);
 297+ $text = substr_replace($text, $replacement."\n", $spaceStart, $spaceLen + 1);
 298+ }
 299+ else {
 300+ # Remove just the comment.
 301+ $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start), false);
 302+ $text = substr_replace($text, $replacement, $start, $end - $start);
 303+ }
 304+ }
 305+ wfProfileOut( __METHOD__ );
 306+
 307+ return $text;
 308+ }
 309+
 310+ function replaceInternalLinks( $text ) {
 311+ return parent::replaceInternalLinks($text);
 312+ }
 313+
 314+ function makeImage( $nt, $options ) {
 315+ FCKeditorParser::$fkc_mw_makeImage_options = $options;
 316+ return parent::makeImage( $nt, $options );
 317+ }
 318+
 319+ /**
 320+ * Replace templates with unique text to preserve them from parsing
 321+ *
 322+ * @todo if {{template}} is inside string that also must be returned unparsed,
 323+ * e.g. <noinclude>{{template}}</noinclude>
 324+ * {{template}} replaced with Fckmw[n]fckmw which is wrong...
 325+ *
 326+ * @param string $text
 327+ * @return string
 328+ */
 329+ private function fck_replaceTemplates( $text ) {
 330+
 331+ $callback = array('{' =>
 332+ array(
 333+ 'end'=>'}',
 334+ 'cb' => array(
 335+ 2=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
 336+ 3=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
 337+ ),
 338+ 'min' =>2,
 339+ 'max' =>3,
 340+ )
 341+ );
 342+
 343+ $text = $this->replace_callback($text, $callback);
 344+
 345+ $tags = array();
 346+ $offset=0;
 347+ $textTmp = $text;
 348+ while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_START-->")))
 349+ {
 350+ $tags[abs($pos + $offset)] = 1;
 351+ $textTmp = substr($textTmp, $pos+21);
 352+ $offset += $pos + 21;
 353+ }
 354+
 355+ $offset=0;
 356+ $textTmp = $text;
 357+ while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_END-->")))
 358+ {
 359+ $tags[abs($pos + $offset)] = -1;
 360+ $textTmp = substr($textTmp, $pos+19);
 361+ $offset += $pos + 19;
 362+ }
 363+
 364+ if (!empty($tags)) {
 365+ ksort($tags);
 366+
 367+ $strtr = array("<!--FCK_SKIP_START-->" => "", "<!--FCK_SKIP_END-->" => "");
 368+
 369+ $sum=0;
 370+ $lastSum=0;
 371+ $finalString = "";
 372+ $stringToParse = "";
 373+ $startingPos = 0;
 374+ $inner = "";
 375+ $strtr_span = array();
 376+ foreach ($tags as $pos=>$type) {
 377+ $sum += $type;
 378+ if ($sum == 1 && $lastSum == 0) {
 379+ $stringToParse .= strtr(substr($text, $startingPos, $pos - $startingPos), $strtr);
 380+ $startingPos = $pos;
 381+ }
 382+ else if ($sum == 0) {
 383+ $stringToParse .= 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
 384+ $inner = htmlspecialchars(strtr(substr($text, $startingPos, $pos - $startingPos + 19), $strtr));
 385+ $this->fck_mw_strtr_span['href="Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw"'] = 'href="'.$inner.'"';
 386+ $this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class="fck_mw_template">'.str_replace(array("\r\n", "\n", "\r"),"fckLR",$inner).'</span>';
 387+ $startingPos = $pos + 19;
 388+ $this->fck_mw_strtr_span_counter++;
 389+ }
 390+ $lastSum = $sum;
 391+ }
 392+ $stringToParse .= substr($text, $startingPos);
 393+ $text = &$stringToParse;
 394+ }
 395+
 396+ return $text;
 397+ }
 398+
 399+ function internalParse ( $text ) {
 400+
 401+ $this->fck_internal_parse_text =& $text;
 402+
 403+ //these three tags should remain unchanged
 404+ $text = StringUtils::delimiterReplaceCallback( '<includeonly>', '</includeonly>', array($this, 'fck_includeonly'), $text );
 405+ $text = StringUtils::delimiterReplaceCallback( '<noinclude>', '</noinclude>', array($this, 'fck_noinclude'), $text );
 406+ $text = StringUtils::delimiterReplaceCallback( '<onlyinclude>', '</onlyinclude>', array($this, 'fck_onlyinclude'), $text );
 407+
 408+ //html comments shouldn't be stripped
 409+ $text = $this->fck_replaceHTMLcomments( $text );
 410+ //as well as templates
 411+ $text = $this->fck_replaceTemplates( $text );
 412+
 413+ $finalString = parent::internalParse($text);
 414+
 415+ return $finalString;
 416+ }
 417+ function fck_includeonly( $matches ) {
 418+ return $this->fck_wikiTag('includeonly', $matches[1]);
 419+ }
 420+ function fck_noinclude( $matches ) {
 421+ return $this->fck_wikiTag('noinclude', $matches[1]);
 422+ }
 423+ function fck_onlyinclude( $matches ) {
 424+ return $this->fck_wikiTag('onlyinclude', $matches[1]);
 425+ }
 426+ function fck_leaveTemplatesAlone( $matches ) {
 427+ return "<!--FCK_SKIP_START-->".$matches['text']."<!--FCK_SKIP_END-->";
 428+ }
 429+ function formatHeadings( $text, $isMain=true ) {
 430+ return $text;
 431+ }
 432+ function replaceFreeExternalLinks( $text ) { return $text; }
 433+ function stripNoGallery( &$text) {}
 434+ function stripToc( $text ) {
 435+ //$prefix = '<span class="fck_mw_magic">';
 436+ //$suffix = '</span>';
 437+ $prefix = '';
 438+ $suffix = '';
 439+
 440+ $strtr = array();
 441+ foreach ($this->FCKeditorMagicWords as $word) {
 442+ $strtr[$word] = $prefix . $word . $suffix;
 443+ }
 444+
 445+ return strtr( $text, $strtr );
 446+ }
 447+
 448+ function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
 449+ $text = preg_replace("/^#REDIRECT/", "<!--FCK_REDIRECT-->", $text);
 450+ $parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );
 451+
 452+ $categories = $parserOutput->getCategories();
 453+ if ($categories) {
 454+ $appendString = "";
 455+ foreach ($categories as $cat=>$val) {
 456+ $appendString .= "<a href=\"Category:" . $cat ."\">Category:" . $cat ."</a> ";
 457+ }
 458+ $parserOutput->setText($parserOutput->getText() . $appendString);
 459+ }
 460+
 461+ if (!empty($this->fck_mw_strtr_span)) {
 462+ $parserOutput->setText(strtr($parserOutput->getText(), $this->fck_mw_strtr_span));
 463+ }
 464+ if (!empty($this->fck_matches)) {
 465+ $text = $parserOutput->getText() ;
 466+ foreach ($this->fck_matches as $key => $m) {
 467+ $text = str_replace( $key, $m[3], $text);
 468+ }
 469+ $parserOutput->setText($text);
 470+ }
 471+
 472+ if (!empty($parserOutput->mLanguageLinks)) {
 473+ foreach ($parserOutput->mLanguageLinks as $l) {
 474+ $parserOutput->setText($parserOutput->getText() . "\n" . "<a href=\"".$l."\">".$l."</a>") ;
 475+ }
 476+ }
 477+
 478+ $parserOutput->setText(str_replace("<!--FCK_REDIRECT-->", "#REDIRECT", $parserOutput->getText()));
 479+
 480+ return $parserOutput;
 481+ }
 482+
 483+ /**
 484+ * Make lists from lines starting with ':', '*', '#', etc.
 485+ *
 486+ * @private
 487+ * @return string the lists rendered as HTML
 488+ */
 489+ function doBlockLevels( $text, $linestart ) {
 490+ $fname = 'Parser::doBlockLevels';
 491+ wfProfileIn( $fname );
 492+
 493+ # Parsing through the text line by line. The main thing
 494+ # happening here is handling of block-level elements p, pre,
 495+ # and making lists from lines starting with * # : etc.
 496+ #
 497+ $textLines = explode( "\n", $text );
 498+
 499+ $lastPrefix = $output = '';
 500+ $this->mDTopen = $inBlockElem = false;
 501+ $prefixLength = 0;
 502+ $paragraphStack = false;
 503+
 504+ if ( !$linestart ) {
 505+ $output .= array_shift( $textLines );
 506+ }
 507+ foreach ( $textLines as $oLine ) {
 508+ $lastPrefixLength = strlen( $lastPrefix );
 509+ $preCloseMatch = preg_match('/<\\/pre/i', $oLine );
 510+ $preOpenMatch = preg_match('/<pre/i', $oLine );
 511+ if ( !$this->mInPre ) {
 512+ # Multiple prefixes may abut each other for nested lists.
 513+ $prefixLength = strspn( $oLine, '*#:;' );
 514+ $pref = substr( $oLine, 0, $prefixLength );
 515+
 516+ # eh?
 517+ $pref2 = str_replace( ';', ':', $pref );
 518+ $t = substr( $oLine, $prefixLength );
 519+ $this->mInPre = !empty($preOpenMatch);
 520+ } else {
 521+ # Don't interpret any other prefixes in preformatted text
 522+ $prefixLength = 0;
 523+ $pref = $pref2 = '';
 524+ $t = $oLine;
 525+ }
 526+
 527+ # List generation
 528+ if( $prefixLength && 0 == strcmp( $lastPrefix, $pref2 ) ) {
 529+ # Same as the last item, so no need to deal with nesting or opening stuff
 530+ $output .= $this->nextItem( substr( $pref, -1 ) );
 531+ $paragraphStack = false;
 532+
 533+ if ( substr( $pref, -1 ) == ';') {
 534+ # The one nasty exception: definition lists work like this:
 535+ # ; title : definition text
 536+ # So we check for : in the remainder text to split up the
 537+ # title and definition, without b0rking links.
 538+ $term = $t2 = '';
 539+ if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 540+ $t = $t2;
 541+ $output .= $term . $this->nextItem( ':' );
 542+ }
 543+ }
 544+ } elseif( $prefixLength || $lastPrefixLength ) {
 545+ # Either open or close a level...
 546+ $commonPrefixLength = $this->getCommon( $pref, $lastPrefix );
 547+ $paragraphStack = false;
 548+
 549+ while( $commonPrefixLength < $lastPrefixLength ) {
 550+ $output .= $this->closeList( $lastPrefix{$lastPrefixLength-1} );
 551+ --$lastPrefixLength;
 552+ }
 553+ if ( $prefixLength <= $commonPrefixLength && $commonPrefixLength > 0 ) {
 554+ $output .= $this->nextItem( $pref{$commonPrefixLength-1} );
 555+ }
 556+ while ( $prefixLength > $commonPrefixLength ) {
 557+ $char = substr( $pref, $commonPrefixLength, 1 );
 558+ $output .= $this->openList( $char );
 559+
 560+ if ( ';' == $char ) {
 561+ # FIXME: This is dupe of code above
 562+ if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 563+ $t = $t2;
 564+ $output .= $term . $this->nextItem( ':' );
 565+ }
 566+ }
 567+ ++$commonPrefixLength;
 568+ }
 569+ $lastPrefix = $pref2;
 570+ }
 571+ if( 0 == $prefixLength ) {
 572+ wfProfileIn( "$fname-paragraph" );
 573+ # No prefix (not in list)--go to paragraph mode
 574+ // XXX: use a stack for nestable elements like span, table and div
 575+ $openmatch = preg_match('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
 576+ $closematch = preg_match(
 577+ '/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
 578+ '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol|<\\/?center)/iS', $t );
 579+ if ( $openmatch or $closematch ) {
 580+ $paragraphStack = false;
 581+ # TODO bug 5718: paragraph closed
 582+ $output .= $this->closeParagraph();
 583+ if ( $preOpenMatch and !$preCloseMatch ) {
 584+ $this->mInPre = true;
 585+ }
 586+ if ( $closematch ) {
 587+ $inBlockElem = false;
 588+ } else {
 589+ $inBlockElem = true;
 590+ }
 591+ } else if ( !$inBlockElem && !$this->mInPre ) {
 592+ if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim($t) != '' ) ) {
 593+ // pre
 594+ if ($this->mLastSection != 'pre') {
 595+ $paragraphStack = false;
 596+ $output .= $this->closeParagraph().'<pre class="_fck_mw_lspace">';
 597+ $this->mLastSection = 'pre';
 598+ }
 599+ $t = substr( $t, 1 );
 600+ } else {
 601+ // paragraph
 602+ if ( '' == trim($t) ) {
 603+ if ( $paragraphStack ) {
 604+ $output .= $paragraphStack.'<br />';
 605+ $paragraphStack = false;
 606+ $this->mLastSection = 'p';
 607+ } else {
 608+ if ($this->mLastSection != 'p' ) {
 609+ $output .= $this->closeParagraph();
 610+ $this->mLastSection = '';
 611+ $paragraphStack = '<p>';
 612+ } else {
 613+ $paragraphStack = '</p><p>';
 614+ }
 615+ }
 616+ } else {
 617+ if ( $paragraphStack ) {
 618+ $output .= $paragraphStack;
 619+ $paragraphStack = false;
 620+ $this->mLastSection = 'p';
 621+ } else if ($this->mLastSection != 'p') {
 622+ $output .= $this->closeParagraph().'<p>';
 623+ $this->mLastSection = 'p';
 624+ }
 625+ }
 626+ }
 627+ }
 628+ wfProfileOut( "$fname-paragraph" );
 629+ }
 630+ // somewhere above we forget to get out of pre block (bug 785)
 631+ if($preCloseMatch && $this->mInPre) {
 632+ $this->mInPre = false;
 633+ }
 634+ if ($paragraphStack === false) {
 635+ $output .= $t."\n";
 636+ }
 637+ }
 638+ while ( $prefixLength ) {
 639+ $output .= $this->closeList( $pref2{$prefixLength-1} );
 640+ --$prefixLength;
 641+ }
 642+ if ( '' != $this->mLastSection ) {
 643+ $output .= '</' . $this->mLastSection . '>';
 644+ $this->mLastSection = '';
 645+ }
 646+
 647+ wfProfileOut( $fname );
 648+ return $output;
 649+ }
 650+}
Property changes on: trunk/extensions/FCKeditor/mw12/FCKeditorParser_OldPP.body.php
___________________________________________________________________
Added: svn:eol-style
1651 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.nl.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => 'Uitgebreide editor',
 6+ 'tog-riched_disable' => 'Uitgebreide editor uitschakelen',
 7+ 'tog-riched_disable_ns_main' => 'Uitgebreide editor uitschakelen binnen de hoofdnaamruimte',
 8+ 'tog-riched_disable_ns_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Talk}}"',
 9+ 'tog-riched_disable_ns_user' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User}}"',
 10+ 'tog-riched_disable_ns_user_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User_talk}}"',
 11+ 'tog-riched_disable_ns_project' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project}}"',
 12+ 'tog-riched_disable_ns_project_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project_talk}}"',
 13+ 'tog-riched_disable_ns_image' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image}}"',
 14+ 'tog-riched_disable_ns_image_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image_talk}}"',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki}}"',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki_talk}}"',
 17+ 'tog-riched_disable_ns_template' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template}}"',
 18+ 'tog-riched_disable_ns_template_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template_talk}}"',
 19+ 'tog-riched_disable_ns_help' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help}}"',
 20+ 'tog-riched_disable_ns_help_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help_talk}}"',
 21+ 'tog-riched_disable_ns_category' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category}}"',
 22+ 'tog-riched_disable_ns_category_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category_talk}}"',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.nl.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/css/fckeditor.css
@@ -1649,3 +1649,8 @@
16501650 width: 25px;
16511651 overflow: hidden ;
16521652 }
 1653+
 1654+img.fck_mw_border
 1655+{
 1656+ border: 1px solid #dddddd;
 1657+}
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pl.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+'textrichditor' => 'Rich Editor',
 6+'tog-riched_disable' => 'Wyłącz Rich Editora',
 7+'tog-riched_disable_ns_main' => 'Wyłącz Rich Editora wewątrz głównej przestrzeni nazw',
 8+'tog-riched_disable_ns_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Talk}}"',
 9+'tog-riched_disable_ns_user' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User}}"',
 10+'tog-riched_disable_ns_user_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User_talk}}"',
 11+'tog-riched_disable_ns_project' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project}}"',
 12+'tog-riched_disable_ns_project_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project_talk}}"',
 13+'tog-riched_disable_ns_image' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image}}"',
 14+'tog-riched_disable_ns_image_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image_talk}}"',
 15+'tog-riched_disable_ns_mediawiki' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki}}"',
 16+'tog-riched_disable_ns_mediawiki_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki_talk}}"',
 17+'tog-riched_disable_ns_template' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template}}"',
 18+'tog-riched_disable_ns_template_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template_talk}}"',
 19+'tog-riched_disable_ns_help' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help}}"',
 20+'tog-riched_disable_ns_help_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help_talk}}"',
 21+'tog-riched_disable_ns_category' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category}}"',
 22+'tog-riched_disable_ns_category_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category_talk}}"',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.pl.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.hsb.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => 'Rich editor',
 6+ 'tog-riched_disable' => 'Rich editor deaktiwizować',
 7+ 'tog-riched_disable_ns_main' => 'Rich editor znutřka hłowneho mjenoweho ruma deaktiwizować',
 8+ 'tog-riched_disable_ns_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Talk}}" deaktiwizować',
 9+ 'tog-riched_disable_ns_user' => 'Rich editor znutřka mjenoweho ruma "{{ns:User}}" deaktiwizować',
 10+ 'tog-riched_disable_ns_user_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:User_talk}}" deaktiwizować',
 11+ 'tog-riched_disable_ns_project' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project}}" deaktiwizować',
 12+ 'tog-riched_disable_ns_project_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project_talk}}" deaktiwizować',
 13+ 'tog-riched_disable_ns_image' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image}}" deaktiwizować',
 14+ 'tog-riched_disable_ns_image_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image_talk}}" deaktiwizować',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki}}" deaktiwizować',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki_talk}}" deaktiwizować',
 17+ 'tog-riched_disable_ns_template' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template}}" deaktiwizować',
 18+ 'tog-riched_disable_ns_template_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template_talk}}" deaktiwizować',
 19+ 'tog-riched_disable_ns_help' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help}}" deaktiwizować',
 20+ 'tog-riched_disable_ns_help_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help_talk}}" deaktiwizować',
 21+ 'tog-riched_disable_ns_category' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category}}" deaktiwizować',
 22+ 'tog-riched_disable_ns_category_talk' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category_talk}}" deaktiwizować',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.hsb.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.no.php
@@ -0,0 +1,19 @@
 2+<?php
 3+$messages = array(
 4+ 'textrichditor' => 'Rik tekstredigering',
 5+ 'tog-riched_disable' => 'Slå av rik tekstredigering',
 6+ 'tog-riched_disable_ns_main' => 'Slå av rik tekstredigering i hovednavnerommet',
 7+ 'tog-riched_disable_ns_talk' => 'Slå av rik tekstredigering i «{{ns:Talk}}»-navnerommet',
 8+ 'tog-riched_disable_ns_user' => 'Slå av rik tekstredigering i «{{ns:User}}»-navnerommet',
 9+ 'tog-riched_disable_ns_user_talk' => 'Slå av rik tekstredigering i «{{ns:User_talk}}»-navnerommet',
 10+ 'tog-riched_disable_ns_project' => 'Slå av rik tekstredigering i «{{ns:Project}}»-navnerommet',
 11+ 'tog-riched_disable_ns_project_talk' => 'Slå av rik tekstredigering i «{{ns:Project_talk}}»-navnerommet',
 12+ 'tog-riched_disable_ns_image' => 'Slå av rik tekstredigering i «{{ns:Image}}»-navnerommet',
 13+ 'tog-riched_disable_ns_image_talk' => 'Slå av rik tekstredigering i «{{ns:Image_talk}}»-navnerommet',
 14+ 'tog-riched_disable_ns_template' => 'Slå av rik tekstredigering i «{{ns:Template}}»-navnerommet',
 15+ 'tog-riched_disable_ns_template_talk' => 'Slå av rik tekstredigering i «{{ns:Template_talk}}»-navnerommet',
 16+ 'tog-riched_disable_ns_help' => 'Slå av rik tekstredigering i «{{ns:Help}}»-navnerommet',
 17+ 'tog-riched_disable_ns_help_talk' => 'Slå av rik tekstredigering i «{{ns:Help_talk}}»-navnerommet',
 18+ 'tog-riched_disable_ns_category' => 'Slå av rik tekstredigering i «{{ns:Category}}»-navnerommet',
 19+ 'tog-riched_disable_ns_category_talk' => 'Slå av rik tekstredigering i «{{ns:Category_talk}}»-navnerommet',
 20+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.no.php
___________________________________________________________________
Added: svn:eol-style
121 + native
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.sk.php
@@ -0,0 +1,21 @@
 2+<?php
 3+$messages = array(
 4+ 'textrichditor' => 'Editor formátovaného textu',
 5+ 'tog-riched_disable' => 'Vypnúť editor formátovaného textu',
 6+ 'tog-riched_disable_ns_main' => 'Vypnúť editor formátovaného textu v hlavnom mennom priestore',
 7+ 'tog-riched_disable_ns_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Talk}}“',
 8+ 'tog-riched_disable_ns_user' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User}}“',
 9+ 'tog-riched_disable_ns_user_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User_talk}}“',
 10+ 'tog-riched_disable_ns_project' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project}}“',
 11+ 'tog-riched_disable_ns_project_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project_talk}}“',
 12+ 'tog-riched_disable_ns_image' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image}}“',
 13+ 'tog-riched_disable_ns_image_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image_talk}}“',
 14+ 'tog-riched_disable_ns_mediawiki' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki}}“',
 15+ 'tog-riched_disable_ns_mediawiki_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki_talk}}“',
 16+ 'tog-riched_disable_ns_template' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template}}“',
 17+ 'tog-riched_disable_ns_template_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template_talk}}“',
 18+ 'tog-riched_disable_ns_help' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help}}“',
 19+ 'tog-riched_disable_ns_help_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help_talk}}“',
 20+ 'tog-riched_disable_ns_category' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category}}“',
 21+ 'tog-riched_disable_ns_category_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category_talk}}“',
 22+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.sk.php
___________________________________________________________________
Added: svn:eol-style
123 + native
Index: trunk/extensions/FCKeditor/FCKeditor.body.php
@@ -2,163 +2,251 @@
33
44 class FCKeditor_MediaWiki
55 {
6 - private $count = array();
7 - private $wgFCKBypassText = "";
8 - private $debug = 0;
9 - private $excludedNamespaces;
10 - static $nsToggles = array(
11 - 'riched_disable_ns_main',
12 - 'riched_disable_ns_talk',
13 - 'riched_disable_ns_user',
14 - 'riched_disable_ns_user_talk',
15 - 'riched_disable_ns_project',
16 - 'riched_disable_ns_project_talk',
17 - 'riched_disable_ns_image',
18 - 'riched_disable_ns_image_talk',
19 - 'riched_disable_ns_mediawiki',
20 - 'riched_disable_ns_mediawiki_talk',
21 - 'riched_disable_ns_template',
22 - 'riched_disable_ns_template_talk',
23 - 'riched_disable_ns_help',
24 - 'riched_disable_ns_help_talk',
25 - 'riched_disable_ns_category',
26 - 'riched_disable_ns_category_talk',
27 - );
 6+ private $count = array();
 7+ private $wgFCKBypassText = "";
 8+ private $debug = 0;
 9+ private $excludedNamespaces;
 10+ private $oldTextBox1;
 11+ static $nsToggles = array(
 12+ 'riched_disable_ns_main',
 13+ 'riched_disable_ns_talk',
 14+ 'riched_disable_ns_user',
 15+ 'riched_disable_ns_user_talk',
 16+ 'riched_disable_ns_project',
 17+ 'riched_disable_ns_project_talk',
 18+ 'riched_disable_ns_image',
 19+ 'riched_disable_ns_image_talk',
 20+ 'riched_disable_ns_mediawiki',
 21+ 'riched_disable_ns_mediawiki_talk',
 22+ 'riched_disable_ns_template',
 23+ 'riched_disable_ns_template_talk',
 24+ 'riched_disable_ns_help',
 25+ 'riched_disable_ns_help_talk',
 26+ 'riched_disable_ns_category',
 27+ 'riched_disable_ns_category_talk',
 28+ );
2829
29 - static $messagesLoaded = false;
 30+ static $messagesLoaded = false;
3031
31 - function __call($m,$a)
32 - {
33 - print "\n#### " . $m . "\n";
34 - if (!isset($this->count[$m])) {
35 - $this->count[$m] = 0;
36 - }
37 - $this->count[$m]++;
38 - return true;
39 - }
 32+ function __call($m,$a)
 33+ {
 34+ print "\n#### " . $m . "\n";
 35+ if (!isset($this->count[$m])) {
 36+ $this->count[$m] = 0;
 37+ }
 38+ $this->count[$m]++;
 39+ return true;
 40+ }
4041
41 - function onMonoBookTemplateToolboxEnd()
42 - {
43 - if ($this->debug) {
44 - print_r($this->count);
45 - }
46 - }
 42+ function onMonoBookTemplateToolboxEnd()
 43+ {
 44+ if ($this->debug) {
 45+ print_r($this->count);
 46+ }
 47+ }
4748
48 - private function getExcludedNamespaces()
49 - {
50 - global $wgUser;
 49+ private function getExcludedNamespaces()
 50+ {
 51+ global $wgUser;
5152
52 - if ( is_null( $this->excludedNamespaces ) ) {
53 - $this->excludedNamespaces = array();
54 - foreach ( self::$nsToggles as $toggle ) {
55 - if ( $wgUser->getOption( $toggle ) ) {
56 - $this->excludedNamespaces[] = constant(strtoupper(str_replace("riched_disable_", "", $toggle)));
57 - }
58 - }
59 - }
 53+ if ( is_null( $this->excludedNamespaces ) ) {
 54+ $this->excludedNamespaces = array();
 55+ foreach ( self::$nsToggles as $toggle ) {
 56+ if ( $wgUser->getOption( $toggle ) ) {
 57+ $this->excludedNamespaces[] = constant(strtoupper(str_replace("riched_disable_", "", $toggle)));
 58+ }
 59+ }
 60+ }
6061
61 - return $this->excludedNamespaces;
62 - }
 62+ return $this->excludedNamespaces;
 63+ }
6364
64 - public function registerHooks() {
65 - global $wgHooks;
 65+ public function onLanguageGetMagic(&$magicWords, $langCode)
 66+ {
 67+ $magicWords['NORICHEDITOR'] = array( 0, '__NORICHEDITOR__' );
 68+
 69+ return true;
 70+ }
 71+
 72+ public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state)
 73+ {
 74+ MagicWord::get( 'NORICHEDITOR' )->matchAndRemove( $text );
 75+
 76+ return true;
 77+ }
6678
67 - $wgHooks['UserToggles'][] = array($this, 'onUserToggles');
68 - $wgHooks['MessagesPreLoad'][] = array($this, 'onMessagesPreLoad');
69 - $wgHooks['ParserAfterTidy'][] = array($this, 'onParserAfterTidy');
70 - $wgHooks['EditPage::showEditForm:initial'][] = array($this, 'onEditPageShowEditFormInitial');
 79+ public function registerHooks() {
 80+ global $wgHooks, $wgExtensionFunctions;
7181
72 - if ($this->debug) {
73 - $opcje = array('ArticleSave',
74 - 'ArticleInsertComplete', 'ArticleSaveComplete', 'TitleMoveComplete', 'ArticleProtect', 'ArticleProtectComplete', 'ArticleDelete', 'ArticleDeleteComplete', 'AlternateEdit', 'ArticleFromTitle', 'ArticleAfterFetchContent',
75 - 'ArticlePageDataBefore', 'ArticlePageDataAfter', 'ParserBeforeStrip', 'ParserAfterStrip', 'ParserBeforeInternalParse', 'InternalParseBeforeLinks', 'ParserBeforeTidy', 'ParserAfterTidy', 'ParserClearState', 'ParserGetVariableValueSwitch',
76 - 'ParserGetVariableValueTs', 'ParserGetVariableValueVarCache', 'OutputPageBeforeHTML', 'OutputPageParserOutput', 'CategoryPageView', 'PageRenderingHash', 'ArticleViewHeader', 'ArticleViewRedirect', 'editSectionLinkForOther', 'editSectionLink',
77 - 'AutoAuthenticate', 'UserLoginComplete', 'UserLogout', 'UserLogoutComplete', 'userCan', 'WatchArticle', 'WatchArticleComplete', 'UnwatchArticle', 'UnwatchArticleComplete', 'MarkPatrolled',
78 - 'MarkPatrolledComplete', 'EmailUser', 'EmailUserComplete', 'UploadVerification', 'UploadComplete', 'SpecialMovepageAfterMove', 'SpecialSearchNogomatch', 'ArticleEditUpdateNewTalk', 'UserRetrieveNewTalks', 'UserClearNewTalkNotification',
79 - 'ArticlePurge', 'SpecialPageGetRedirect', 'SpecialPageExecuteBeforeHeader', 'SpecialPageExecuteBeforePage', 'SpecialPageExecuteAfterPage', 'SpecialVersionExtensionTypes', 'SpecialPage_initList', 'UploadForm:initial', 'UploadForm:BeforeProcessing', 'AddNewAccount',
80 - 'AbortNewAccount', 'BlockIp', 'BlockIpComplete', 'UserRights', 'GetBlockedStatus', 'LogPageActionText', 'LogPageLogHeader', 'LogPageLogName', 'LogPageValidTypes', 'BeforePageDisplay',
81 - 'MonoBookTemplateToolboxEnd', 'PersonalUrls', 'SkinTemplateContentActions', 'SkinTemplateTabs', 'SkinTemplatePreventOtherActiveTabs', 'SkinTemplateSetupPageCss', 'SkinTemplateBuildContentActionUrlsAfterSpecialPage', 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', 'UserCreateForm', 'UserLoginForm',
82 - 'ArticleEditUpdatesDeleteFromRecentchanges', 'EditFilter', 'EditPage::showEditForm:initial', 'GetInternalURL', 'GetLocalURL', 'GetFullURL', 'LanguageGetMagic', 'MagicWordMagicWords', 'MagicWordwgVariableIDs', 'MessagesPreLoad',
83 - 'ParserTestParser', 'SpecialContributionsBeforeMainOutput', 'UnknownAction', 'wgQueryPages', 'DisplayOldSubtitle', 'LoadAllMessages', 'RecentChange_save', 'UserToggles', 'BadImage', 'DiffViewHeader',
84 - 'EditFormPreloadText', 'EmailConfirmed', 'FetchChangesList', 'MathAfterTexvc', 'SiteNoticeAfter', 'SiteNoticeBefore');
 82+ $wgHooks['UserToggles'][] = array($this, 'onUserToggles');
 83+ $wgHooks['MessagesPreLoad'][] = array($this, 'onMessagesPreLoad');
 84+ $wgHooks['ParserAfterTidy'][] = array($this, 'onParserAfterTidy');
 85+ $wgHooks['EditPage::showEditForm:initial'][] = array($this, 'onEditPageShowEditFormInitial');
 86+ $wgHooks['EditPageBeforePreviewText'][] = array($this, 'onEditPageBeforePreviewText');
 87+ $wgHooks['EditPagePreviewTextEnd'][] = array($this, 'onEditPagePreviewTextEnd');
 88+ $wgHooks['CustomEditor'][] = array($this, 'onCustomEditor');
 89+ $wgHooks['LanguageGetMagic'][] = array($this, "onLanguageGetMagic");
 90+ $wgHooks['ParserBeforeInternalParse'][] = array($this, "onParserBeforeInternalParse");
8591
86 - foreach ($opcje as $o) {
87 - $wgHooks[$o][] = $this;
88 - }
89 - }
90 - }
 92+ if ($this->debug) {
 93+ $opcje = array('ArticleSave',
 94+ 'ArticleInsertComplete', 'ArticleSaveComplete', 'TitleMoveComplete', 'ArticleProtect', 'ArticleProtectComplete', 'ArticleDelete', 'ArticleDeleteComplete', 'AlternateEdit', 'ArticleFromTitle', 'ArticleAfterFetchContent',
 95+ 'ArticlePageDataBefore', 'ArticlePageDataAfter', 'ParserBeforeStrip', 'ParserAfterStrip', 'ParserBeforeInternalParse', 'InternalParseBeforeLinks', 'ParserBeforeTidy', 'ParserAfterTidy', 'ParserClearState', 'ParserGetVariableValueSwitch',
 96+ 'ParserGetVariableValueTs', 'ParserGetVariableValueVarCache', 'OutputPageBeforeHTML', 'OutputPageParserOutput', 'CategoryPageView', 'PageRenderingHash', 'ArticleViewHeader', 'ArticleViewRedirect', 'editSectionLinkForOther', 'editSectionLink',
 97+ 'AutoAuthenticate', 'UserLoginComplete', 'UserLogout', 'UserLogoutComplete', 'userCan', 'WatchArticle', 'WatchArticleComplete', 'UnwatchArticle', 'UnwatchArticleComplete', 'MarkPatrolled',
 98+ 'MarkPatrolledComplete', 'EmailUser', 'EmailUserComplete', 'UploadVerification', 'UploadComplete', 'SpecialMovepageAfterMove', 'SpecialSearchNogomatch', 'ArticleEditUpdateNewTalk', 'UserRetrieveNewTalks', 'UserClearNewTalkNotification',
 99+ 'ArticlePurge', 'SpecialPageGetRedirect', 'SpecialPageExecuteBeforeHeader', 'SpecialPageExecuteBeforePage', 'SpecialPageExecuteAfterPage', 'SpecialVersionExtensionTypes', 'SpecialPage_initList', 'UploadForm:initial', 'UploadForm:BeforeProcessing', 'AddNewAccount',
 100+ 'AbortNewAccount', 'BlockIp', 'BlockIpComplete', 'UserRights', 'GetBlockedStatus', 'LogPageActionText', 'LogPageLogHeader', 'LogPageLogName', 'LogPageValidTypes', 'BeforePageDisplay',
 101+ 'MonoBookTemplateToolboxEnd', 'PersonalUrls', 'SkinTemplateContentActions', 'SkinTemplateTabs', 'SkinTemplatePreventOtherActiveTabs', 'SkinTemplateSetupPageCss', 'SkinTemplateBuildContentActionUrlsAfterSpecialPage', 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', 'UserCreateForm', 'UserLoginForm',
 102+ 'ArticleEditUpdatesDeleteFromRecentchanges', 'EditFilter', 'EditPage::showEditForm:initial', 'GetInternalURL', 'GetLocalURL', 'GetFullURL', 'LanguageGetMagic', 'MagicWordMagicWords', 'MagicWordwgVariableIDs', 'MessagesPreLoad',
 103+ 'ParserTestParser', 'SpecialContributionsBeforeMainOutput', 'UnknownAction', 'wgQueryPages', 'DisplayOldSubtitle', 'LoadAllMessages', 'RecentChange_save', 'UserToggles', 'BadImage', 'DiffViewHeader',
 104+ 'EditFormPreloadText', 'EmailConfirmed', 'FetchChangesList', 'MathAfterTexvc', 'SiteNoticeAfter', 'SiteNoticeBefore');
91105
92 - public function onParserAfterTidy(&$parser, &$text)
93 - {
94 - global $wgUseTeX, $wgUser, $wgTitle, $wgFCKEditorIsCompatible;
 106+ foreach ($opcje as $o) {
 107+ $wgHooks[$o][] = array($this, str_replace(":", "_", $o));
 108+ }
 109+ }
 110+ }
95111
96 - if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) {
97 - return true;
98 - }
 112+ public function onCustomEditor(&$article, &$user)
 113+ {
 114+ global $wgRequest, $mediaWiki;
99115
100 - if (is_object($wgTitle) && in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
101 - return true;
102 - }
 116+ $action = $mediaWiki->getVal('Action');
103117
104 - if ($wgUseTeX) {
105 - //it may add much overload on page with huge amount of math content...
 118+ $internal = $wgRequest->getVal( 'internaledit' );
 119+ $external = $wgRequest->getVal( 'externaledit' );
 120+ $section = $wgRequest->getVal( 'section' );
 121+ $oldid = $wgRequest->getVal( 'oldid' );
 122+ if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
 123+ $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
 124+ $editor = new FCKeditorEditPage( $article );
 125+ $editor->submit();
 126+ } elseif( $mediaWiki->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
 127+ $mode = $wgRequest->getVal( 'mode' );
 128+ $extedit = new ExternalEdit( $article, $mode );
 129+ $extedit->edit();
 130+ }
 131+
 132+ return false;
 133+ }
 134+
 135+ public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen)
 136+ {
 137+ global $wgUser, $wgRequest;
 138+
 139+ if ($wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
 140+ $this->oldTextBox1 = $editPage->textbox1;
 141+ $editPage->importFormData( $wgRequest );
 142+ }
 143+
 144+ return true;
 145+ }
 146+
 147+ public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen)
 148+ {
 149+ global $wgUser;
 150+
 151+ if ($wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
 152+ $editPage->textbox1 = $this->oldTextBox1;
 153+ }
 154+
 155+ return true;
 156+ }
 157+
 158+ public function onParserAfterTidy(&$parser, &$text)
 159+ {
 160+ global $wgUseTeX, $wgUser, $wgTitle, $wgFCKEditorIsCompatible;
 161+
 162+ if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) {
 163+ return true;
 164+ }
 165+
 166+ if (is_object($wgTitle) && in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
 167+ return true;
 168+ }
 169+
 170+ if ($wgUseTeX) {
 171+ //it may add much overload on page with huge amount of math content...
106172 $text = preg_replace('/<img class="tex" alt="([^"]*)"/m', '<img _fckfakelement="true" _fck_mw_math="$1"', $text);
107173 $text = preg_replace("/<img class='tex' src=\"([^\"]*)\" alt=\"([^\"]*)\"/m", '<img src="$1" _fckfakelement="true" _fck_mw_math="$2"', $text);
108 - }
 174+ }
109175
110 - return true;
111 - }
 176+ return true;
 177+ }
112178
113 - public function onMessagesPreLoad()
114 - {
115 - wfLoadExtensionMessages( 'FCKeditor' );
 179+ public function onMessagesPreLoad()
 180+ {
 181+ global $wgMessageCache, $wgUser, $wgContLanguageCode;
116182
117 - return true;
118 - }
 183+ if ( !self::$messagesLoaded ) {
 184+ $lang = $wgUser->getOption( 'language', $wgContLanguageCode );
 185+ $i18nfile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR .'FCKeditor.i18n.' . $lang . '.php';
119186
120 - /**
121 - * Add FCK script
122 - *
123 - * @param unknown_type $q
124 - * @return unknown
125 - */
126 - public function onEditPageShowEditFormInitial( $form ) {
127 - global $wgOut, $wgTitle, $wgScriptPath;
128 - global $wgFCKEditorToolbarSet, $wgFCKEditorIsCompatible;
129 - global $wgFCKEditorExtDir, $wgFCKEditorDir, $wgFCKEditorHeight, $wgUser;
130 - global $wgStylePath, $wgStyleVersion, $wgDefaultSkin, $wgExtensionFunctions;
 187+ if ( file_exists( $i18nfile ) ) {
 188+ require( $i18nfile );
 189+ } else {
 190+ $lang = 'en';
 191+ require( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .'FCKeditor.i18n.en.php' );
 192+ }
131193
132 - if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) {
133 - return true;
134 - }
 194+ $wgMessageCache->addMessages( $messages, $lang );
 195+ self::$messagesLoaded = true;
 196+ }
135197
136 - if (in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
137 - return true;
138 - }
 198+ return true;
 199+ }
139200
140 - $options = new FCKeditorParserOptions();
141 - $options->setTidy(true);
142 - $parser = new FCKeditorParser();
143 - $parser->setOutputType(OT_HTML);
144 - $form->textbox1 = $parser->parse($form->textbox1, $wgTitle, $options)->getText();
 201+ /**
 202+ * Add FCK script
 203+ *
 204+ * @param unknown_type $q
 205+ * @return unknown
 206+ */
 207+ public function onEditPageShowEditFormInitial( $form ) {
 208+ global $wgOut, $wgTitle, $wgScriptPath;
 209+ global $wgFCKEditorToolbarSet, $wgFCKEditorIsCompatible;
 210+ global $wgFCKEditorExtDir, $wgFCKEditorDir, $wgFCKEditorHeight, $wgUser;
 211+ global $wgStylePath, $wgStyleVersion, $wgDefaultSkin, $wgExtensionFunctions;
145212
146 - $printsheet = htmlspecialchars( "$wgStylePath/common/wikiprintable.css?$wgStyleVersion" );
 213+ if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) {
 214+ return true;
 215+ }
147216
148 - //CSS trick, we need to get user CSS stylesheets somehow... it must be done in a different way!
149 - $skin = $wgUser->getSkin();
150 - $skin->loggedin = $wgUser->isLoggedIn();
151 - $skin->mTitle =& $wgTitle;
152 - $skin->skinname = 'monobook';
153 - $skin->userpage = $wgUser->getUserPage()->getPrefixedText();
154 - $skin->setupUserCss();
 217+ if (in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
 218+ return true;
 219+ }
155220
156 - preg_match_all('/@import "([^"]+)";/', $skin->usercss, $matches);
157 - $userStyles = $matches[1];
158 - //End of CSS trick
 221+ if (false !== strpos($form->textbox1, "__NORICHEDITOR__")) {
 222+ return true;
 223+ }
159224
160 - $script = <<<HEREDOC
 225+ $options = new FCKeditorParserOptions();
 226+ $options->setTidy(true);
 227+ $parser = new FCKeditorParser();
 228+ $parser->setOutputType(OT_HTML);
 229+ $form->textbox1 = $parser->parse($form->textbox1, $wgTitle, $options)->getText();
 230+
 231+ $printsheet = htmlspecialchars( "$wgStylePath/common/wikiprintable.css?$wgStyleVersion" );
 232+
 233+ //CSS trick, we need to get user CSS stylesheets somehow... it must be done in a different way!
 234+ $skin = $wgUser->getSkin();
 235+ $skin->loggedin = $wgUser->isLoggedIn();
 236+ $skin->mTitle =& $wgTitle;
 237+ //$skin->skinname = 'monobook';
 238+ $skin->userpage = $wgUser->getUserPage()->getPrefixedText();
 239+ if (method_exists($skin, "setupUserCss")) {
 240+ $skin->setupUserCss();
 241+ }
 242+
 243+ if (!empty($skin->usercss) && preg_match_all('/@import "([^"]+)";/', $skin->usercss, $matches)) {
 244+ $userStyles = $matches[1];
 245+ }
 246+ //End of CSS trick
 247+
 248+ $script = <<<HEREDOC
161249 <script type="text/javascript" src="$wgScriptPath/$wgFCKEditorDir/fckeditor.js"></script>
162 -<script type="text/javascript">
 250+<script type="text/javascript">
163251 var sEditorAreaCSS = '$printsheet,/mediawiki/skins/monobook/main.css?{$wgStyleVersion}';
164252 </script>
165253 <!--[if lt IE 5.5000]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IE50Fixes.css?{$wgStyleVersion}'; </script><![endif]-->
@@ -168,22 +256,22 @@
169257 <!--[if lt IE 7]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IEFixes.css?{$wgStyleVersion}'; </script><![endif]-->
170258 HEREDOC;
171259
172 - if (!is_null($userStyles) && !empty($userStyles)) {
173 - $script .= '
174 -<script type="text/javascript">
 260+ if (!empty($userStyles)) {
 261+ $script .= '
 262+<script type="text/javascript">
175263 sEditorAreaCSS += ",'.implode(',', $userStyles).'";
176264 </script>';
177 - }
 265+ }
178266
179 - $script .= <<<HEREDOC
180 -<script type="text/javascript">
 267+ $script .= <<<HEREDOC
 268+<script type="text/javascript">
181269
182270 // Remove the mwSetupToolbar onload hook to avoid a JavaScript error with FF.
183271 if ( window.removeEventListener )
184272 window.removeEventListener( 'load', mwSetupToolbar, false ) ;
185273 else if ( window.detachEvent )
186274 window.detachEvent( 'onload', mwSetupToolbar ) ;
187 -
 275+
188276 mwSetupToolbar = function() { return false ; } ;
189277
190278 function onLoadFCKeditor()
@@ -191,12 +279,12 @@
192280 if ( document.getElementById('wpTextbox1') )
193281 {
194282 var height = $wgFCKEditorHeight ;
195 -
 283+
196284 if ( height == 0 )
197 - {
 285+ {
198286 // Get the window (inner) size.
199287 var height = window.innerHeight || ( document.documentElement && document.documentElement.clientHeight ) || 550 ;
200 -
 288+
201289 // Reduce the height to the offset of the toolbar.
202290 var offset = document.getElementById('wikiPreview') || document.getElementById('toolbar') ;
203291 while ( offset )
@@ -204,14 +292,14 @@
205293 height -= offset.offsetTop ;
206294 offset = offset.offsetParent ;
207295 }
208 -
 296+
209297 // Add a small space to be left in the bottom.
210298 height -= 20 ;
211299 }
212300
213301 // Enforce a minimum height.
214302 height = ( !height || height < 300 ) ? 300 : height ;
215 -
 303+
216304 // Create the editor instance and replace the textarea.
217305 var oFCKeditor = new FCKeditor('wpTextbox1') ;
218306 oFCKeditor.BasePath = '$wgScriptPath/$wgFCKEditorDir/' ;
@@ -220,7 +308,7 @@
221309 oFCKeditor.Height = height ;
222310 oFCKeditor.ToolbarSet = '$wgFCKEditorToolbarSet' ;
223311 oFCKeditor.ReplaceTextarea() ;
224 -
 312+
225313 // Hide the default toolbar.
226314 document.getElementById('toolbar').style.cssText = 'display:none;' ;
227315 }
@@ -229,17 +317,17 @@
230318
231319 /*
232320 function showSource() {
233 - var wp = document.getElementById("wpDiff");
234 - var s = document.createElement("input");
235 - s.type="submit";
236 - s.value="Wiki2HTML";
237 - s.name="Wiki2HTML";
238 - s.onclick = function wiki2html() {
239 - var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
240 - WikiToHTML_Call();
241 - return false;
242 - }
243 - wp.parentNode.insertBefore(s, wp.nextSibling);
 321+ var wp = document.getElementById("wpDiff");
 322+ var s = document.createElement("input");
 323+ s.type="submit";
 324+ s.value="Wiki2HTML";
 325+ s.name="Wiki2HTML";
 326+ s.onclick = function wiki2html() {
 327+ var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
 328+ WikiToHTML_Call();
 329+ return false;
 330+ }
 331+ wp.parentNode.insertBefore(s, wp.nextSibling);
244332 }
245333
246334 var sajax_debug_mode = false;
@@ -247,13 +335,13 @@
248336
249337 function WikiToHTML_Result(result)
250338 {
251 - var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
252 - oEditor.SetHTML(result.responseText);
 339+ var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
 340+ oEditor.SetHTML(result.responseText);
253341 }
254342 function WikiToHTML_Call()
255343 {
256 - var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
257 - sajax_do_call('wfSajaxWikiToHTML', [oEditor.GetHTML()], WikiToHTML_Result);
 344+ var oEditor = FCKeditorAPI.GetInstance('wpTextbox1');
 345+ sajax_do_call('wfSajaxWikiToHTML', [oEditor.GetHTML()], WikiToHTML_Result);
258346 }
259347
260348 addOnloadHook(showSource);
@@ -261,14 +349,14 @@
262350 </script>
263351 HEREDOC;
264352
265 - $wgOut->addScript($script);
 353+ $wgOut->addScript($script);
266354
267 - return true;
268 - }
 355+ return true;
 356+ }
269357
270 - public function onUserToggles( &$extraToggles ) {
271 - $extraToggles[] = 'riched_disable';
272 - $extraToggles = array_merge($extraToggles, self::$nsToggles);
273 - return true;
274 - }
 358+ public function onUserToggles( &$extraToggles ) {
 359+ $extraToggles[] = 'riched_disable';
 360+ $extraToggles = array_merge($extraToggles, self::$nsToggles);
 361+ return true;
 362+ }
275363 }
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pt.php
@@ -0,0 +1,21 @@
 2+<?php
 3+$messages = array(
 4+ 'textrichditor' => 'Editor Rico',
 5+ 'tog-riched_disable' => 'Desactivar editor rico',
 6+ 'tog-riched_disable_ns_main' => 'Desactivar editor rico no espaço nominal principal',
 7+ 'tog-riched_disable_ns_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Talk}}"',
 8+ 'tog-riched_disable_ns_user' => 'Desactivar editor rico no espaço nominal "{{ns:User}}"',
 9+ 'tog-riched_disable_ns_user_talk' => 'Desactivar editor rico no espaço nominal "{{ns:User_talk}}"',
 10+ 'tog-riched_disable_ns_project' => 'Desactivar editor rico no espaço nominal "{{ns:Project}}"',
 11+ 'tog-riched_disable_ns_project_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Project_talk}}"',
 12+ 'tog-riched_disable_ns_image' => 'Desactivar editor rico no espaço nominal "{{ns:Image}}"',
 13+ 'tog-riched_disable_ns_image_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Image_talk}}"',
 14+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki}}"',
 15+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki_talk}}"',
 16+ 'tog-riched_disable_ns_template' => 'Desactivar editor rico no espaço nominal "{{ns:Template}}"',
 17+ 'tog-riched_disable_ns_template_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Template_talk}}"',
 18+ 'tog-riched_disable_ns_help' => 'Desactivar editor rico no espaço nominal "{{ns:Help}}"',
 19+ 'tog-riched_disable_ns_help_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Help_talk}}"',
 20+ 'tog-riched_disable_ns_category' => 'Desactivar editor rico no espaço nominal "{{ns:Category}}"',
 21+ 'tog-riched_disable_ns_category_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Category_talk}}"',
 22+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.pt.php
___________________________________________________________________
Added: svn:eol-style
123 + native
Index: trunk/extensions/FCKeditor/FCKeditor.php
@@ -2,11 +2,11 @@
33
44 # Not a valid entry point, skip unless MEDIAWIKI is defined
55 if (!defined('MEDIAWIKI')) {
6 - echo <<<HEREDOC
 6+ echo <<<HEREDOC
77 To install my extension, put the following line in LocalSettings.php:
88 require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" );
99 HEREDOC;
10 - exit( 1 );
 10+ exit( 1 );
1111 }
1212
1313 /*
@@ -27,22 +27,36 @@
2828
2929 require_once $IP . "/includes/GlobalFunctions.php";
3030 require_once $IP . "/includes/ParserOptions.php";
31 -require_once $IP . "/includes/Parser.php";
 31+require_once $IP . "/includes/EditPage.php";
3232
33 -$dir = dirname(__FILE__) . '/';
34 -require_once $dir . "FCKeditorSajax.body.php";
35 -require_once $dir . "FCKeditorParser.body.php";
36 -require_once $dir . "FCKeditorParserOptions.body.php";
37 -require_once $dir . "FCKeditorSkin.body.php";
38 -require_once $dir . "FCKeditor.body.php";
39 -require_once $dir . "fckeditor" . DIRECTORY_SEPARATOR . "fckeditor.php";
 33+if (version_compare("1.12", $wgVersion, "<")) {
 34+ require_once $IP . "/includes/Parser_OldPP.php";
 35+ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParser_OldPP.body.php";
 36+}
 37+else {
 38+ require_once $IP . "/includes/Parser.php";
 39+ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParser.body.php";
 40+}
4041
41 -$wgExtensionMessagesFiles['FCKeditor'] = $dir . 'FCKeditor.i18n.php';
 42+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSajax.body.php";
 43+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParserOptions.body.php";
 44+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSkin.body.php";
 45+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorEditPage.body.php";
 46+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditor.body.php";
 47+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "fckeditor" . DIRECTORY_SEPARATOR . "fckeditor.php";
4248
43 -$wgFCKEditorExtDir = "extensions/FCKeditor";
44 -$wgFCKEditorDir = "extensions/FCKeditor/fckeditor";
45 -$wgFCKEditorToolbarSet = "Wiki";
46 -$wgFCKEditorHeight = "0"; // "0" for automatic ("300" minimum).
 49+if (empty ($wgFCKEditorExtDir)) {
 50+ $wgFCKEditorExtDir = "extensions/FCKeditor" ;
 51+}
 52+if (empty ($wgFCKEditorDir)) {
 53+ $wgFCKEditorDir = "extensions/FCKeditor/fckeditor" ;
 54+}
 55+if (empty ($wgFCKEditorToolbarSet)) {
 56+ $wgFCKEditorToolbarSet = "Wiki" ;
 57+}
 58+if (empty ($wgFCKEditorHeight)) {
 59+ $wgFCKEditorHeight = "0" ; // "0" for automatic ("300" minimum).
 60+}
4761
4862 /**
4963 * Enable use of AJAX features.
@@ -53,14 +67,15 @@
5468 $wgAjaxExportList[] = 'wfSajaxWikiToHTML';
5569 $wgAjaxExportList[] = 'wfSajaxGetImageUrl';
5670 $wgAjaxExportList[] = 'wfSajaxGetMathUrl';
 71+$wgAjaxExportList[] = 'wfSajaxSearchTemplateFCKeditor';
 72+$wgAjaxExportList[] = 'wfSajaxSearchSpecialTagFCKeditor';
5773
5874 $wgExtensionCredits['other'][] = array(
59 - "name" => "FCKeditor extension",
60 - "author" => "FCKeditor.net (inspired by the code written by Mafs [Meta])",
61 - "version" => 'fckeditor/mw-extension $Rev$ 2008',
62 - "url" => "http://www.mediawiki.org/wiki/Extension:FCKeditor_(by_FCKeditor_and_Wikia)",
63 - "description" => "Use the FCKeditor for editing wiki pages",
64 - "descriptionmsg" => "textrichditor-desc",
 75+"name" => "FCKeditor extension",
 76+"author" => "FCKeditor.net (inspired by the code written by Mafs [Meta])",
 77+"version" => 'fckeditor/mw-extension $Rev$ 2008',
 78+"url" => "http://meta.wikimedia.org/wiki/FCKeditor",
 79+"description" => "FCKeditor extension"
6580 );
6681
6782 $fckeditor = new FCKeditor("fake");
@@ -68,3 +83,11 @@
6984
7085 $oFCKeditorExtension = new FCKeditor_MediaWiki();
7186 $oFCKeditorExtension->registerHooks();
 87+
 88+
 89+
 90+
 91+
 92+
 93+
 94+
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.de.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+'textrichditor' => 'Rich Editor',
 6+'tog-riched_disable' => 'Rich editor deaktivieren',
 7+'tog-riched_disable_ns_main' => 'Rich editor deaktivieren im Haupt-Namensraum',
 8+'tog-riched_disable_ns_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Talk}}" ',
 9+'tog-riched_disable_ns_user' => 'Rich editor deaktivieren im Namensraum "{{ns:User}}" ',
 10+'tog-riched_disable_ns_user_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:User_talk}}" ',
 11+'tog-riched_disable_ns_project' => 'Rich editor deaktivieren im Namensraum "{{ns:Project}}" ',
 12+'tog-riched_disable_ns_project_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Project_talk}}" ',
 13+'tog-riched_disable_ns_image' => 'Rich editor deaktivieren im Namensraum "{{ns:Image}}" ',
 14+'tog-riched_disable_ns_image_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Image_talk}}" ',
 15+'tog-riched_disable_ns_mediawiki' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki}}" ',
 16+'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki_talk}}" ',
 17+'tog-riched_disable_ns_template' => 'Rich editor deaktivieren im Namensraum "{{ns:Template}}" ',
 18+'tog-riched_disable_ns_template_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Template_talk}}" ',
 19+'tog-riched_disable_ns_help' => 'Rich editor deaktivieren im Namensraum "{{ns:Help}}" ',
 20+'tog-riched_disable_ns_help_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Help_talk}}" ',
 21+'tog-riched_disable_ns_category' => 'Rich editor deaktivieren im Namensraum "{{ns:Category}}" ',
 22+'tog-riched_disable_ns_category_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Category_talk}}" ',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.de.php
___________________________________________________________________
Added: svn:eol-style
124 + native
Index: trunk/extensions/FCKeditor/FCKeditorParser.body.php
@@ -2,85 +2,109 @@
33
44 class FCKeditorParser extends Parser
55 {
6 - public static $fkc_mw_makeImage_options;
7 - protected $fck_mw_strtr_span;
8 - protected $fck_mw_strtr_span_counter=1;
9 - protected $fck_mw_taghook;
10 - protected $fck_internal_parse_text;
 6+ public static $fkc_mw_makeImage_options;
 7+ protected $fck_mw_strtr_span;
 8+ protected $fck_mw_strtr_span_counter=1;
 9+ protected $fck_mw_taghook;
 10+ protected $fck_internal_parse_text;
 11+ protected $fck_matches = array();
1112
12 - private $FCKeditorMagicWords = array(
13 - '__NOTOC__',
14 - '__FORCETOC__',
15 - '__NOEDITSECTION__',
16 - '__START__',
17 - '__NOTITLECONVERT__',
18 - '__NOCONTENTCONVERT__',
19 - '__END__',
20 - '__TOC__',
21 - '__NOTC__',
22 - '__NOCC__',
23 - "__FORCETOC__",
24 - "__NEWSECTIONLINK__",
25 - "__NOGALLERY__",
26 - );
 13+ private $FCKeditorMagicWords = array(
 14+ '__NOTOC__',
 15+ '__FORCETOC__',
 16+ '__NOEDITSECTION__',
 17+ '__START__',
 18+ '__NOTITLECONVERT__',
 19+ '__NOCONTENTCONVERT__',
 20+ '__END__',
 21+ '__TOC__',
 22+ '__NOTC__',
 23+ '__NOCC__',
 24+ "__FORCETOC__",
 25+ "__NEWSECTIONLINK__",
 26+ "__NOGALLERY__",
 27+ );
2728
28 - function __construct() {
29 - global $wgParser;
30 - parent::Parser();
 29+ function __construct() {
 30+ global $wgParser;
 31+ parent::Parser();
3132
32 - foreach ($wgParser->getTags() as $h) {
33 - if (!in_array($h, array("pre"))) {
34 - $this->setHook($h, array($this, "fck_genericTagHook"));
35 - }
36 - }
37 - }
 33+ foreach ($wgParser->getTags() as $h) {
 34+ if (!in_array($h, array("pre"))) {
 35+ $this->setHook($h, array($this, "fck_genericTagHook"));
 36+ }
 37+ }
 38+ }
3839
39 - /**
40 - * Add special string (that would be changed by Parser) to array and return simple unique string
41 - * that will remain unchanged during whole parsing operation.
42 - * At the end we'll replace all this unique strings with original content
43 - *
44 - * @param string $text
45 - * @return string
46 - */
47 - private function fck_addToStrtr($text) {
48 - $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
49 - $this->fck_mw_strtr_span_counter++;
50 - $this->fck_mw_strtr_span[$key] = $text;
51 - return $key;
52 - }
 40+ /**
 41+ * Add special string (that would be changed by Parser) to array and return simple unique string
 42+ * that will remain unchanged during whole parsing operation.
 43+ * At the end we'll replace all this unique strings with original content
 44+ *
 45+ * @param string $text
 46+ * @return string
 47+ */
 48+ private function fck_addToStrtr($text, $replaceLineBreaks = true) {
 49+ $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
 50+ $this->fck_mw_strtr_span_counter++;
 51+ if ($replaceLineBreaks) {
 52+ $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text);
 53+ }
 54+ else {
 55+ $this->fck_mw_strtr_span[$key] = $text;
 56+ }
 57+ return $key;
 58+ }
5359
54 - /**
 60+ /**
 61+ * Handle link to subpage if necessary
 62+ * @param string $target the source of the link
 63+ * @param string &$text the link text, modified as necessary
 64+ * @return string the full name of the link
 65+ * @private
 66+ */
 67+ function maybeDoSubpageLink($target, &$text) {
 68+ return $target;
 69+ }
 70+
 71+ /**
5572 * Callback function for custom tags: feed, ref, references etc.
5673 *
5774 * @param string $str Input
5875 * @param array $argv Arguments
5976 * @return string
6077 */
61 - function fck_genericTagHook( $str, $argv, $parser ) {
62 - if (empty($argv)) {
63 - $ret = "<span class=\"fck_mw_".$this->fck_mw_taghook."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">";
64 - }
65 - else {
66 - $ret = "<span class=\"fck_mw_".$this->fck_mw_taghook."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\"";
67 - foreach ($argv as $key=>$value) {
68 - $ret .= " ".$key."=\"".$value."\"";
69 - }
70 - $ret .=">";
71 - }
72 - if (is_null($str)) {
73 - $ret = substr($ret, 0, -1) . " />";
74 - }
75 - else {
76 - $ret .= htmlspecialchars($str);
77 - $ret .= "</span>";
78 - }
 78+ function fck_genericTagHook( $str, $argv, $parser ) {
 79+ if (in_array($this->fck_mw_taghook, array("ref", "math", "references"))) {
 80+ $class = $this->fck_mw_taghook;
 81+ }
 82+ else {
 83+ $class = "special";
 84+ }
 85+
 86+ if (empty($argv)) {
 87+ $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">";
 88+ }
 89+ else {
 90+ $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\"";
 91+ foreach ($argv as $key=>$value) {
 92+ $ret .= " ".$key."=\"".$value."\"";
 93+ }
 94+ $ret .=">";
 95+ }
 96+ if (is_null($str)) {
 97+ $ret = substr($ret, 0, -1) . " />";
 98+ }
 99+ else {
 100+ $ret .= htmlspecialchars($str);
 101+ $ret .= "</span>";
 102+ }
79103
80 - $replacement = $this->fck_addToStrtr($ret);
81 - return $replacement;
82 - }
 104+ $replacement = $this->fck_addToStrtr($ret);
 105+ return $replacement;
 106+ }
83107
84 - /**
 108+ /**
85109 * Callback function for wiki tags: nowiki, includeonly, noinclude
86110 *
87111 * @param string $tagName tag name, eg. nowiki, math
@@ -88,31 +112,31 @@
89113 * @param array $argv Arguments
90114 * @return string
91115 */
92 - function fck_wikiTag( $tagName, $str, $argv = array()) {
93 - if (empty($argv)) {
94 - $ret = "<span class=\"fck_mw_".$tagName."\">";
95 - }
96 - else {
97 - $ret = "<span class=\"fck_mw_".$tagName."\"";
98 - foreach ($argv as $key=>$value) {
99 - $ret .= " ".$key."=\"".$value."\"";
100 - }
101 - $ret .=">";
102 - }
103 - if (is_null($str)) {
104 - $ret = substr($ret, 0, -1) . " />";
105 - }
106 - else {
107 - $ret .= htmlspecialchars($str);
108 - $ret .= "</span>";
109 - }
 116+ function fck_wikiTag( $tagName, $str, $argv = array()) {
 117+ if (empty($argv)) {
 118+ $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">";
 119+ }
 120+ else {
 121+ $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">";
 122+ foreach ($argv as $key=>$value) {
 123+ $ret .= " ".$key."=\"".$value."\"";
 124+ }
 125+ $ret .=">";
 126+ }
 127+ if (is_null($str)) {
 128+ $ret = substr($ret, 0, -1) . " />";
 129+ }
 130+ else {
 131+ $ret .= htmlspecialchars($str);
 132+ $ret .= "</span>";
 133+ }
110134
111 - $replacement = $this->fck_addToStrtr($ret);
 135+ $replacement = $this->fck_addToStrtr($ret);
112136
113 - return $replacement;
114 - }
 137+ return $replacement;
 138+ }
115139
116 - /**
 140+ /**
117141 * Strips and renders nowiki, pre, math, hiero
118142 * If $render is set, performs necessary rendering operations on plugins
119143 * Returns the text, and fills an array with data needed in unstrip()
@@ -129,317 +153,498 @@
130154 *
131155 * @private
132156 */
133 - function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
134 - global $wgContLang;
 157+ function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
 158+ global $wgContLang;
135159
136 - wfProfileIn( __METHOD__ );
137 - $render = ($this->mOutputType == OT_HTML);
 160+ wfProfileIn( __METHOD__ );
 161+ $render = ($this->mOutputType == OT_HTML);
138162
139 - $uniq_prefix = $this->mUniqPrefix;
140 - $commentState = new ReplacementArray;
141 - $nowikiItems = array();
142 - $generalItems = array();
 163+ $uniq_prefix = $this->mUniqPrefix;
 164+ $commentState = new ReplacementArray;
 165+ $nowikiItems = array();
 166+ $generalItems = array();
143167
144 - $elements = array_merge(
145 - array( 'nowiki', 'gallery' ),
146 - array_keys( $this->mTagHooks ) );
147 - global $wgRawHtml;
148 - if( $wgRawHtml ) {
149 - $elements[] = 'html';
150 - }
151 - if( $this->mOptions->getUseTeX() ) {
152 - $elements[] = 'math';
153 - }
 168+ $elements = array_merge(
 169+ array( 'nowiki', 'gallery' ),
 170+ array_keys( $this->mTagHooks ) );
 171+ global $wgRawHtml;
 172+ if( $wgRawHtml ) {
 173+ $elements[] = 'html';
 174+ }
 175+ if( $this->mOptions->getUseTeX() ) {
 176+ $elements[] = 'math';
 177+ }
154178
155 - # Removing $dontstrip tags from $elements list (currently only 'gallery', fixing bug 2700)
156 - foreach ( $elements AS $k => $v ) {
157 - if ( !in_array ( $v , $dontstrip ) ) continue;
158 - unset ( $elements[$k] );
159 - }
 179+ # Removing $dontstrip tags from $elements list (currently only 'gallery', fixing bug 2700)
 180+ foreach ( $elements AS $k => $v ) {
 181+ if ( !in_array ( $v , $dontstrip ) ) continue;
 182+ unset ( $elements[$k] );
 183+ }
160184
161 - $matches = array();
162 - $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
 185+ $matches = array();
 186+ $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
163187
164 - foreach( $matches as $marker => $data ) {
165 - list( $element, $content, $params, $tag ) = $data;
166 - if( $render ) {
167 - $tagName = strtolower( $element );
168 - wfProfileIn( __METHOD__."-render-$tagName" );
169 - switch( $tagName ) {
170 - case '!--':
171 - // Comment
172 - if( substr( $tag, -3 ) == '-->' ) {
173 - $output = $tag;
174 - } else {
175 - // Unclosed comment in input.
176 - // Close it so later stripping can remove it
177 - $output = "$tag-->";
178 - }
179 - break;
180 - case 'html':
181 - if( $wgRawHtml ) {
182 - $output = $content;
183 - break;
184 - }
185 - // Shouldn't happen otherwise. :)
186 - case 'nowiki':
187 - $output = $this->fck_wikiTag('nowiki', $content, $params); //required by FCKeditor
188 - break;
189 - case 'math':
190 - $output = $wgContLang->armourMath( MathRenderer::renderMath( $content ) );
191 - break;
192 - case 'gallery':
193 - $output = $this->renderImageGallery( $content, $params );
194 - break;
195 - default:
196 - if( isset( $this->mTagHooks[$tagName] ) ) {
197 - $this->fck_mw_taghook = $tagName; //required by FCKeditor
198 - $output = call_user_func_array( $this->mTagHooks[$tagName],
199 - array( $content, $params, $this ) );
200 - } else {
201 - throw new MWException( "Invalid call hook $element" );
202 - }
203 - }
204 - wfProfileOut( __METHOD__."-render-$tagName" );
205 - } else {
206 - // Just stripping tags; keep the source
207 - $output = $tag;
208 - }
 188+ foreach( $matches as $marker => $data ) {
 189+ list( $element, $content, $params, $tag ) = $data;
 190+ if( $render ) {
 191+ $tagName = strtolower( $element );
 192+ wfProfileIn( __METHOD__."-render-$tagName" );
 193+ switch( $tagName ) {
 194+ case '!--':
 195+ // Comment
 196+ if( substr( $tag, -3 ) == '-->' ) {
 197+ $output = $tag;
 198+ } else {
 199+ // Unclosed comment in input.
 200+ // Close it so later stripping can remove it
 201+ $output = "$tag-->";
 202+ }
 203+ break;
 204+ case 'html':
 205+ if( $wgRawHtml ) {
 206+ $output = $content;
 207+ break;
 208+ }
 209+ // Shouldn't happen otherwise. :)
 210+ case 'nowiki':
 211+ $output = $this->fck_wikiTag('nowiki', $content, $params); //required by FCKeditor
 212+ break;
 213+ case 'math':
 214+ $output = $wgContLang->armourMath( MathRenderer::renderMath( $content ) );
 215+ break;
 216+ case 'gallery':
 217+ $output = $this->fck_wikiTag('gallery', $content, $params); //required by FCKeditor
 218+ //$output = $this->renderImageGallery( $content, $params );
 219+ break;
 220+ default:
 221+ if( isset( $this->mTagHooks[$tagName] ) ) {
 222+ $this->fck_mw_taghook = $tagName; //required by FCKeditor
 223+ $output = call_user_func_array( $this->mTagHooks[$tagName],
 224+ array( $content, $params, $this ) );
 225+ } else {
 226+ throw new MWException( "Invalid call hook $element" );
 227+ }
 228+ }
 229+ wfProfileOut( __METHOD__."-render-$tagName" );
 230+ } else {
 231+ // Just stripping tags; keep the source
 232+ $output = $tag;
 233+ }
209234
210 - // Unstrip the output, to support recursive strip() calls
211 - $output = $state->unstripBoth( $output );
 235+ // Unstrip the output, to support recursive strip() calls
 236+ $output = $state->unstripBoth( $output );
212237
213 - if( !$stripcomments && $element == '!--' ) {
214 - $commentState->setPair( $marker, $output );
215 - } elseif ( $element == 'html' || $element == 'nowiki' ) {
216 - $nowikiItems[$marker] = $output;
217 - } else {
218 - $generalItems[$marker] = $output;
219 - }
220 - }
221 - # Add the new items to the state
222 - # We do this after the loop instead of during it to avoid slowing
223 - # down the recursive unstrip
224 - $state->nowiki->mergeArray( $nowikiItems );
225 - $state->general->mergeArray( $generalItems );
 238+ if( !$stripcomments && $element == '!--' ) {
 239+ $commentState->setPair( $marker, $output );
 240+ } elseif ( $element == 'html' || $element == 'nowiki' ) {
 241+ $nowikiItems[$marker] = $output;
 242+ } else {
 243+ $generalItems[$marker] = $output;
 244+ }
 245+ }
 246+ # Add the new items to the state
 247+ # We do this after the loop instead of during it to avoid slowing
 248+ # down the recursive unstrip
 249+ $state->nowiki->mergeArray( $nowikiItems );
 250+ $state->general->mergeArray( $generalItems );
226251
227 - # Unstrip comments unless explicitly told otherwise.
228 - # (The comments are always stripped prior to this point, so as to
229 - # not invoke any extension tags / parser hooks contained within
230 - # a comment.)
231 - if ( !$stripcomments ) {
232 - // Put them all back and forget them
233 - $text = $commentState->replace( $text );
234 - }
 252+ # Unstrip comments unless explicitly told otherwise.
 253+ # (The comments are always stripped prior to this point, so as to
 254+ # not invoke any extension tags / parser hooks contained within
 255+ # a comment.)
 256+ if ( !$stripcomments ) {
 257+ // Put them all back and forget them
 258+ $text = $commentState->replace( $text );
 259+ }
235260
236 - wfProfileOut( __METHOD__ );
237 - return $text;
238 - }
 261+ $this->fck_matches = $matches;
 262+ wfProfileOut( __METHOD__ );
 263+ return $text;
 264+ }
239265
240 - /** Replace HTML comments with unique text using fck_addToStrtr function
 266+ /** Replace HTML comments with unique text using fck_addToStrtr function
241267 *
242268 * @private
243269 * @param string $text
244270 * @return string
245271 */
246 - private function fck_replaceHTMLcomments( $text ) {
247 - wfProfileIn( __METHOD__ );
248 - while (($start = strpos($text, '<!--')) !== false) {
249 - $end = strpos($text, '-->', $start + 4);
250 - if ($end === false) {
251 - # Unterminated comment; bail out
252 - break;
253 - }
 272+ private function fck_replaceHTMLcomments( $text ) {
 273+ wfProfileIn( __METHOD__ );
 274+ while (($start = strpos($text, '<!--')) !== false) {
 275+ $end = strpos($text, '-->', $start + 4);
 276+ if ($end === false) {
 277+ # Unterminated comment; bail out
 278+ break;
 279+ }
254280
255 - $end += 3;
 281+ $end += 3;
256282
257 - # Trim space and newline if the comment is both
258 - # preceded and followed by a newline
259 - $spaceStart = max($start - 1, 0);
260 - $spaceLen = $end - $spaceStart;
261 - while (substr($text, $spaceStart, 1) === ' ' && $spaceStart > 0) {
262 - $spaceStart--;
263 - $spaceLen++;
264 - }
265 - while (substr($text, $spaceStart + $spaceLen, 1) === ' ')
266 - $spaceLen++;
267 - if (substr($text, $spaceStart, 1) === "\n" and substr($text, $spaceStart + $spaceLen, 1) === "\n") {
268 - # Remove the comment, leading and trailing
269 - # spaces, and leave only one newline.
270 - $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1));
271 - $text = substr_replace($text, $replacement."\n", $spaceStart, $spaceLen + 1);
272 - }
273 - else {
274 - # Remove just the comment.
275 - $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start));
276 - $text = substr_replace($text, $replacement, $start, $end - $start);
277 - }
278 - }
279 - wfProfileOut( __METHOD__ );
 283+ # Trim space and newline if the comment is both
 284+ # preceded and followed by a newline
 285+ $spaceStart = max($start - 1, 0);
 286+ $spaceLen = $end - $spaceStart;
 287+ while (substr($text, $spaceStart, 1) === ' ' && $spaceStart > 0) {
 288+ $spaceStart--;
 289+ $spaceLen++;
 290+ }
 291+ while (substr($text, $spaceStart + $spaceLen, 1) === ' ')
 292+ $spaceLen++;
 293+ if (substr($text, $spaceStart, 1) === "\n" and substr($text, $spaceStart + $spaceLen, 1) === "\n") {
 294+ # Remove the comment, leading and trailing
 295+ # spaces, and leave only one newline.
 296+ $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1), false);
 297+ $text = substr_replace($text, $replacement."\n", $spaceStart, $spaceLen + 1);
 298+ }
 299+ else {
 300+ # Remove just the comment.
 301+ $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start), false);
 302+ $text = substr_replace($text, $replacement, $start, $end - $start);
 303+ }
 304+ }
 305+ wfProfileOut( __METHOD__ );
280306
281 - return $text;
282 - }
 307+ return $text;
 308+ }
283309
284 - function replaceInternalLinks( $text ) {
285 - return parent::replaceInternalLinks($text);
286 - }
 310+ function replaceInternalLinks( $text ) {
 311+ return parent::replaceInternalLinks($text);
 312+ }
287313
288 - function makeImage( $nt, $options ) {
289 - FCKeditorParser::$fkc_mw_makeImage_options = $options;
290 - return parent::makeImage( $nt, $options );
291 - }
 314+ function makeImage( $nt, $options ) {
 315+ FCKeditorParser::$fkc_mw_makeImage_options = $options;
 316+ return parent::makeImage( $nt, $options );
 317+ }
292318
293 - /**
294 - * Replace templates with unique text to preserve them from parsing
295 - *
296 - * @todo if {{template}} is inside string that also must be returned unparsed,
297 - * e.g. <noinclude>{{template}}</noinclude>
298 - * {{template}} replaced with Fckmw[n]fckmw which is wrong...
299 - *
300 - * @param string $text
301 - * @return string
302 - */
303 - private function fck_replaceTemplates( $text ) {
 319+ /**
 320+ * Replace templates with unique text to preserve them from parsing
 321+ *
 322+ * @todo if {{template}} is inside string that also must be returned unparsed,
 323+ * e.g. <noinclude>{{template}}</noinclude>
 324+ * {{template}} replaced with Fckmw[n]fckmw which is wrong...
 325+ *
 326+ * @param string $text
 327+ * @return string
 328+ */
 329+ private function fck_replaceTemplates( $text ) {
304330
305 - $callback = array('{' =>
306 - array(
307 - 'end'=>'}',
308 - 'cb' => array(
309 - 2=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
310 - 3=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
311 - ),
312 - 'min' =>2,
313 - 'max' =>3,
314 - )
315 - );
 331+ $callback = array('{' =>
 332+ array(
 333+ 'end'=>'}',
 334+ 'cb' => array(
 335+ 2=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
 336+ 3=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
 337+ ),
 338+ 'min' =>2,
 339+ 'max' =>3,
 340+ )
 341+ );
316342
317 - $text = $this->replace_callback($text, $callback);
 343+ $text = $this->replace_callback($text, $callback);
318344
319 - $tags = array();
320 - $offset=0;
321 - $textTmp = $text;
322 - while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_START-->")))
323 - {
324 - $tags[abs($pos + $offset)] = 1;
325 - $textTmp = substr($textTmp, $pos+21);
326 - $offset += $pos + 21;
327 - }
 345+ $tags = array();
 346+ $offset=0;
 347+ $textTmp = $text;
 348+ while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_START-->")))
 349+ {
 350+ $tags[abs($pos + $offset)] = 1;
 351+ $textTmp = substr($textTmp, $pos+21);
 352+ $offset += $pos + 21;
 353+ }
328354
329 - $offset=0;
330 - $textTmp = $text;
331 - while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_END-->")))
332 - {
333 - $tags[abs($pos + $offset)] = -1;
334 - $textTmp = substr($textTmp, $pos+19);
335 - $offset += $pos + 19;
336 - }
 355+ $offset=0;
 356+ $textTmp = $text;
 357+ while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_END-->")))
 358+ {
 359+ $tags[abs($pos + $offset)] = -1;
 360+ $textTmp = substr($textTmp, $pos+19);
 361+ $offset += $pos + 19;
 362+ }
337363
338 - if (!empty($tags)) {
339 - ksort($tags);
 364+ if (!empty($tags)) {
 365+ ksort($tags);
340366
341 - $strtr = array("<!--FCK_SKIP_START-->" => "", "<!--FCK_SKIP_END-->" => "");
 367+ $strtr = array("<!--FCK_SKIP_START-->" => "", "<!--FCK_SKIP_END-->" => "");
342368
343 - $sum=0;
344 - $lastSum=0;
345 - $finalString = "";
346 - $stringToParse = "";
347 - $startingPos = 0;
348 - $inner = "";
349 - $strtr_span = array();
350 - foreach ($tags as $pos=>$type) {
351 - $sum += $type;
352 - if ($sum == 1 && $lastSum == 0) {
353 - $stringToParse .= strtr(substr($text, $startingPos, $pos - $startingPos), $strtr);
354 - $startingPos = $pos;
355 - }
356 - else if ($sum == 0) {
357 - $stringToParse .= 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
358 - $inner = htmlspecialchars(strtr(substr($text, $startingPos, $pos - $startingPos + 19), $strtr));
359 - $this->fck_mw_strtr_span['href="Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw"'] = 'href="'.$inner.'"';
360 - $this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class="fck_mw_template">'.$inner.'</span>';
361 - $startingPos = $pos + 19;
362 - $this->fck_mw_strtr_span_counter++;
363 - }
364 - $lastSum = $sum;
365 - }
366 - $stringToParse .= substr($text, $startingPos);
367 - $text = &$stringToParse;
368 - }
 369+ $sum=0;
 370+ $lastSum=0;
 371+ $finalString = "";
 372+ $stringToParse = "";
 373+ $startingPos = 0;
 374+ $inner = "";
 375+ $strtr_span = array();
 376+ foreach ($tags as $pos=>$type) {
 377+ $sum += $type;
 378+ if ($sum == 1 && $lastSum == 0) {
 379+ $stringToParse .= strtr(substr($text, $startingPos, $pos - $startingPos), $strtr);
 380+ $startingPos = $pos;
 381+ }
 382+ else if ($sum == 0) {
 383+ $stringToParse .= 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
 384+ $inner = htmlspecialchars(strtr(substr($text, $startingPos, $pos - $startingPos + 19), $strtr));
 385+ $this->fck_mw_strtr_span['href="Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw"'] = 'href="'.$inner.'"';
 386+ $this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class="fck_mw_template">'.str_replace(array("\r\n", "\n", "\r"),"fckLR",$inner).'</span>';
 387+ $startingPos = $pos + 19;
 388+ $this->fck_mw_strtr_span_counter++;
 389+ }
 390+ $lastSum = $sum;
 391+ }
 392+ $stringToParse .= substr($text, $startingPos);
 393+ $text = &$stringToParse;
 394+ }
369395
370 - return $text;
371 - }
 396+ return $text;
 397+ }
372398
373 - function internalParse ( $text ) {
 399+ function internalParse ( $text ) {
374400
375 - $this->fck_internal_parse_text =& $text;
 401+ $this->fck_internal_parse_text =& $text;
376402
377 - //these three tags should remain unchanged
378 - $text = StringUtils::delimiterReplaceCallback( '<includeonly>', '</includeonly>', array($this, 'fck_includeonly'), $text );
379 - $text = StringUtils::delimiterReplaceCallback( '<noinclude>', '</noinclude>', array($this, 'fck_noinclude'), $text );
380 - $text = StringUtils::delimiterReplaceCallback( '<onlyinclude>', '</onlyinclude>', array($this, 'fck_onlyinclude'), $text );
 403+ //these three tags should remain unchanged
 404+ $text = StringUtils::delimiterReplaceCallback( '<includeonly>', '</includeonly>', array($this, 'fck_includeonly'), $text );
 405+ $text = StringUtils::delimiterReplaceCallback( '<noinclude>', '</noinclude>', array($this, 'fck_noinclude'), $text );
 406+ $text = StringUtils::delimiterReplaceCallback( '<onlyinclude>', '</onlyinclude>', array($this, 'fck_onlyinclude'), $text );
381407
382 - //html comments shouldn't be stripped
383 - $text = $this->fck_replaceHTMLcomments( $text );
384 - //as well as templates
385 - $text = $this->fck_replaceTemplates( $text );
 408+ //html comments shouldn't be stripped
 409+ $text = $this->fck_replaceHTMLcomments( $text );
 410+ //as well as templates
 411+ $text = $this->fck_replaceTemplates( $text );
386412
387 - $finalString = parent::internalParse($text);
 413+ $finalString = parent::internalParse($text);
388414
389 - return $finalString;
390 - }
391 - function fck_includeonly( $matches ) {
392 - return $this->fck_wikiTag('includeonly', $matches[1]);
393 - }
394 - function fck_noinclude( $matches ) {
395 - return $this->fck_wikiTag('noinclude', $matches[1]);
396 - }
397 - function fck_onlyinclude( $matches ) {
398 - return $this->fck_wikiTag('onlyinclude', $matches[1]);
399 - }
400 - function fck_leaveTemplatesAlone( $matches ) {
401 - return "<!--FCK_SKIP_START-->".$matches['text']."<!--FCK_SKIP_END-->";
402 - }
403 - function formatHeadings( $text, $isMain=true ) {
404 - return $text;
405 - }
406 - function replaceFreeExternalLinks( $text ) { return $text; }
407 - function stripNoGallery(&$text) {}
408 - function stripToc( $text ) {
409 - //$prefix = '<span class="fck_mw_magic">';
410 - //$suffix = '</span>';
411 - $prefix = '';
412 - $suffix = '';
 415+ return $finalString;
 416+ }
 417+ function fck_includeonly( $matches ) {
 418+ return $this->fck_wikiTag('includeonly', $matches[1]);
 419+ }
 420+ function fck_noinclude( $matches ) {
 421+ return $this->fck_wikiTag('noinclude', $matches[1]);
 422+ }
 423+ function fck_onlyinclude( $matches ) {
 424+ return $this->fck_wikiTag('onlyinclude', $matches[1]);
 425+ }
 426+ function fck_leaveTemplatesAlone( $matches ) {
 427+ return "<!--FCK_SKIP_START-->".$matches['text']."<!--FCK_SKIP_END-->";
 428+ }
 429+ function formatHeadings( $text, $isMain=true ) {
 430+ return $text;
 431+ }
 432+ function replaceFreeExternalLinks( $text ) { return $text; }
 433+ function stripNoGallery(&$text) {}
 434+ function stripToc( $text ) {
 435+ //$prefix = '<span class="fck_mw_magic">';
 436+ //$suffix = '</span>';
 437+ $prefix = '';
 438+ $suffix = '';
413439
414 - $strtr = array();
415 - foreach ($this->FCKeditorMagicWords as $word) {
416 - $strtr[$word] = $prefix . $word . $suffix;
417 - }
 440+ $strtr = array();
 441+ foreach ($this->FCKeditorMagicWords as $word) {
 442+ $strtr[$word] = $prefix . $word . $suffix;
 443+ }
418444
419 - return strtr( $text, $strtr );
420 - }
 445+ return strtr( $text, $strtr );
 446+ }
421447
422 - function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
423 - $parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );
 448+ function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
 449+ $text = preg_replace("/^#REDIRECT/", "<!--FCK_REDIRECT-->", $text);
 450+ $parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );
424451
425 - $categories = $parserOutput->getCategories();
426 - if ($categories) {
427 - $appendString = "";
428 - foreach ($categories as $cat=>$val) {
429 - $appendString .= "<a href=\"Category:" . $cat ."\">Category:" . $cat ."</a> ";
430 - }
431 - $parserOutput->setText($parserOutput->getText() . $appendString);
432 - }
 452+ $categories = $parserOutput->getCategories();
 453+ if ($categories) {
 454+ $appendString = "";
 455+ foreach ($categories as $cat=>$val) {
 456+ $appendString .= "<a href=\"Category:" . $cat ."\">Category:" . $cat ."</a> ";
 457+ }
 458+ $parserOutput->setText($parserOutput->getText() . $appendString);
 459+ }
433460
434 - if (!empty($this->fck_mw_strtr_span)) {
435 - $parserOutput->setText(strtr($parserOutput->getText(), $this->fck_mw_strtr_span));
436 - }
 461+ if (!empty($this->fck_mw_strtr_span)) {
 462+ $parserOutput->setText(strtr($parserOutput->getText(), $this->fck_mw_strtr_span));
 463+ }
437464
438 - return $parserOutput;
439 - }
 465+ if (!empty($this->fck_matches)) {
 466+ $text = $parserOutput->getText() ;
 467+ foreach ($this->fck_matches as $key => $m) {
 468+ $text = str_replace( $key, $m[3], $text);
 469+ }
 470+ $parserOutput->setText($text);
 471+ }
 472+
 473+ if (!empty($parserOutput->mLanguageLinks)) {
 474+ foreach ($parserOutput->mLanguageLinks as $l) {
 475+ $parserOutput->setText($parserOutput->getText() . "\n" . "<a href=\"".$l."\">".$l."</a>") ;
 476+ }
 477+ }
440478
441 - /*
442 - function replaceVariables( $text, $args = array(), $argsOnly = false ) {
443 - return preg_replace("/\{\{([^}]+)\}\}(\}*)/", '<span class="fck_template">{{$1}}$2</span>', $text);
444 - }
445 - */
 479+ $parserOutput->setText(str_replace("<!--FCK_REDIRECT-->", "#REDIRECT", $parserOutput->getText()));
 480+
 481+ return $parserOutput;
 482+ }
 483+
 484+ /**
 485+ * Make lists from lines starting with ':', '*', '#', etc.
 486+ *
 487+ * @private
 488+ * @return string the lists rendered as HTML
 489+ */
 490+ function doBlockLevels( $text, $linestart ) {
 491+ $fname = 'Parser::doBlockLevels';
 492+ wfProfileIn( $fname );
 493+
 494+ # Parsing through the text line by line. The main thing
 495+ # happening here is handling of block-level elements p, pre,
 496+ # and making lists from lines starting with * # : etc.
 497+ #
 498+ $textLines = explode( "\n", $text );
 499+
 500+ $lastPrefix = $output = '';
 501+ $this->mDTopen = $inBlockElem = false;
 502+ $prefixLength = 0;
 503+ $paragraphStack = false;
 504+
 505+ if ( !$linestart ) {
 506+ $output .= array_shift( $textLines );
 507+ }
 508+ foreach ( $textLines as $oLine ) {
 509+ $lastPrefixLength = strlen( $lastPrefix );
 510+ $preCloseMatch = preg_match('/<\\/pre/i', $oLine );
 511+ $preOpenMatch = preg_match('/<pre/i', $oLine );
 512+ if ( !$this->mInPre ) {
 513+ # Multiple prefixes may abut each other for nested lists.
 514+ $prefixLength = strspn( $oLine, '*#:;' );
 515+ $pref = substr( $oLine, 0, $prefixLength );
 516+
 517+ # eh?
 518+ $pref2 = str_replace( ';', ':', $pref );
 519+ $t = substr( $oLine, $prefixLength );
 520+ $this->mInPre = !empty($preOpenMatch);
 521+ } else {
 522+ # Don't interpret any other prefixes in preformatted text
 523+ $prefixLength = 0;
 524+ $pref = $pref2 = '';
 525+ $t = $oLine;
 526+ }
 527+
 528+ # List generation
 529+ if( $prefixLength && 0 == strcmp( $lastPrefix, $pref2 ) ) {
 530+ # Same as the last item, so no need to deal with nesting or opening stuff
 531+ $output .= $this->nextItem( substr( $pref, -1 ) );
 532+ $paragraphStack = false;
 533+
 534+ if ( substr( $pref, -1 ) == ';') {
 535+ # The one nasty exception: definition lists work like this:
 536+ # ; title : definition text
 537+ # So we check for : in the remainder text to split up the
 538+ # title and definition, without b0rking links.
 539+ $term = $t2 = '';
 540+ if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 541+ $t = $t2;
 542+ $output .= $term . $this->nextItem( ':' );
 543+ }
 544+ }
 545+ } elseif( $prefixLength || $lastPrefixLength ) {
 546+ # Either open or close a level...
 547+ $commonPrefixLength = $this->getCommon( $pref, $lastPrefix );
 548+ $paragraphStack = false;
 549+
 550+ while( $commonPrefixLength < $lastPrefixLength ) {
 551+ $output .= $this->closeList( $lastPrefix{$lastPrefixLength-1} );
 552+ --$lastPrefixLength;
 553+ }
 554+ if ( $prefixLength <= $commonPrefixLength && $commonPrefixLength > 0 ) {
 555+ $output .= $this->nextItem( $pref{$commonPrefixLength-1} );
 556+ }
 557+ while ( $prefixLength > $commonPrefixLength ) {
 558+ $char = substr( $pref, $commonPrefixLength, 1 );
 559+ $output .= $this->openList( $char );
 560+
 561+ if ( ';' == $char ) {
 562+ # FIXME: This is dupe of code above
 563+ if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 564+ $t = $t2;
 565+ $output .= $term . $this->nextItem( ':' );
 566+ }
 567+ }
 568+ ++$commonPrefixLength;
 569+ }
 570+ $lastPrefix = $pref2;
 571+ }
 572+ if( 0 == $prefixLength ) {
 573+ wfProfileIn( "$fname-paragraph" );
 574+ # No prefix (not in list)--go to paragraph mode
 575+ // XXX: use a stack for nestable elements like span, table and div
 576+ $openmatch = preg_match('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
 577+ $closematch = preg_match(
 578+ '/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
 579+ '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol|<\\/?center)/iS', $t );
 580+ if ( $openmatch or $closematch ) {
 581+ $paragraphStack = false;
 582+ # TODO bug 5718: paragraph closed
 583+ $output .= $this->closeParagraph();
 584+ if ( $preOpenMatch and !$preCloseMatch ) {
 585+ $this->mInPre = true;
 586+ }
 587+ if ( $closematch ) {
 588+ $inBlockElem = false;
 589+ } else {
 590+ $inBlockElem = true;
 591+ }
 592+ } else if ( !$inBlockElem && !$this->mInPre ) {
 593+ if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim($t) != '' ) ) {
 594+ // pre
 595+ if ($this->mLastSection != 'pre') {
 596+ $paragraphStack = false;
 597+ $output .= $this->closeParagraph().'<pre class="_fck_mw_lspace">';
 598+ $this->mLastSection = 'pre';
 599+ }
 600+ $t = substr( $t, 1 );
 601+ } else {
 602+ // paragraph
 603+ if ( '' == trim($t) ) {
 604+ if ( $paragraphStack ) {
 605+ $output .= $paragraphStack.'<br />';
 606+ $paragraphStack = false;
 607+ $this->mLastSection = 'p';
 608+ } else {
 609+ if ($this->mLastSection != 'p' ) {
 610+ $output .= $this->closeParagraph();
 611+ $this->mLastSection = '';
 612+ $paragraphStack = '<p>';
 613+ } else {
 614+ $paragraphStack = '</p><p>';
 615+ }
 616+ }
 617+ } else {
 618+ if ( $paragraphStack ) {
 619+ $output .= $paragraphStack;
 620+ $paragraphStack = false;
 621+ $this->mLastSection = 'p';
 622+ } else if ($this->mLastSection != 'p') {
 623+ $output .= $this->closeParagraph().'<p>';
 624+ $this->mLastSection = 'p';
 625+ }
 626+ }
 627+ }
 628+ }
 629+ wfProfileOut( "$fname-paragraph" );
 630+ }
 631+ // somewhere above we forget to get out of pre block (bug 785)
 632+ if($preCloseMatch && $this->mInPre) {
 633+ $this->mInPre = false;
 634+ }
 635+ if ($paragraphStack === false) {
 636+ $output .= $t."\n";
 637+ }
 638+ }
 639+ while ( $prefixLength ) {
 640+ $output .= $this->closeList( $pref2{$prefixLength-1} );
 641+ --$prefixLength;
 642+ }
 643+ if ( '' != $this->mLastSection ) {
 644+ $output .= '</' . $this->mLastSection . '>';
 645+ $this->mLastSection = '';
 646+ }
 647+
 648+ wfProfileOut( $fname );
 649+ return $output;
 650+ }
446651 }
Index: trunk/extensions/FCKeditor/fckeditor_config.js
@@ -12,7 +12,7 @@
1313 ['Cut','Copy','Paste',/*'PasteText','PasteWord',*/'-','Print'],
1414 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
1515 ['SpecialChar','Table','Image','Rule'],
16 - ['MW_Template','MW_Ref','MW_Math'],
 16+ ['MW_Template','MW_Special','MW_Ref','MW_Math'],
1717 '/',
1818 ['FontFormat'],
1919 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
@@ -36,34 +36,65 @@
3737 // FCKConfig.DisableObjectResizing = true ;
3838
3939 FCKConfig.EditorAreaStyles = '\
40 -.FCK__MWTemplate \
 40+.FCK__MWTemplate, .FCK__MWRef, .FCK__MWSpecial, .FCK__MWReferences, .FCK__MWNowiki, .FCK__MWIncludeonly, .FCK__MWNoinclude, .FCK__MWOnlyinclude, .FCK__MWGallery \
4141 { \
4242 border: 1px dotted #00F; \
4343 background-position: center center; \
 44+ background-repeat: no-repeat; \
 45+ vertical-align: middle; \
 46+} \
 47+.FCK__MWTemplate \
 48+{ \
4449 background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_template.gif); \
45 - background-repeat: no-repeat; \
4650 width: 20px; \
4751 height: 15px; \
48 - vertical-align: middle; \
4952 } \
5053 .FCK__MWRef \
5154 { \
52 - border: 1px dotted #00F; \
53 - background-position: center center; \
5455 background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_ref.gif); \
55 - background-repeat: no-repeat; \
5656 width: 18px; \
5757 height: 15px; \
58 - vertical-align: middle; \
5958 } \
 59+.FCK__MWSpecial \
 60+{ \
 61+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_special.gif); \
 62+ width: 66px; \
 63+ height: 15px; \
 64+} \
 65+.FCK__MWNowiki \
 66+{ \
 67+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_nowiki.gif); \
 68+ width: 66px; \
 69+ height: 15px; \
 70+} \
 71+.FCK__MWIncludeonly \
 72+{ \
 73+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_includeonly.gif); \
 74+ width: 66px; \
 75+ height: 15px; \
 76+} \
 77+.FCK__MWNoinclude \
 78+{ \
 79+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_noinclude.gif); \
 80+ width: 66px; \
 81+ height: 15px; \
 82+} \
 83+.FCK__MWGallery \
 84+{ \
 85+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_gallery.gif); \
 86+ width: 66px; \
 87+ height: 15px; \
 88+} \
 89+.FCK__MWOnlyinclude \
 90+{ \
 91+ background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_onlyinclude.gif); \
 92+ width: 66px; \
 93+ height: 15px; \
 94+} \
6095 .FCK__MWReferences \
6196 { \
62 - border: 1px dotted #00F; \
63 - background-position: center center; \
6497 background-image: url(' + FCKConfig.PluginsPath + 'mediawiki/images/icon_references.gif); \
65 - background-repeat: no-repeat; \
6698 width: 66px; \
6799 height: 15px; \
68 - vertical-align: middle; \
69100 } \
70101 ' ;
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pms.php
@@ -0,0 +1,22 @@
 2+<?php
 3+
 4+$messages = array(
 5+ 'textrichditor' => 'Editor svicio',
 6+ 'tog-riched_disable' => 'Disabilité l\'editor svicio',
 7+ 'tog-riched_disable_ns_main' => 'Disabilité l\'editor svicio ant lë spassi nominal prinsipal',
 8+ 'tog-riched_disable_ns_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Talk}}"',
 9+ 'tog-riched_disable_ns_user' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User}}"',
 10+ 'tog-riched_disable_ns_user_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User_talk}}"',
 11+ 'tog-riched_disable_ns_project' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project}}"',
 12+ 'tog-riched_disable_ns_project_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project_talk}}"',
 13+ 'tog-riched_disable_ns_image' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image}}"',
 14+ 'tog-riched_disable_ns_image_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image_talk}}"',
 15+ 'tog-riched_disable_ns_mediawiki' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki}}"',
 16+ 'tog-riched_disable_ns_mediawiki_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki_talk}}"',
 17+ 'tog-riched_disable_ns_template' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template}}"',
 18+ 'tog-riched_disable_ns_template_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template_talk}}"',
 19+ 'tog-riched_disable_ns_help' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help}}"',
 20+ 'tog-riched_disable_ns_help_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help_talk}}"',
 21+ 'tog-riched_disable_ns_category' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category}}"',
 22+ 'tog-riched_disable_ns_category_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category_talk}}"',
 23+);
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.pms.php
___________________________________________________________________
Added: svn:eol-style
124 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r1881Move page / linkcache / memcached fixvibber08:54, 4 November 2003

Status & tagging log