Index: tags/extensions/Widgets/REL_0_9/smarty_plugins/modifier.validate.php |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * Smarty plugin |
| 5 | + * ------------------------------------------------------------- |
| 6 | + * File: modifier.validate.php |
| 7 | + * Type: modifier |
| 8 | + * Name: validate |
| 9 | + * Purpose: Validates parameter format ('url' by default). |
| 10 | + * Useful when you need to validate but not escape. |
| 11 | + * ------------------------------------------------------------- |
| 12 | + */ |
| 13 | +function smarty_modifier_validate($string, $type='url') |
| 14 | +{ |
| 15 | + // mapping for PHP filters (http://us2.php.net/manual/en/filter.constants.php) |
| 16 | + $filters = array( |
| 17 | + 'url' => FILTER_VALIDATE_URL, |
| 18 | + 'int' => FILTER_VALIDATE_INT, |
| 19 | + 'boolean' => FILTER_VALIDATE_BOOLEAN, |
| 20 | + 'float' => FILTER_VALIDATE_FLOAT, |
| 21 | + 'email' => FILTER_VALIDATE_EMAIL, |
| 22 | + 'ip' => FILTER_VALIDATE_IP |
| 23 | + ); |
| 24 | + |
| 25 | + if (array_key_exists($type, $filters) && filter_var($string, $filters[$type])) |
| 26 | + { |
| 27 | + return $string; |
| 28 | + } |
| 29 | + |
| 30 | + // unless it matched some validation rule, it's not valid |
| 31 | + return ''; |
| 32 | +} |
Property changes on: tags/extensions/Widgets/REL_0_9/smarty_plugins/modifier.validate.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 33 | + native |
Index: tags/extensions/Widgets/REL_0_9/Widgets.i18n.magic.php |
— | — | @@ -0,0 +1,27 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$magicWords = array(); |
| 5 | + |
| 6 | +$magicWords['en'] = array( |
| 7 | + 'widget' => array( 0, 'widget' ), |
| 8 | +); |
| 9 | + |
| 10 | +$magicWords['ar'] = array( |
| 11 | + 'widget' => array( '0', 'ودجة', 'widget' ), |
| 12 | +); |
| 13 | + |
| 14 | +$magicWords['arz'] = array( |
| 15 | + 'widget' => array( '0', 'ودجة', 'widget' ), |
| 16 | +); |
| 17 | + |
| 18 | +$magicWords['ko'] = array( |
| 19 | + 'widget' => array( '0', '위젯', 'widget' ), |
| 20 | +); |
| 21 | + |
| 22 | +$magicWords['mr'] = array( |
| 23 | + 'widget' => array( '0', 'विसाधन', 'widget' ), |
| 24 | +); |
| 25 | + |
| 26 | +$magicWords['ru'] = array( |
| 27 | + 'widget' => array( '0', 'виджет', 'widget' ), |
| 28 | +); |
Property changes on: tags/extensions/Widgets/REL_0_9/Widgets.i18n.magic.php |
___________________________________________________________________ |
Name: svn:keywords |
1 | 29 | + Id |
Name: svn:eol-style |
2 | 30 | + native |
Index: tags/extensions/Widgets/REL_0_9/Widgets.i18n.php |
— | — | @@ -0,0 +1,545 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for Widgets extension. |
| 5 | + * |
| 6 | + */ |
| 7 | + |
| 8 | +$messages = array(); |
| 9 | + |
| 10 | +$messages['en'] = array( |
| 11 | + 'widgets-desc' => 'Allows wiki administrators to add free-form widgets to the wiki by editing pages within the {{ns:widget}} namespace. |
| 12 | +Originally developed for [http://www.ardorado.com Ardorado.com]', |
| 13 | + 'widgets-error' => 'Error in [[{{ns:widget}}:$1|widget $1]]', |
| 14 | + 'group-widgeteditor' => 'Widget editors', |
| 15 | + 'group-widgeteditor-member' => 'Widget editor', |
| 16 | + 'grouppage-widgeteditor' => 'Project:Widget editors', |
| 17 | + 'right-editwidgets' => 'Create and edit [http://www.mediawiki.org/wiki/Extension:Widgets widgets] in the <tt>{{ns:widget}}</tt> namespace', |
| 18 | +); |
| 19 | + |
| 20 | +/** Message documentation (Message documentation) |
| 21 | + * @author Fryed-peach |
| 22 | + * @author Khaledelmansoury |
| 23 | + * @author Purodha |
| 24 | + * @author Siebrand |
| 25 | + * @author Umherirrender |
| 26 | + */ |
| 27 | +$messages['qqq'] = array( |
| 28 | + 'widgets-desc' => '{{desc}}', |
| 29 | + 'grouppage-widgeteditor' => '{{doc-important|Leave "Project:" untranslated}}', |
| 30 | + 'right-editwidgets' => '{{doc-right}}', |
| 31 | +); |
| 32 | + |
| 33 | +/** Arabic (العربية) |
| 34 | + * @author OsamaK |
| 35 | + */ |
| 36 | +$messages['ar'] = array( |
| 37 | + 'widgets-desc' => 'يسمح لإداري الويكي بإضافة ودجات حرة الشكل إلى الويكي بتحرير صفحات النطاق {{ns:widget}}. |
| 38 | +طُور أصلًا ب[http://www.ardorado.com Ardorado.com]', |
| 39 | + 'widgets-error' => 'خطأ في [[{{ns:widget}}:$1|الودجة $1]]', |
| 40 | + 'group-widgeteditor' => 'محررو الودجات', |
| 41 | + 'group-widgeteditor-member' => 'محرر ودجات', |
| 42 | + 'grouppage-widgeteditor' => 'Project:محررو الودجات', |
| 43 | + 'right-editwidgets' => 'تحرير الصفحات في نطاق "{{ns:widget}}"', |
| 44 | +); |
| 45 | + |
| 46 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 47 | + * @author EugeneZelenko |
| 48 | + * @author Jim-by |
| 49 | + */ |
| 50 | +$messages['be-tarask'] = array( |
| 51 | + 'widgets-desc' => 'Дазваляе адміністратарам {{GRAMMAR:родны|{{SITENAME}}}} дадаваць вольныя формы ў вікі праз рэдагаваньне старонак у прасторы назваў {{ns:widget}}. Арыгінальная распрацоўка для [http://www.ardorado.com Ardorado.com]', |
| 52 | + 'widgets-error' => 'Памылка ў [[{{ns:widget}}:$1|віджэце $1]]', |
| 53 | + 'group-widgeteditor' => 'Рэдактар віджэтаў', |
| 54 | + 'group-widgeteditor-member' => 'Рэдактар віджэта', |
| 55 | + 'grouppage-widgeteditor' => 'Project:Рэдактары віджэтаў', |
| 56 | + 'right-editwidgets' => 'стварэньне і рэдагаваньне [http://www.mediawiki.org/wiki/Extension:Widgets дапаўненьняў] у прасторы назваў <tt>{{ns:widget}}</tt>', |
| 57 | +); |
| 58 | + |
| 59 | +/** Breton (Brezhoneg) |
| 60 | + * @author Fulup |
| 61 | + * @author Y-M D |
| 62 | + */ |
| 63 | +$messages['br'] = array( |
| 64 | + 'widgets-desc' => "Talvezout a ra d'ar verourien da ouzhpennañ widgetoù d'ar wiki en ur gemmañ pajennoù en esaouenn anv {{ns:widget}}. Diorroet e penn-kentañ evit [http://www.ardorado.com Ardorado.com]", |
| 65 | + 'widgets-error' => 'Fazi e [[{{ns:widget}}:$1|widget $1]]', |
| 66 | + 'group-widgeteditor' => 'Aozerien widget', |
| 67 | + 'group-widgeteditor-member' => 'Aozer widget', |
| 68 | + 'grouppage-widgeteditor' => 'Project:Aozerien widget', |
| 69 | + 'right-editwidgets' => 'Krouiñ ha kemmañ ar [http://www.mediawiki.org/wiki/Extension:Widgets widgetoù] en esaouenn anv <tt>{{ns:widget}}<tt>', |
| 70 | +); |
| 71 | + |
| 72 | +/** Bosnian (Bosanski) |
| 73 | + * @author CERminator |
| 74 | + */ |
| 75 | +$messages['bs'] = array( |
| 76 | + 'widgets-desc' => 'Omogućuje wiki administratorima da dodaju dodatke u slobodnoj formi na wiki putem uređivanja stranica unutar imenskog prostora {{ns:widget}}. |
| 77 | +Prvobitno razvijeno za [http://www.ardorado.com Ardorado.com]', |
| 78 | + 'widgets-error' => 'Greška u [[{{ns:widget}}:$1|widgetu $1]]', |
| 79 | + 'group-widgeteditor' => 'Uređivači dodataka', |
| 80 | + 'group-widgeteditor-member' => 'Uređivač dodataka', |
| 81 | + 'grouppage-widgeteditor' => 'Project:Uređivač dodataka', |
| 82 | + 'right-editwidgets' => 'Pravljenje i uređivanje [http://www.mediawiki.org/wiki/Extension:Widgets widgeta] u imenskom prostoru <tt>{{ns:widget}}</tt>', |
| 83 | +); |
| 84 | + |
| 85 | +/** Catalan (Català) |
| 86 | + * @author Paucabot |
| 87 | + */ |
| 88 | +$messages['ca'] = array( |
| 89 | + 'right-editwidgets' => "Creeu i editeu [http://www.mediawiki.org/wiki/Extension:Widgets ginys] a l'espai de noms <tt>{{ns:widget}}</tt>", |
| 90 | +); |
| 91 | + |
| 92 | +/** Czech (Česky) |
| 93 | + * @author Kuvaly |
| 94 | + * @author Matěj Grabovský |
| 95 | + * @author Mormegil |
| 96 | + * @author Reaperman |
| 97 | + */ |
| 98 | +$messages['cs'] = array( |
| 99 | + 'widgets-desc' => 'Umožňuje správcům wiki přidávat na wiki ovládací prvky úpravou stránek ve jmenném prostoru {{ns:widget}}. |
| 100 | +Původně vyvinuto pro [http://www.ardorado.com Ardorado.com]', |
| 101 | + 'widgets-error' => 'Chyba ve [[{{ns:widget}}:$1|widgetu $1]]', |
| 102 | + 'group-widgeteditor' => 'Editoři ovládacích prvků', |
| 103 | + 'group-widgeteditor-member' => 'editor ovládacích prvků', |
| 104 | + 'grouppage-widgeteditor' => 'Project:Editoři ovládacích prvků', |
| 105 | + 'right-editwidgets' => 'Tvorba a úprava stránek [http://www.mediawiki.org/wiki/Extension:Widgets ovládacích prvků] ve jmenném prostoru „{{ns:widget}}“', |
| 106 | +); |
| 107 | + |
| 108 | +/** German (Deutsch) |
| 109 | + * @author Jan Luca |
| 110 | + * @author Pill |
| 111 | + * @author Sebastian Wallroth |
| 112 | + * @author The Evil IP address |
| 113 | + * @author Umherirrender |
| 114 | + */ |
| 115 | +$messages['de'] = array( |
| 116 | + 'widgets-desc' => 'Ermöglicht Wiki-Administratoren das Hinzufügen von Freiformat-Widgets durch das Bearbeiten von Seiten im {{ns:widget}}-Namensraum. |
| 117 | +Ursprünglich für [http://www.ardorado.com Ardorado.com] entwickelt', |
| 118 | + 'widgets-error' => 'Fehler im [[{{ns:widget}}:$1|Widget $1]]', |
| 119 | + 'group-widgeteditor' => 'Widget-Bearbeiter', |
| 120 | + 'group-widgeteditor-member' => 'Widget-Bearbeiter', |
| 121 | + 'grouppage-widgeteditor' => 'Project:Widget-Bearbeiter', |
| 122 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets Widgets] im <tt>{{ns:widget}}</tt>-Namensraum bearbeiten und erstellen', |
| 123 | +); |
| 124 | + |
| 125 | +/** Lower Sorbian (Dolnoserbski) |
| 126 | + * @author Michawiki |
| 127 | + */ |
| 128 | +$messages['dsb'] = array( |
| 129 | + 'widgets-desc' => 'Dowólujo wikijowym administratoram wikijeju pśez wobźěłowanje w mjenjowem rumje {{ns:widget}} swójske miniprogramy pśidaś. |
| 130 | +Spócetnje wuwity za [http://www.ardorado.com Ardorado.com]', |
| 131 | + 'widgets-error' => 'Zmólka w [[{{ns:widget}}:$1|miniprogramje $1]]', |
| 132 | + 'group-widgeteditor' => 'Wobźěłowarje miniprogramow', |
| 133 | + 'group-widgeteditor-member' => 'Wobźěłowaŕ miniprogramow', |
| 134 | + 'grouppage-widgeteditor' => 'Project: Wobźěłowarje miniprogramow', |
| 135 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets Woknowe elementy] w mjenjowem rumje <tt>{{ns:widget}}</tt> napóraś a wobźěłaś', |
| 136 | +); |
| 137 | + |
| 138 | +/** Greek (Ελληνικά) |
| 139 | + * @author Lou |
| 140 | + * @author Omnipaedista |
| 141 | + * @author ZaDiak |
| 142 | + */ |
| 143 | +$messages['el'] = array( |
| 144 | + 'widgets-desc' => 'Επιτρέπει στους βικι-διαχειριστές να προσθέσουν ελεύθερης μορφής γουίτζετ στο βίκι μέσω της επεξεργασίας σελίδων μέσα στον ονοματικό χώρο {{ns:widget}}. |
| 145 | +Ανεπτυγμένο αρχικά για το [http://www.ardorado.com Ardorado.com]', |
| 146 | + 'widgets-error' => 'Σφάλμα στο [[{{ns:widget}}:$1|widget $1]]', |
| 147 | + 'group-widgeteditor' => 'Επεξεργαστές Widget', |
| 148 | + 'group-widgeteditor-member' => 'Επεξεργαστής Widget', |
| 149 | + 'grouppage-widgeteditor' => 'Project:Επεξεργαστές Widget', |
| 150 | + 'right-editwidgets' => 'Δημιουργία και επεξεργασία [http://www.mediawiki.org/wiki/Extension:Widgets widgets] στην περιοχή ονομάτων <tt>{{ns:widget}}</tt>', |
| 151 | +); |
| 152 | + |
| 153 | +/** Spanish (Español) |
| 154 | + * @author Antur |
| 155 | + * @author Crazymadlover |
| 156 | + * @author Peter17 |
| 157 | + */ |
| 158 | +$messages['es'] = array( |
| 159 | + 'widgets-desc' => 'Permite a los administradores agregar widgets a la wiki editando páginas dentro del espacio de nombres {{ns:widget}}. |
| 160 | +Desarrollado originalmente para [http://www.ardorado.com Ardorado.com]', |
| 161 | + 'widgets-error' => 'Error en [[{{ns:widget}}:$1|widget $1]]', |
| 162 | + 'group-widgeteditor' => 'Editores de widget', |
| 163 | + 'group-widgeteditor-member' => 'Editor de widget', |
| 164 | + 'grouppage-widgeteditor' => 'Project:Editores de widget', |
| 165 | + 'right-editwidgets' => 'Crear y editar [http://www.mediawiki.org/wiki/Extension:Widgets widgets] en el espacio de nombre "{{ns:widget}}"', |
| 166 | +); |
| 167 | + |
| 168 | +/** Finnish (Suomi) |
| 169 | + * @author Cimon Avaro |
| 170 | + * @author Crt |
| 171 | + */ |
| 172 | +$messages['fi'] = array( |
| 173 | + 'widgets-desc' => 'Mahdollistaa wikin ylläpitäjille pienoisohjelmien lisäyksen vapaamuotoisina muokkaamalla sivua nimiavaruudessa {{ns:widget}}. |
| 174 | +Alun perin kehitetty [http://www.ardorado.com Ardorado.com]-sivustoa varten.', |
| 175 | + 'widgets-error' => 'Virhe [[{{ns:widget}}:$1|pienoisohjelmassa $1]]', |
| 176 | + 'group-widgeteditor' => 'pienoisohjelmien muokkaajat', |
| 177 | + 'group-widgeteditor-member' => 'pienoisohjelman muokkaaja', |
| 178 | + 'grouppage-widgeteditor' => 'Project:Pienoisohjelmien muokkaajat', |
| 179 | + 'right-editwidgets' => 'Luoda ja muokata [http://www.mediawiki.org/wiki/Extension:Widgets pienoisohjelmia] nimiavaruudessa <tt>{{ns:widget}}</tt>', |
| 180 | +); |
| 181 | + |
| 182 | +/** French (Français) |
| 183 | + * @author IAlex |
| 184 | + * @author Urhixidur |
| 185 | + */ |
| 186 | +$messages['fr'] = array( |
| 187 | + 'widgets-desc' => "Permet aux administrateurs du wiki d'ajouter des ''widgets'' (gadgets logiciels) au wiki en modifiant des pages dans l’espace de noms {{ns:widget}}. Développé à la base pour [http://www.ardorado.com Ardorado.com]", |
| 188 | + 'widgets-error' => 'Erreur dans le [[{{ns:widget}}:$1|widget $1]]', |
| 189 | + 'group-widgeteditor' => 'Modificateurs de widgets', |
| 190 | + 'group-widgeteditor-member' => 'modificateur de widgets', |
| 191 | + 'grouppage-widgeteditor' => 'Project:Modificateurs de widgets', |
| 192 | + 'right-editwidgets' => 'Créer et modifier les [http://www.mediawiki.org/wiki/Extension:Widgets widgets] dans l’espace de noms « {{ns:widget}} »', |
| 193 | +); |
| 194 | + |
| 195 | +/** Galician (Galego) |
| 196 | + * @author Toliño |
| 197 | + */ |
| 198 | +$messages['gl'] = array( |
| 199 | + 'widgets-desc' => 'Permite aos administradores do wiki engadir widgets cando se editan as páxinas do espazo de nomes "{{ns:widget}}". |
| 200 | +Desenvolvido orixinalmente para [http://www.ardorado.com Ardorado.com]', |
| 201 | + 'widgets-error' => 'Erro no [[{{ns:widget}}:$1|widget "$1"]]', |
| 202 | + 'group-widgeteditor' => 'Editores de widgets', |
| 203 | + 'group-widgeteditor-member' => 'Editor de widgets', |
| 204 | + 'grouppage-widgeteditor' => 'Project:Editores de widgets', |
| 205 | + 'right-editwidgets' => 'Crear e editar [http://www.mediawiki.org/wiki/Extension:Widgets widgets] no espazo de nomes <tt>{{ns:widget}}</tt>', |
| 206 | +); |
| 207 | + |
| 208 | +/** Swiss German (Alemannisch) |
| 209 | + * @author Als-Holder |
| 210 | + */ |
| 211 | +$messages['gsw'] = array( |
| 212 | + 'widgets-desc' => 'Erlaubt Wikiadministratore Frej-Form-Widgets zum Wiki zuezfiege dur d Bearbeitig vu Syte im {{ns:widget}}-Namensruum. |
| 213 | +Urspringlig entwicklet fir [http://www.ardorado.com Ardorado.com]', |
| 214 | + 'widgets-error' => 'Fähler im [[{{ns:widget}}:$1|Widget $1]]', |
| 215 | + 'group-widgeteditor' => 'Widget-Editore', |
| 216 | + 'group-widgeteditor-member' => 'Widget-Editor', |
| 217 | + 'grouppage-widgeteditor' => 'Project:Widget-Editore', |
| 218 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets Widgets] im <tt>{{ns:widget}}</tt>-Namensruum aalege un bearbeite', |
| 219 | +); |
| 220 | + |
| 221 | +/** Hebrew (עברית) |
| 222 | + * @author Rotemliss |
| 223 | + * @author YaronSh |
| 224 | + */ |
| 225 | +$messages['he'] = array( |
| 226 | + 'widgets-desc' => "מתן האפשרות למנהלי אתר הוויקי להוסיף וידג'טים הבנויים בצורה חופשית לאתר הוויקי באמצעות עריכת הדפים שבמרחב השם {{ns:widget}}. |
| 227 | +פותח במקור עבור [http://www.ardorado.com Ardorado.com]", |
| 228 | + 'widgets-error' => "שגיאה ב[[{{ns:widget}}:$1|ווידג'ט $1]]", |
| 229 | + 'group-widgeteditor' => "עורכי וידג'טים", |
| 230 | + 'group-widgeteditor-member' => "עורך וידג'טים", |
| 231 | + 'grouppage-widgeteditor' => "Project:עורכי וידג'טים", |
| 232 | + 'right-editwidgets' => 'עריכת דפים במרחב השם "{{ns:widget}}"', |
| 233 | +); |
| 234 | + |
| 235 | +/** Upper Sorbian (Hornjoserbsce) |
| 236 | + * @author Michawiki |
| 237 | + */ |
| 238 | +$messages['hsb'] = array( |
| 239 | + 'widgets-desc' => 'Dowola wikijowym administratoram wikijej přez wobdźěłowanje stronow znutřka mjenjoweho ruma {{ns:widget}} swójske miniprogramy přidać. |
| 240 | +Prěnjotnje za [http://www.ardorado.com Ardorado.com] wuwity.', |
| 241 | + 'widgets-error' => 'Zmylk w [[{{ns:widget}}:$1|miniprogramje $1]]', |
| 242 | + 'group-widgeteditor' => 'Wobdźěłowarjo miniprogramow', |
| 243 | + 'group-widgeteditor-member' => 'Wobdźěłowar miniprogramow', |
| 244 | + 'grouppage-widgeteditor' => 'Project:Wobdźěłowarjo miniprogramow', |
| 245 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets Woknowe elementy] w mjenowym rumje <tt>{{ns:widget}}</tt> wutworić a wobdźěłać', |
| 246 | +); |
| 247 | + |
| 248 | +/** Hungarian (Magyar) |
| 249 | + * @author Glanthor Reviol |
| 250 | + */ |
| 251 | +$messages['hu'] = array( |
| 252 | + 'widgets-desc' => 'Lehetővé teszi a wiki adminisztrátorainak, hogy kötetlen alakú minialkalmazásokat adjanak a wikihez lapok szerkesztésével a(z) {{ns:widget}} névtérben. Eredetileg az [http://www.ardorado.com Ardorado.com] számára kifejlesztve', |
| 253 | + 'widgets-error' => 'Hiba a(z) [[{{ns:widget}}:$1|$1 minialkalmazásban]]', |
| 254 | + 'group-widgeteditor' => 'Minialkalmazás szerkesztői', |
| 255 | + 'group-widgeteditor-member' => 'Minialkalmazás-szerkesztő', |
| 256 | + 'grouppage-widgeteditor' => 'Project:Minialkalmazás-szerkesztők', |
| 257 | + 'right-editwidgets' => 'widgetek létrehozása és szerkesztése a <tt>{{ns:widget}}</tt> névtérben', |
| 258 | +); |
| 259 | + |
| 260 | +/** Interlingua (Interlingua) |
| 261 | + * @author McDutchie |
| 262 | + */ |
| 263 | +$messages['ia'] = array( |
| 264 | + 'widgets-desc' => 'Permitte al administratores del wiki inserer widgets qualcunque in le wiki, per modificar paginas intra le spatio de nomines {{ns:widget}}. |
| 265 | +Originalmente disveloppate pro [http://www.ardorado.com Ardorado.com]', |
| 266 | + 'widgets-error' => 'Error in [[{{ns:widget}}:$1|widget $1]]', |
| 267 | + 'group-widgeteditor' => 'Modificatores de widgets', |
| 268 | + 'group-widgeteditor-member' => 'Modificator de widgets', |
| 269 | + 'grouppage-widgeteditor' => 'Project:Modificatores de widgets', |
| 270 | + 'right-editwidgets' => 'Crear e modificar [http://www.mediawiki.org/wiki/Extension:Widgets widgets] in le spatio de nomines <tt>{{ns:widget}}</tt>', |
| 271 | +); |
| 272 | + |
| 273 | +/** Indonesian (Bahasa Indonesia) |
| 274 | + * @author Bennylin |
| 275 | + */ |
| 276 | +$messages['id'] = array( |
| 277 | + 'widgets-desc' => 'Mengijinkan admin wiki untuk menambahkan widget ke wiki dengan menyunting halaman di ruang nama {{ns:widget}}. |
| 278 | + |
| 279 | +Mulanya dibuat untuk [http://www.ardorado.com Ardorado.com]', |
| 280 | + 'widgets-error' => 'Kesalahan pada [[{{ns:widget}}:$1|widget $1]]', |
| 281 | + 'group-widgeteditor' => 'Penyunting widget', |
| 282 | + 'group-widgeteditor-member' => 'Penyunting widget', |
| 283 | + 'grouppage-widgeteditor' => 'Project:Penyunting widget', |
| 284 | + 'right-editwidgets' => 'Sunting halaman di ruang nama "{{ns:widget}}"', |
| 285 | +); |
| 286 | + |
| 287 | +/** Italian (Italiano) |
| 288 | + * @author Darth Kule |
| 289 | + */ |
| 290 | +$messages['it'] = array( |
| 291 | + 'widgets-desc' => 'Permette agli amministratori del sito di aggiungere widget al sito modificando pagine nel namespace {{ns:widget}}. |
| 292 | +Sviluppato inizialmente per [http://www.ardorado.com Ardorado.com]', |
| 293 | + 'widgets-error' => 'Errore nel [[{{ns:widget}}:$1|widget $1]]', |
| 294 | + 'group-widgeteditor' => 'Editori widget', |
| 295 | + 'group-widgeteditor-member' => 'Editore widget', |
| 296 | + 'grouppage-widgeteditor' => 'Project:Editori widget', |
| 297 | + 'right-editwidgets' => 'Modifica pagine nel namespace "{{ns:widget}}"', |
| 298 | +); |
| 299 | + |
| 300 | +/** Japanese (日本語) |
| 301 | + * @author Fryed-peach |
| 302 | + * @author 青子守歌 |
| 303 | + */ |
| 304 | +$messages['ja'] = array( |
| 305 | + 'widgets-desc' => '管理者が「{{ns:widget}}」名前空間内のページを編集し、ウィキに自由な形式のウィジェットを追加できるようにする。元々は [http://www.ardorado.com Ardorado.com] のために開発されました', |
| 306 | + 'widgets-error' => '[[{{ns:widget}}:$1|ウィジェット $1]]にエラー', |
| 307 | + 'group-widgeteditor' => 'ウィジェット編集者', |
| 308 | + 'group-widgeteditor-member' => 'ウィジェット編集者', |
| 309 | + 'grouppage-widgeteditor' => 'Project:ウィジェット編集者', |
| 310 | + 'right-editwidgets' => '<tt>{{ns:widget}}</tt>名前空間で[http://www.mediawiki.org/wiki/Extension:Widgets ウィジット]を作成または編集する', |
| 311 | +); |
| 312 | + |
| 313 | +/** Ripoarisch (Ripoarisch) |
| 314 | + * @author Purodha |
| 315 | + */ |
| 316 | +$messages['ksh'] = array( |
| 317 | + 'widgets-desc' => 'Määt et müjjelesch, dat Wiki-Köbeße <i lang="en">Widgets</i> en ene freie Forrem en däm Appachtemang „{{ns:widget}}“ enndraare. |
| 318 | +Dat wood aanfänglesch projrammeert för <span lang="en">[http://www.ardorado.com Ardorado.com]</span>', |
| 319 | + 'widgets-error' => 'Doh es ene Fähler em [[{{ns:widget}}:$1|<i lang="en">Widget</i> $1]]', |
| 320 | + 'group-widgeteditor' => 'Schriiver för <i lang="en">Widgets</i>', |
| 321 | + 'group-widgeteditor-member' => '<i lang="en">Widget</i>-Schriiver', |
| 322 | + 'grouppage-widgeteditor' => 'Project:Widget-Schriiver', |
| 323 | + 'right-editwidgets' => 'Sigge em Appachemang „{{ns:widget}}“ ändere', |
| 324 | +); |
| 325 | + |
| 326 | +/** Luxembourgish (Lëtzebuergesch) |
| 327 | + * @author Robby |
| 328 | + */ |
| 329 | +$messages['lb'] = array( |
| 330 | + 'widgets-error' => 'Feeler an [[{{ns:widget}}:$1|widget $1]]', |
| 331 | + 'group-widgeteditor' => 'Widget-Editeuren', |
| 332 | + 'group-widgeteditor-member' => 'Widget-Editeur', |
| 333 | + 'grouppage-widgeteditor' => 'Project:Widget Editeuren', |
| 334 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets widgets] am <tt>{{ns:widget}}</tt> Nummraum uleeën an änneren', |
| 335 | +); |
| 336 | + |
| 337 | +/** Macedonian (Македонски) |
| 338 | + * @author Bjankuloski06 |
| 339 | + */ |
| 340 | +$messages['mk'] = array( |
| 341 | + 'widgets-desc' => 'Им овозможува на вики-администраторите да додаваат интерфејс-елементи со слободна форма на викито со уредување на страниците во рамките на именскиот простор {{ns:widget}}. |
| 342 | +Првобитно развиено за потребите на [http://www.ardorado.com Ardorado.com]', |
| 343 | + 'widgets-error' => 'Грешка во [[{{ns:widget}}:$1|интерфејс-елементот $1]]', |
| 344 | + 'group-widgeteditor' => 'Уредници на елементи од интерфејсот', |
| 345 | + 'group-widgeteditor-member' => 'Уредник на интерфејс-елементи (widgets)', |
| 346 | + 'grouppage-widgeteditor' => 'Project:Уредници на интерфејс-елементи (widgets)', |
| 347 | + 'right-editwidgets' => 'Создавање и уредување на [http://www.mediawiki.org/wiki/Extension:Widgets интерфејс-елементи] во именскиот простор <tt>{{ns:widget}}</tt>', |
| 348 | +); |
| 349 | + |
| 350 | +/** Dutch (Nederlands) |
| 351 | + * @author Siebrand |
| 352 | + */ |
| 353 | +$messages['nl'] = array( |
| 354 | + 'widgets-desc' => "Stelt wikibeheerders in staat naar eigen inzicht widgets aan de wiki toe te voegen door het bewerken van pagina's in de naamruimte {{ns:widget}}. Oorspronkelijk ontwikkeld voor [http://www.ardorado.com Ardorado.com]", |
| 355 | + 'widgets-error' => 'Fout in [[{{ns:widget}}:$1|widget $1]]', |
| 356 | + 'group-widgeteditor' => 'Widgetbewerkers', |
| 357 | + 'group-widgeteditor-member' => 'Widgetbewerker', |
| 358 | + 'grouppage-widgeteditor' => 'Project:Widgetbewerkers', |
| 359 | + 'right-editwidgets' => '[http://www.mediawiki.org/wiki/Extension:Widgets Widgets] aanmaken en bewerken in de naamruimte <tt>{{ns:widget}}</tt>', |
| 360 | +); |
| 361 | + |
| 362 | +/** Norwegian Nynorsk (Norsk (nynorsk)) |
| 363 | + * @author Harald Khan |
| 364 | + */ |
| 365 | +$messages['nn'] = array( |
| 366 | + 'right-editwidgets' => 'Endra sider i «{{ns:widget}}»-namnerommet', |
| 367 | +); |
| 368 | + |
| 369 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 370 | + * @author Nghtwlkr |
| 371 | + */ |
| 372 | +$messages['no'] = array( |
| 373 | + 'widgets-desc' => 'Tillater wikiadministratorer å legge til fri-form widgets til wikien ved å redigere siden innen {{ns:widget}}-navnerommet. |
| 374 | +Opprinnelig utviklet for [http://www.ardorado.com Ardorado.com]', |
| 375 | + 'widgets-error' => 'Feil i [[{{ns:widget}}:$1|widget $1]]', |
| 376 | + 'group-widgeteditor' => 'Bidragsytere for skjermelement', |
| 377 | + 'group-widgeteditor-member' => 'Bidragsyter for skjermelement', |
| 378 | + 'grouppage-widgeteditor' => 'Project:Bidragsytere for skjermelement', |
| 379 | + 'right-editwidgets' => 'Lag og rediger [http://www.mediawiki.org/wiki/Extension:Widgets skjermelement] i <tt>{{ns:widget}}</tt>-navnerommet', |
| 380 | +); |
| 381 | + |
| 382 | +/** Occitan (Occitan) |
| 383 | + * @author Cedric31 |
| 384 | + */ |
| 385 | +$messages['oc'] = array( |
| 386 | + 'widgets-desc' => "Permet als administrators del wiki d'apondre de widgets al wiki en modificant de paginas dins l'espac de noms {{ns:widget}}. Desvolopat a la basa per [http://www.ardorado.com Ardorado.com]", |
| 387 | + 'widgets-error' => 'Error dins lo [[{{ns:widget}}:$1|widget $1]]', |
| 388 | + 'group-widgeteditor' => 'Modificators de widgets', |
| 389 | + 'group-widgeteditor-member' => 'modificator de widgets', |
| 390 | + 'grouppage-widgeteditor' => 'Project:Modificators de widgets', |
| 391 | + 'right-editwidgets' => "Crear e modificar las [http://www.mediawiki.org/wiki/Extension:Widgets widgets] dins l'espaci de noms « {{ns:widget}} »", |
| 392 | +); |
| 393 | + |
| 394 | +/** Polish (Polski) |
| 395 | + * @author Sp5uhe |
| 396 | + * @author ToSter |
| 397 | + */ |
| 398 | +$messages['pl'] = array( |
| 399 | + 'widgets-desc' => 'Pozwala administratorom wiki na dodawanie widżetów w dowolnej formie do wiki poprzez edycję stron w przestrzeni nazw {{ns:widget}}. |
| 400 | +Pierwotnie stworzone dla [http://www.ardorado.com Ardorado.com]', |
| 401 | + 'widgets-error' => 'Błąd w [[{{ns:widget}}:$1|widżecie $1]]', |
| 402 | + 'group-widgeteditor' => 'Edytorzy widżetów', |
| 403 | + 'group-widgeteditor-member' => 'Edytor widżetów', |
| 404 | + 'grouppage-widgeteditor' => 'Project:Edytorzy widżetów', |
| 405 | + 'right-editwidgets' => 'Tworzenie i edycja [http://www.mediawiki.org/wiki/Extension:Widgets widżetów] w przestrzeni nazw <tt>{{ns:widget}}</tt>', |
| 406 | +); |
| 407 | + |
| 408 | +/** Piedmontese (Piemontèis) |
| 409 | + * @author Dragonòt |
| 410 | + */ |
| 411 | +$messages['pms'] = array( |
| 412 | + 'widgets-desc' => "A përmëtt a j'aministrador dla wiki ëd gionté ëd widget a forma lìbera a la wiki an modificand ëd le pàgine ant lë spassi nominal {{ns:widget}}. |
| 413 | +An prinsipi dësvilupà për [http://www.ardorado.com Ardorado.com]", |
| 414 | + 'widgets-error' => 'Eror an [[{{ns:widget}}:$1|widget $1]]', |
| 415 | + 'group-widgeteditor' => 'Editor ëd widget', |
| 416 | + 'group-widgeteditor-member' => 'Editor ëd widget', |
| 417 | + 'grouppage-widgeteditor' => 'Project:Editor ëd widget', |
| 418 | + 'right-editwidgets' => 'Crea e modìfica [http://www.mediawiki.org/wiki/Extension:Widgets widgets] ant lë spassi nominal <tt>{{ns:widget}}</tt>', |
| 419 | +); |
| 420 | + |
| 421 | +/** Portuguese (Português) |
| 422 | + * @author Hamilton Abreu |
| 423 | + */ |
| 424 | +$messages['pt'] = array( |
| 425 | + 'widgets-desc' => "Permite que os administradores da wiki adicionem ''widgets free-form'' à wiki, editando páginas no espaço nominal {{ns:widget}}. |
| 426 | +Desenvolvido originalmente para [http://www.ardorado.com Ardorado.com]", |
| 427 | + 'widgets-error' => "Erro no [[{{ns:widget}}:$1|''widget'' $1]]", |
| 428 | + 'group-widgeteditor' => "Editores de ''widgets''", |
| 429 | + 'group-widgeteditor-member' => "Editor de ''widgets''", |
| 430 | + 'grouppage-widgeteditor' => "Project:Editores de ''widgets''", |
| 431 | + 'right-editwidgets' => 'Criar e editar [http://www.mediawiki.org/wiki/Extension:Widgets widgets] no espaço nominal <tt>{{ns:widget}}</tt>', |
| 432 | +); |
| 433 | + |
| 434 | +/** Brazilian Portuguese (Português do Brasil) |
| 435 | + * @author Eduardo.mps |
| 436 | + * @author Heldergeovane |
| 437 | + */ |
| 438 | +$messages['pt-br'] = array( |
| 439 | + 'widgets-desc' => 'Permite a administradores de wiki adicionar "widgets" para a wiki editando páginas no domínio {{ns:widget}}. |
| 440 | +Desenvolvido originalmente para [http://www.ardorado.com Ardorado.com]', |
| 441 | + 'widgets-error' => 'Erro em [[{{ns:widget}}:$1|widget $1]]', |
| 442 | + 'group-widgeteditor' => 'Editores de widget', |
| 443 | + 'group-widgeteditor-member' => 'Editor de widget', |
| 444 | + 'grouppage-widgeteditor' => 'Project:Editores de widget', |
| 445 | + 'right-editwidgets' => 'Páginas editadas no espaço nominal "{{ns:widget}}"', |
| 446 | +); |
| 447 | + |
| 448 | +/** Tarandíne (Tarandíne) |
| 449 | + * @author Joetaras |
| 450 | + */ |
| 451 | +$messages['roa-tara'] = array( |
| 452 | + 'widgets-error' => "Errore jndr'à [[{{ns:widget}}:$1|widget $1]]", |
| 453 | +); |
| 454 | + |
| 455 | +/** Russian (Русский) |
| 456 | + * @author Александр Сигачёв |
| 457 | + */ |
| 458 | +$messages['ru'] = array( |
| 459 | + 'widgets-desc' => 'Позволяет администраторам вики добавлять различные виджеты, посредством редактирования страниц пространства имён {{ns:widget}}. Изначально разработано для [http://www.ardorado.com Ardorado.com]', |
| 460 | + 'widgets-error' => 'Ошибка в [[{{ns:widget}}:$1|виджете $1]]', |
| 461 | + 'group-widgeteditor' => 'Редакторы виджетов', |
| 462 | + 'group-widgeteditor-member' => 'Редактор виджетов', |
| 463 | + 'grouppage-widgeteditor' => 'Project:Редакторы виджетов', |
| 464 | + 'right-editwidgets' => 'создавать и редактировать [http://www.mediawiki.org/wiki/Extension:Widgets виджеты] страницы в пространстве имён <tt>{{ns:widget}}</tt>', |
| 465 | +); |
| 466 | + |
| 467 | +/** Slovak (Slovenčina) |
| 468 | + * @author Helix84 |
| 469 | + */ |
| 470 | +$messages['sk'] = array( |
| 471 | + 'widgets-desc' => 'Umožňuje správcom wiki pridávať ovládacie prvky na wiki úpravou stránky v mennom priestore {{ns:widget}}. |
| 472 | +Pôvodne vyvinuté pre [http://www.ardorado.com Ardorado.com]', |
| 473 | + 'widgets-error' => 'Chyba v [[{{ns:widget}}:$1|ovládacom prvku $1]]', |
| 474 | + 'group-widgeteditor' => 'Editori ovládacích prvkov', |
| 475 | + 'group-widgeteditor-member' => 'Editor ovládacích prvkov', |
| 476 | + 'grouppage-widgeteditor' => 'Project:Editori ovládacích prvkov', |
| 477 | + 'right-editwidgets' => 'upravovať stránky v mennom priestore „{{ns:widget}}“', |
| 478 | +); |
| 479 | + |
| 480 | +/** Swedish (Svenska) |
| 481 | + * @author Ozp |
| 482 | + * @author Per |
| 483 | + */ |
| 484 | +$messages['sv'] = array( |
| 485 | + 'widgets-error' => 'Fel i [[{{ns:widget}}:$1|widget $1]]', |
| 486 | + 'group-widgeteditor' => 'Widgeteditorer', |
| 487 | +); |
| 488 | + |
| 489 | +/** Ukrainian (Українська) |
| 490 | + * @author Prima klasy4na |
| 491 | + */ |
| 492 | +$messages['uk'] = array( |
| 493 | + 'widgets-desc' => 'Дозволяє адміністраторам вікі додавати різноманітні віджети шляхом редагування сторінок простору назв {{ns:widget}}. Спочатку розроблений для [http://www.ardorado.com Ardorado.com]', |
| 494 | + 'widgets-error' => 'Помилка [[{{ns:widget}}:$1|віджету $1]]', |
| 495 | + 'group-widgeteditor' => 'Редактори віджетів', |
| 496 | + 'group-widgeteditor-member' => 'Редактор віджетів', |
| 497 | + 'grouppage-widgeteditor' => 'Project:Редактори віджетів', |
| 498 | + 'right-editwidgets' => 'Створювати і редагувати [http://www.mediawiki.org/wiki/Extension:Widgets віджети] у просторі назв <tt>{{ns:widget}}</tt>', |
| 499 | +); |
| 500 | + |
| 501 | +/** Vietnamese (Tiếng Việt) |
| 502 | + * @author Minh Nguyen |
| 503 | + */ |
| 504 | +$messages['vi'] = array( |
| 505 | + 'widgets-desc' => 'Cho phép các quản lý viên wiki thêm công cụ đa năng vào wiki bằng cách sửa đổi trang trong không gian tên {{ns:widget}}. |
| 506 | +Mới đầu được phát triển cho [http://www.ardorado.com Ardorado.com].', |
| 507 | + 'widgets-error' => 'Lỗi trong [[{{ns:widget}}:$1|công cụ đa năng $1]]', |
| 508 | + 'group-widgeteditor' => 'Người sửa công cụ đa năng', |
| 509 | + 'group-widgeteditor-member' => 'Người sửa công cụ đa năng', |
| 510 | + 'grouppage-widgeteditor' => 'Project:Người sửa công cụ đa năng', |
| 511 | + 'right-editwidgets' => 'Tạo và sửa [http://www.mediawiki.org/wiki/Extension:Widgets?uselang=vi công cụ đa năng] trong không gian tên <tt>{{ns:widget}}</tt>', |
| 512 | +); |
| 513 | + |
| 514 | +/** Yue (粵語) */ |
| 515 | +$messages['yue'] = array( |
| 516 | + 'widgets-desc' => '容許wiki管理員響{{ns:widget}}空間名度加入自由形式嘅widget響個wiki度。 |
| 517 | +原先為[http://www.ardorado.com Ardorado.com]而設計嘅', |
| 518 | + 'widgets-error' => '響[[{{ns:widget}}:$1|widget $1]]出錯', |
| 519 | + 'group-widgeteditor' => 'Widget編輯器', |
| 520 | + 'group-widgeteditor-member' => 'Widget編輯器', |
| 521 | + 'grouppage-widgeteditor' => 'Project:Widget編輯器', |
| 522 | + 'right-editwidgets' => '響"{{ns:widget}}"空間名度編輯頁', |
| 523 | +); |
| 524 | + |
| 525 | +/** Simplified Chinese (中文(简体)) */ |
| 526 | +$messages['zh-hans'] = array( |
| 527 | + 'widgets-desc' => '容许wiki管理员在{{ns:widget}}名字空间中加入自由形式的widget至wiki中。 |
| 528 | +原先为[http://www.ardorado.com Ardorado.com]设计', |
| 529 | + 'widgets-error' => '在[[{{ns:widget}}:$1|widget $1]]发生错误', |
| 530 | + 'group-widgeteditor' => 'Widget编辑器', |
| 531 | + 'group-widgeteditor-member' => 'Widget编辑器', |
| 532 | + 'grouppage-widgeteditor' => 'Project:Widget编辑器', |
| 533 | + 'right-editwidgets' => '在"{{ns:widget}}"名字空间中编辑页面', |
| 534 | +); |
| 535 | + |
| 536 | +/** Traditional Chinese (中文(繁體)) */ |
| 537 | +$messages['zh-hant'] = array( |
| 538 | + 'widgets-desc' => '容許wiki管理員在{{ns:widget}}名字空間中加入自由形式的widget至wiki中。 |
| 539 | +原先為[http://www.ardorado.com Ardorado.com]設計', |
| 540 | + 'widgets-error' => '在[[{{ns:widget}}:$1|widget $1]]發生錯誤', |
| 541 | + 'group-widgeteditor' => 'Widget編輯器', |
| 542 | + 'group-widgeteditor-member' => 'Widget編輯器', |
| 543 | + 'grouppage-widgeteditor' => 'Project:Widget編輯器', |
| 544 | + 'right-editwidgets' => '在"{{ns:widget}}"名字空間中編輯頁面', |
| 545 | +); |
| 546 | + |
Property changes on: tags/extensions/Widgets/REL_0_9/Widgets.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 547 | + native |
Index: tags/extensions/Widgets/REL_0_9/compiled_templates/.htaccess |
— | — | @@ -0,0 +1,3 @@ |
| 2 | +<Files *.php> |
| 3 | + deny from all |
| 4 | +</Files> |
Property changes on: tags/extensions/Widgets/REL_0_9/compiled_templates/.htaccess |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 5 | + native |
Property changes on: tags/extensions/Widgets/REL_0_9/compiled_templates |
___________________________________________________________________ |
Name: svn:ignore |
2 | 6 | + * |
Index: tags/extensions/Widgets/REL_0_9/Widgets.php |
— | — | @@ -0,0 +1,266 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * {{#widget:<WidgetName>|<name1>=<value1>|<name2>=<value2>}} |
| 6 | + * |
| 7 | + * @author Sergey Chernyshev |
| 8 | + * @version $Id: Widgets.php 15 2008-06-25 21:22:40Z sergey.chernyshev $ |
| 9 | + */ |
| 10 | + |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 12 | + echo "This file is not a valid entry point."; |
| 13 | + exit( 1 ); |
| 14 | +} |
| 15 | + |
| 16 | +$wgExtensionCredits['parserhook'][] = array( |
| 17 | + 'path' => __FILE__, |
| 18 | + 'name' => 'Widgets', |
| 19 | + 'descriptionmsg' => 'widgets-desc', |
| 20 | + 'version' => '0.9', |
| 21 | + 'author' => '[http://www.sergeychernyshev.com Sergey Chernyshev]', |
| 22 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Widgets' |
| 23 | +); |
| 24 | + |
| 25 | +/** |
| 26 | + * Set this to the index of the Widget namespace |
| 27 | + */ |
| 28 | +if ( !defined( 'NS_WIDGET' ) ) { |
| 29 | + define( 'NS_WIDGET', 274 ); |
| 30 | +} |
| 31 | +if ( !defined( 'NS_WIDGET_TALK' ) ) { |
| 32 | + define( 'NS_WIDGET_TALK', NS_WIDGET + 1 ); |
| 33 | +} elseif ( NS_WIDGET_TALK != NS_WIDGET + 1 ) { |
| 34 | + throw new MWException( 'Configuration error. Do not define NS_WIDGET_TALK, it is automatically set based on NS_WIDGET.' ); |
| 35 | +} |
| 36 | + |
| 37 | +// Define new namespaces |
| 38 | +$wgExtraNamespaces[NS_WIDGET] = 'Widget'; |
| 39 | +$wgExtraNamespaces[NS_WIDGET_TALK] = 'Widget_talk'; |
| 40 | + |
| 41 | +// Support subpages only for talk pages by default |
| 42 | +$wgNamespacesWithSubpages[NS_WIDGET_TALK] = true; |
| 43 | + |
| 44 | +// Define new right |
| 45 | +$wgAvailableRights[] = 'editwidgets'; |
| 46 | + |
| 47 | +// Set this to true to use FlaggedRevs extension's stable version for widget security |
| 48 | +$wgWidgetsUseFlaggedRevs = false; |
| 49 | + |
| 50 | +$dir = dirname( __FILE__ ) . '/'; |
| 51 | + |
| 52 | +// Initialize Smarty |
| 53 | +require_once( $dir . 'smarty/Smarty.class.php' ); |
| 54 | +$wgExtensionMessagesFiles['Widgets'] = $dir . 'Widgets.i18n.php'; |
| 55 | + |
| 56 | +if( defined('MW_SUPPORTS_LOCALISATIONCACHE') ) { |
| 57 | + $wgExtensionMessagesFiles['WidgetsMagic'] = $dir . 'Widgets.i18n.magic.php'; |
| 58 | +} else { |
| 59 | + // Pre 1.16alpha backward compatibility for magic words |
| 60 | + $wgHooks['LanguageGetMagic'][] = 'widgetLanguageGetMagic'; |
| 61 | +} |
| 62 | + |
| 63 | +function widgetLanguageGetMagic( &$magicWords, $langCode = 'en' ) { |
| 64 | + switch ( $langCode ) { |
| 65 | + default: |
| 66 | + $magicWords['widget'] = array ( 0, 'widget' ); |
| 67 | + } |
| 68 | + return true; |
| 69 | +} |
| 70 | + |
| 71 | +// Parser function registration |
| 72 | +$wgExtensionFunctions[] = 'widgetNamespacesInit'; |
| 73 | +$wgHooks['ParserFirstCallInit'][] = 'widgetParserFunctions'; |
| 74 | +$wgHooks['ParserAfterTidy'][] = 'processEncodedWidgetOutput'; |
| 75 | + |
| 76 | +function widgetParserFunctions( &$parser ) { |
| 77 | + $parser->setFunctionHook( 'widget', 'renderWidget' ); |
| 78 | + |
| 79 | + return true; |
| 80 | +} |
| 81 | + |
| 82 | +function renderWidget ( &$parser, $widgetName ) { |
| 83 | + global $IP; |
| 84 | + |
| 85 | + $smarty = new Smarty; |
| 86 | + $smarty->left_delimiter = '<!--{'; |
| 87 | + $smarty->right_delimiter = '}-->'; |
| 88 | + $smarty->compile_dir = "$IP/extensions/Widgets/compiled_templates/"; |
| 89 | + |
| 90 | + // registering custom Smarty plugins |
| 91 | + $smarty->plugins_dir[] = "$IP/extensions/Widgets/smarty_plugins/"; |
| 92 | + |
| 93 | + $smarty->security = true; |
| 94 | + $smarty->security_settings = array( |
| 95 | + 'IF_FUNCS' => array( |
| 96 | + 'is_array', |
| 97 | + 'isset', |
| 98 | + 'array', |
| 99 | + 'list', |
| 100 | + 'count', |
| 101 | + 'sizeof', |
| 102 | + 'in_array', |
| 103 | + 'true', |
| 104 | + 'false', |
| 105 | + 'null' |
| 106 | + ), |
| 107 | + 'MODIFIER_FUNCS' => array( 'validate' ) |
| 108 | + ); |
| 109 | + |
| 110 | + // register the resource name "db" |
| 111 | + $smarty->register_resource( |
| 112 | + 'wiki', |
| 113 | + array( |
| 114 | + 'wiki_get_template', |
| 115 | + 'wiki_get_timestamp', |
| 116 | + 'wiki_get_secure', |
| 117 | + 'wiki_get_trusted' |
| 118 | + ) |
| 119 | + ); |
| 120 | + |
| 121 | + $params = func_get_args(); |
| 122 | + array_shift( $params ); # first one is parser - we don't need it |
| 123 | + array_shift( $params ); # second one is widget name |
| 124 | + |
| 125 | + $params_tree = array(); |
| 126 | + |
| 127 | + foreach ( $params as $param ) { |
| 128 | + $pair = explode('=', $param, 2); |
| 129 | + |
| 130 | + if ( count( $pair ) == 2 ) { |
| 131 | + $key = trim($pair[0]); |
| 132 | + $val = trim($pair[1]); |
| 133 | + } else { |
| 134 | + $key = $param; |
| 135 | + $val = true; |
| 136 | + } |
| 137 | + |
| 138 | + if ( $val == 'false' ) { |
| 139 | + $val = false; |
| 140 | + } |
| 141 | + |
| 142 | + /* If the name of the parameter has object notation |
| 143 | + |
| 144 | + a.b.c.d |
| 145 | + |
| 146 | + then we assign stuff to hash of hashes, not scalar |
| 147 | + |
| 148 | + */ |
| 149 | + $keys = explode( '.', $key ); |
| 150 | + |
| 151 | + // $subtree will be moved from top to the bottom and at the end will point to the last level |
| 152 | + $subtree =& $params_tree; |
| 153 | + |
| 154 | + // go throught all the keys but last one |
| 155 | + $last_key = array_pop( $keys ); |
| 156 | + |
| 157 | + foreach ( $keys as $subkey ) { |
| 158 | + // if next level of subtree doesn't exist yet, create an empty one |
| 159 | + if ( !array_key_exists( $subkey, $subtree ) ) { |
| 160 | + $subtree[$subkey] = array(); |
| 161 | + } |
| 162 | + |
| 163 | + // move to the lower level |
| 164 | + $subtree =& $subtree[$subkey]; |
| 165 | + } |
| 166 | + |
| 167 | + // last portion of the key points to itself |
| 168 | + if ( isset( $subtree[$last_key] ) ) { |
| 169 | + // if already an array, push into it, otherwise, convert into array first |
| 170 | + if ( !is_array( $subtree[$last_key] ) ) { |
| 171 | + $subtree[$last_key] = array( $subtree[$last_key] ); |
| 172 | + } |
| 173 | + |
| 174 | + $subtree[$last_key][] = $val; |
| 175 | + } else { |
| 176 | + // doesn't exist yet, just setting a value |
| 177 | + $subtree[$last_key] = $val; |
| 178 | + } |
| 179 | + } |
| 180 | + |
| 181 | + $smarty->assign( $params_tree ); |
| 182 | + |
| 183 | + try { |
| 184 | + $output = $smarty->fetch( "wiki:$widgetName" ); |
| 185 | + } catch ( Exception $e ) { |
| 186 | + wfLoadExtensionMessages( 'Widgets' ); |
| 187 | + return '<div class=\"error\">' . wfMsgExt( 'widgets-desc', array( 'parsemag' ), htmlentities($widgetName) ) . '</div>'; |
| 188 | + } |
| 189 | + |
| 190 | + // Hide the widget from the parser |
| 191 | + $output = '<!-- ENCODED_CONTENT '.base64_encode($output).' -->'; |
| 192 | + return $parser->insertStripItem( $output, $parser->mStripState ); |
| 193 | +} |
| 194 | + |
| 195 | +function processEncodedWidgetOutput( &$out, &$text ) { |
| 196 | + // Find all hidden content and restore to normal |
| 197 | + $text = preg_replace( |
| 198 | + '/<!-- ENCODED_CONTENT ([0-9a-zA-Z\/+]+=*)* -->/esm', |
| 199 | + 'base64_decode("$1")', |
| 200 | + $text |
| 201 | + ); |
| 202 | + |
| 203 | + return true; |
| 204 | +} |
| 205 | + |
| 206 | +function widgetNamespacesInit() { |
| 207 | + global $wgGroupPermissions, $wgNamespaceProtection, $wgWidgetsUseFlaggedRevs; |
| 208 | + |
| 209 | + if (!$wgWidgetsUseFlaggedRevs) |
| 210 | + { |
| 211 | + // Assign editing to widgeteditor group only (widgets can be dangerous so we do it here, not in LocalSettings) |
| 212 | + $wgGroupPermissions['*']['editwidgets'] = false; |
| 213 | + $wgGroupPermissions['widgeteditor']['editwidgets'] = true; |
| 214 | + |
| 215 | + // Setting required namespace permission rights |
| 216 | + $wgNamespaceProtection[NS_WIDGET] = array( 'editwidgets' ); |
| 217 | + } |
| 218 | +} |
| 219 | + |
| 220 | +// put these function somewhere in your application |
| 221 | +function wiki_get_template( $widgetName, &$widgetCode, &$smarty_obj ) { |
| 222 | + global $wgWidgetsUseFlaggedRevs; |
| 223 | + |
| 224 | + $widgetTitle = Title::newFromText($widgetName, NS_WIDGET); |
| 225 | + if ( $widgetTitle && $widgetTitle->exists() ) { |
| 226 | + if ($wgWidgetsUseFlaggedRevs) |
| 227 | + { |
| 228 | + $flaggedWidgetArticle = FlaggedArticle::getTitleInstance( $widgetTitle ); |
| 229 | + $flaggedWidgetArticleRevision = $flaggedWidgetArticle->getStableRev(); |
| 230 | + $widgetCode = $flaggedWidgetArticleRevision->getRevText(); |
| 231 | + } |
| 232 | + else |
| 233 | + { |
| 234 | + $widgetArticle = new Article( $widgetTitle, 0 ); |
| 235 | + $widgetCode = $widgetArticle->getContent(); |
| 236 | + } |
| 237 | + |
| 238 | + // Remove <noinclude> sections and <includeonly> tags from form definition |
| 239 | + $widgetCode = StringUtils::delimiterReplace( '<noinclude>', '</noinclude>', '', $widgetCode ); |
| 240 | + $widgetCode = strtr( $widgetCode, array( '<includeonly>' => '', '</includeonly>' => '' ) ); |
| 241 | + |
| 242 | + return true; |
| 243 | + } else { |
| 244 | + return false; |
| 245 | + } |
| 246 | +} |
| 247 | + |
| 248 | +function wiki_get_timestamp( $widgetName, &$widgetTimestamp, &$smarty_obj ) { |
| 249 | + $widgetTitle = Title::newFromText( $widgetName, NS_WIDGET ); |
| 250 | + if ($widgetTitle && $widgetTitle->exists()) { |
| 251 | + $widgetArticle = new Article( $widgetTitle, 0 ); |
| 252 | + $widgetTimestamp = $widgetArticle->getTouched(); |
| 253 | + |
| 254 | + return true; |
| 255 | + } else { |
| 256 | + return false; |
| 257 | + } |
| 258 | +} |
| 259 | + |
| 260 | +function wiki_get_secure( $tpl_name, &$smarty_obj ) { |
| 261 | + // assume all templates are secure |
| 262 | + return true; |
| 263 | +} |
| 264 | + |
| 265 | +function wiki_get_trusted( $tpl_name, &$smarty_obj ) { |
| 266 | + // not used for templates |
| 267 | +} |
Property changes on: tags/extensions/Widgets/REL_0_9/Widgets.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 268 | + native |
Index: tags/extensions/Widgets/REL_0_9/Makefile |
— | — | @@ -0,0 +1,30 @@ |
| 2 | +all: |
| 3 | + |
| 4 | +rel: release |
| 5 | +release: |
| 6 | +ifndef v |
| 7 | + # Must specify version as 'v' param |
| 8 | + # |
| 9 | + # make rel v=1.1.1 |
| 10 | + # |
| 11 | +else |
| 12 | + # |
| 13 | + # Tagging it with release tag |
| 14 | + # |
| 15 | + svn copy . svn+ssh://sergeychernyshev@svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Widgets/REL_${subst .,_,${v}}/ |
| 16 | + # |
| 17 | + # Creating release tarball and zip |
| 18 | + # |
| 19 | + svn export http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Widgets/REL_${subst .,_,${v}}/ Widgets |
| 20 | + svn export smarty Widgets/smarty |
| 21 | + # Not including Makefile into the package since it's not doing anything but release packaging |
| 22 | + rm Widgets/Makefile |
| 23 | + tar -c Widgets |gzip > Widgets_${v}.tgz |
| 24 | + zip -r Widgets_${v}.zip Widgets |
| 25 | + rm -rf Widgets |
| 26 | + |
| 27 | + # upload to Google Code repository (need account with enough permissions) |
| 28 | + googlecode/googlecode_upload.py -s "MediaWiki Widgets Extension v${v} (tarball)" -p mediawiki-widgets -l "Featured,Type-Archive,OpSys-All" Widgets_${v}.tgz |
| 29 | + googlecode/googlecode_upload.py -s "MediaWiki Widgets Extension v${v} (zip)" -p mediawiki-widgets -l "Featured,Type-Archive,OpSys-All" Widgets_${v}.zip |
| 30 | + rm Widgets_${v}.tgz Widgets_${v}.zip |
| 31 | +endif |
Property changes on: tags/extensions/Widgets/REL_0_9/Makefile |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 32 | + native |
Property changes on: tags/extensions/Widgets/REL_0_9 |
___________________________________________________________________ |
Name: svn:externals |
2 | 33 | + smarty http://smarty-php.googlecode.com/svn/tags/Smarty_2_6_18/libs/ |