Index: trunk/extensions/AjaxLoginJQ/AjaxLogin.i18n.php |
— | — | @@ -0,0 +1,630 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * Internationalization file for AjaxLogin extension.
|
| 5 | + *
|
| 6 | + * @file
|
| 7 | + * @ingroup Extensions
|
| 8 | + */
|
| 9 | +
|
| 10 | +$messages = array();
|
| 11 | +
|
| 12 | +/** English
|
| 13 | + * @author Inez Korczyński <korczynski@gmail.com>
|
| 14 | + */
|
| 15 | +$messages['en'] = array(
|
| 16 | + 'ajaxlogin-desc' => 'Dynamic box which allow users to login and remind password',
|
| 17 | + 'ajaxLogin1' => 'To complete your log in, you must enter a new password.
|
| 18 | +This will take you away from this edit page and you may lose your current edit.',
|
| 19 | + 'ajaxLogin2' => 'Are you sure?
|
| 20 | +You may lose your changes to this page if you leave this page now.',
|
| 21 | + 'ajaxlogin-create' => 'Create an account',
|
| 22 | + 'nosuchuser' => 'There is no user by the name "$1".
|
| 23 | +User names are case sensitive.
|
| 24 | +Check your spelling.',
|
| 25 | +);
|
| 26 | +
|
| 27 | +/** Message documentation (Message documentation)
|
| 28 | + * @author Purodha
|
| 29 | + */
|
| 30 | +$messages['qqq'] = array(
|
| 31 | + 'ajaxlogin-desc' => 'Short description of this extension, shown in [[Special:Version]]. Do not translate or change links or tag names.',
|
| 32 | +);
|
| 33 | +
|
| 34 | +/** Arabic (العربية)
|
| 35 | + * @author Meno25
|
| 36 | + */
|
| 37 | +$messages['ar'] = array(
|
| 38 | + 'ajaxlogin-desc' => 'صندوق ديناميكي يسمح للمستخدمين بتسجيل الدخول ويذكرهم بكلمة السر',
|
| 39 | + 'ajaxLogin1' => 'لإكمال تسجيل دخولك، يجب ان تدخل كلمة سر جديدة.
|
| 40 | +هذا سيأخذك من صفحة التعديل هذه وربما تفقد تعديلك الحالي.',
|
| 41 | + 'ajaxLogin2' => 'هل أنت متأكد؟
|
| 42 | +ربما تفقد تغييراتك لهذه الصفحة لو أنك تركت هذه الصفحة الآن.',
|
| 43 | + 'ajaxlogin-create' => 'إنشاء حساب',
|
| 44 | +);
|
| 45 | +
|
| 46 | +/** Bulgarian (Български)
|
| 47 | + * @author DCLXVI
|
| 48 | + */
|
| 49 | +$messages['bg'] = array(
|
| 50 | + 'ajaxlogin-create' => 'Създаване на сметка',
|
| 51 | +);
|
| 52 | +
|
| 53 | +/** Bosnian (Bosanski)
|
| 54 | + * @author CERminator
|
| 55 | + */
|
| 56 | +$messages['bs'] = array(
|
| 57 | + 'ajaxlogin-desc' => 'Dinamička kutija koja omogućuje korisnicima prijavu i pamćenje šifre',
|
| 58 | + 'ajaxLogin1' => 'Da bi ste završili Vašu prijavu, morate unijeti šifru.
|
| 59 | +Ovo će Vas preusmjeriti sa ove stranice za uređivanje i ukloniti Vaše trenutne izmjene.',
|
| 60 | + 'ajaxLogin2' => 'Da li ste sigurni?
|
| 61 | +Možete izgubiti promjene koje ste napravili na ovoj stranicu ako sada napustite ovu stranicu.',
|
| 62 | + 'ajaxlogin-create' => 'Napravite račun',
|
| 63 | +);
|
| 64 | +
|
| 65 | +/** Catalan (Català)
|
| 66 | + * @author SMP
|
| 67 | + * @author Solde
|
| 68 | + */
|
| 69 | +$messages['ca'] = array(
|
| 70 | + 'ajaxLogin2' => "N'esteu segurs?
|
| 71 | +Podeu perdre els vostres canvis en aquesta pàgina si ara en sortiu.",
|
| 72 | + 'ajaxlogin-create' => 'Crea un compte',
|
| 73 | +);
|
| 74 | +
|
| 75 | +/** German (Deutsch)
|
| 76 | + * @author Als-Holder
|
| 77 | + * @author Tim 'Avatar' Bartel
|
| 78 | + * @author Umherirrender
|
| 79 | + */
|
| 80 | +$messages['de'] = array(
|
| 81 | + 'ajaxlogin-desc' => 'Dynamische Box, welche es Benutzern erlaubt sich anzumelden und ein neues Passwort zuzusenden',
|
| 82 | + 'ajaxLogin1' => 'Du musst ein neues Passwort eingeben um die Anmeldung durchzuführen.
|
| 83 | +Dies geschieht auf einer anderen Seite, so dass du deine aktuellen Änderungen auf dieser Seite möglicherweise verlieren wirst.',
|
| 84 | + 'ajaxLogin2' => 'Bist du sicher?
|
| 85 | +Möglicherweise gehen deine aktuellen Änderungen verloren, wenn du diese Seite verlässt.',
|
| 86 | + 'ajaxlogin-create' => 'Erstelle ein Benutzerkonto',
|
| 87 | +);
|
| 88 | +
|
| 89 | +/** German (formal address) (Deutsch (Sie-Form))
|
| 90 | + * @author Umherirrender
|
| 91 | + */
|
| 92 | +$messages['de-formal'] = array(
|
| 93 | + 'ajaxLogin1' => 'Sie müssen ein neues Passwort eingeben um die Anmeldung durchzuführen.
|
| 94 | +Dies geschieht auf einer anderen Seite, so dass Sie Ihre aktuellen Änderungen auf dieser Seite möglicherweise verlieren werden.',
|
| 95 | + 'ajaxLogin2' => 'Sind Sie sicher?
|
| 96 | +Möglicherweise gehen Ihre aktuellen Änderungen verloren, wenn Sie diese Seite verlassen.',
|
| 97 | + 'ajaxlogin-create' => 'Erstellen Sie ein Benutzerkonto',
|
| 98 | +);
|
| 99 | +
|
| 100 | +/** Lower Sorbian (Dolnoserbski)
|
| 101 | + * @author Michawiki
|
| 102 | + */
|
| 103 | +$messages['dsb'] = array(
|
| 104 | + 'ajaxlogin-desc' => 'Dynamiski kašćik, kótaryž dowólujo wužywarjam se pśizjawiś a se gronidło spomnjeś',
|
| 105 | + 'ajaxLogin1' => 'Aby swójo pśizjawjenje dokóńcył, musyš nowe gronidło zapódaś.
|
| 106 | +To buźo k drugemu bokoju wjasć a ty by mógał swóju aktualnu změnu zgubiś.',
|
| 107 | + 'ajaxLogin2' => 'Sy wěsty? Jo móžno, až zgubijoš swóje změny, jolic něnto spušćaš toś ten bok.',
|
| 108 | + 'ajaxlogin-create' => 'Konto załožyś',
|
| 109 | +);
|
| 110 | +
|
| 111 | +/** Greek (Ελληνικά)
|
| 112 | + * @author Consta
|
| 113 | + * @author Omnipaedista
|
| 114 | + */
|
| 115 | +$messages['el'] = array(
|
| 116 | + 'ajaxlogin-desc' => 'Δυναμικό κουτί που επιτρέπει στους χρήστες να συνδεθούν και υπενθυμίζει τον κωδικό πρόσβασης',
|
| 117 | + 'ajaxLogin1' => 'Για να ολοκληρώσετε τη σύνδεση σας, πρέπει να πληκτρολογήσετε ένα νέο κωδικό πρόσβασης.
|
| 118 | +Αυτό θα σας απομακρύνει από αυτή τη σελίδα και ίσως χάσετε την τρέχουσα επεξεργασία.',
|
| 119 | + 'ajaxLogin2' => "Είστε σίγουρος-η;
|
| 120 | +Μπορεί να χάσετε τις αλλαγές σας σ' αυτή τη σελίδα αν την αφήσετε τώρα.",
|
| 121 | + 'ajaxlogin-create' => 'Δημιουργία λογαριασμού',
|
| 122 | +);
|
| 123 | +
|
| 124 | +/** Spanish (Español)
|
| 125 | + * @author Crazymadlover
|
| 126 | + * @author Juan David Ruiz
|
| 127 | + */
|
| 128 | +$messages['es'] = array(
|
| 129 | + 'ajaxlogin-desc' => 'Tabla dinámica la cual permite a los usuario iniciar sesión y recordar contraseña',
|
| 130 | + 'ajaxLogin1' => 'Para completar tu registro, debes escribir una nueva contraseña.
|
| 131 | +Esto hará que salgas de esta página de edición y podrías perder tu edición actual.',
|
| 132 | + 'ajaxLogin2' => '¿Estas seguro?
|
| 133 | +Podrías perder tus ediciones si abandonas esta página ahora.',
|
| 134 | + 'ajaxlogin-create' => 'Crear una cuenta',
|
| 135 | +);
|
| 136 | +
|
| 137 | +/** Basque (Euskara)
|
| 138 | + * @author An13sa
|
| 139 | + */
|
| 140 | +$messages['eu'] = array(
|
| 141 | + 'ajaxlogin-create' => 'Kontua sortu',
|
| 142 | +);
|
| 143 | +
|
| 144 | +/** Finnish (Suomi)
|
| 145 | + * @author Crt
|
| 146 | + * @author Jack Phoenix <jack@countervandalism.net>
|
| 147 | + */
|
| 148 | +$messages['fi'] = array(
|
| 149 | + 'ajaxlogin-desc' => 'Dynaaminen laatikko, jonka avulla käyttäjät voivat kirjautua sisään ja palauttaa salasanan.',
|
| 150 | + 'ajaxLogin1' => 'Suorittaaksesi sisäänkirjautumisesi loppuun, sinun tulee antaa uusi salasana.
|
| 151 | +Tämä vie sinut pois tältä muokkaussivulta ja saatat menettää nykyisen muokkauksesi.',
|
| 152 | + 'ajaxLogin2' => 'Oletko varma?
|
| 153 | +Saatat menettää muokkauksesi jos lähdet tältä sivulta nyt.',
|
| 154 | + 'ajaxlogin-create' => 'Luo käyttäjätunnus',
|
| 155 | +);
|
| 156 | +
|
| 157 | +/** French (Français)
|
| 158 | + * @author IAlex
|
| 159 | + * @author Polytherion
|
| 160 | + */
|
| 161 | +$messages['fr'] = array(
|
| 162 | + 'ajaxlogin-desc' => 'Formulaire dynamique qui permet aux utilisateurs de se connecter et retenir le mot de passe',
|
| 163 | + 'ajaxLogin1' => 'Pour compléter votre connexion, vous devez saisir un nouveau mot de passe.
|
| 164 | +Cela vous fera quitter cette page et vous pourriez perdre votre modification.',
|
| 165 | + 'ajaxLogin2' => 'Êtes-vous certain ?
|
| 166 | +Vous pourriez perdre vos modifications si vous quittez cette page maintenant.',
|
| 167 | + 'ajaxlogin-create' => 'Créer un compte',
|
| 168 | +);
|
| 169 | +
|
| 170 | +/** Irish (Gaeilge)
|
| 171 | + * @author Panu Petteri Höglund
|
| 172 | + */
|
| 173 | +$messages['ga'] = array(
|
| 174 | + 'ajaxLogin2' => 'An bhfuil tú cinnte?
|
| 175 | +Má imíonn tú ón leathanach seo anois, is féidir go gcaillfear na hathruithe a rinne tú.',
|
| 176 | +);
|
| 177 | +
|
| 178 | +/** Galician (Galego)
|
| 179 | + * @author Toliño
|
| 180 | + */
|
| 181 | +$messages['gl'] = array(
|
| 182 | + 'ajaxlogin-desc' => 'Caixa dinámica que permite aos usuarios rexistrarse e lembrar o seu contrasinal',
|
| 183 | + 'ajaxLogin1' => 'Para completar o seu rexistro, debe introducir un novo contrasinal.
|
| 184 | +Isto levarao desta páxina de edición e pode perder a súa edición actual.',
|
| 185 | + 'ajaxLogin2' => 'Está seguro?
|
| 186 | +Pode perder os cambios feitos nesta páxina se sae dela agora.',
|
| 187 | + 'ajaxlogin-create' => 'Crear unha conta',
|
| 188 | +);
|
| 189 | +
|
| 190 | +/** Swiss German (Alemannisch)
|
| 191 | + * @author Als-Holder
|
| 192 | + */
|
| 193 | +$messages['gsw'] = array(
|
| 194 | + 'ajaxlogin-desc' => 'Dynamische Chaschte, wu s Benutzer erlaubt sich aazmälden un e nej Passwort zuezschicke',
|
| 195 | + 'ajaxLogin1' => 'Du muesch e nej Passwort yygee go d aamäldig abschließe.
|
| 196 | +Des gschiht uf ere andere Syte, wäge däm verliersch villicht Dyyni aktuälle Änderige uf däre Syte.',
|
| 197 | + 'ajaxLogin2' => 'Bisch sicher?
|
| 198 | +Viliicht gehn Dyyni aktuällen Änderige verlore, wänn du die Syte verlosch.',
|
| 199 | + 'ajaxlogin-create' => 'E Benutzerkonto aalege',
|
| 200 | +);
|
| 201 | +
|
| 202 | +/** Hebrew (עברית)
|
| 203 | + * @author Rotemliss
|
| 204 | + * @author YaronSh
|
| 205 | + */
|
| 206 | +$messages['he'] = array(
|
| 207 | + 'ajaxlogin-desc' => 'תיבה דינמית המאפשרת למשתמשים להיכנס ולקבל תזכורת סיסמה',
|
| 208 | + 'ajaxLogin1' => 'על מנת להשלים את כניסתכם, עליכם לכתוב סיסמה חדשה.
|
| 209 | +פעולה זו עלולה להוציא אתכם מדף העריכה, ואתם עלולים לאבד את עריכתכם הנוכחית.',
|
| 210 | + 'ajaxLogin2' => 'האם אתם בטוחים?
|
| 211 | +אתם עלולים לאבד את השינויים שביצעתם בדף זה אם תעזבו אותו כעת.',
|
| 212 | + 'ajaxlogin-create' => 'יצירת חשבון',
|
| 213 | +);
|
| 214 | +
|
| 215 | +/** Upper Sorbian (Hornjoserbsce)
|
| 216 | + * @author Michawiki
|
| 217 | + */
|
| 218 | +$messages['hsb'] = array(
|
| 219 | + 'ajaxlogin-desc' => 'Dynamiski kašćik, kotryž wužiwarjam dowoluje so přizjewić a sej hesło spomjatkować',
|
| 220 | + 'ajaxLogin1' => 'Zo by swoje přizjewjenje dokónčił, dyrbiš nowe hesło zapodać.
|
| 221 | +To budźe će k druhej stronje wjesć a ty móhł swoju aktualnu změnu zhubić.',
|
| 222 | + 'ajaxLogin2' => 'Sy wěsty? Je móžno, zo swoje změny zhubiš, jeli tutu stronu nětko wopušćeš.',
|
| 223 | + 'ajaxlogin-create' => 'Konto załožić',
|
| 224 | +);
|
| 225 | +
|
| 226 | +/** Hungarian (Magyar)
|
| 227 | + * @author Blogadmin
|
| 228 | + */
|
| 229 | +$messages['hu'] = array(
|
| 230 | + 'ajaxLogin1' => 'A bejelentkezés befejezéséhez meg kell adnod a jelszavadat.
|
| 231 | +Ez elirányít a szerkesztőablakból, úgyhogy ezek a szerkesztéseid el fognak veszni. Ha ezt nem szeretnéd, másold ki őket a szövegmezőből!',
|
| 232 | + 'ajaxLogin2' => 'Biztos vagy benne?
|
| 233 | +Az oldal elhagyásával a szerkesztéseid elvesznek.',
|
| 234 | +);
|
| 235 | +
|
| 236 | +/** Interlingua (Interlingua)
|
| 237 | + * @author McDutchie
|
| 238 | + */
|
| 239 | +$messages['ia'] = array(
|
| 240 | + 'ajaxlogin-desc' => 'Quadro dynamic que permitte aperir session e rememorar contrasigno',
|
| 241 | + 'ajaxLogin1' => 'Pro completar le apertura de tu session, tu debe entrar un nove contrasigno.
|
| 242 | +Tu essera transferite ab iste pagina e potera perder tu modification currente.',
|
| 243 | + 'ajaxLogin2' => 'Es tu secur?
|
| 244 | +Tu pote perder tu modificationes a iste pagina si tu quita iste pagina ora.',
|
| 245 | + 'ajaxlogin-create' => 'Crear un conto',
|
| 246 | +);
|
| 247 | +
|
| 248 | +/** Indonesian (Bahasa Indonesia)
|
| 249 | + * @author Bennylin
|
| 250 | + */
|
| 251 | +$messages['id'] = array(
|
| 252 | + 'ajaxlogin-desc' => 'Kotak dinamis yang memungkinkan pengguna untuk log masuk dan mengingatkan kata sandi',
|
| 253 | + 'ajaxLogin1' => 'Untuk masuk log in dengan benar, Anda perlu memasukkan kata sandi yang baru.
|
| 254 | +Hal ini mengharuskan Anda untuk beranjak dari halaman suntingan ini dan Anda dapat kehilangan tulisan yang sedang Anda sunting saat ini.',
|
| 255 | + 'ajaxLogin2' => 'Apa Anda yakin?
|
| 256 | +Anda dapat kehilangan perubahan yang telah Anda buat di halaman ini jika Anda meninggalkan halaman ini sekarang.',
|
| 257 | + 'ajaxlogin-create' => 'Buat akun',
|
| 258 | +);
|
| 259 | +
|
| 260 | +/** Japanese (日本語)
|
| 261 | + * @author Fryed-peach
|
| 262 | + * @author Tommy6
|
| 263 | + */
|
| 264 | +$messages['ja'] = array(
|
| 265 | + 'ajaxlogin-desc' => '利用者がログインして、パスワードを記憶しておけるようにする動的なボックス',
|
| 266 | + 'ajaxLogin1' => 'ログインを完了するには新しいパスワードを入力する必要があります。
|
| 267 | +これにより、現在編集中のページから離れ、保存されていない内容は失われることになります。',
|
| 268 | + 'ajaxLogin2' => '本当によろしいでしょうか?
|
| 269 | +今このページを離れると保存されていない編集は失われることになります。',
|
| 270 | + 'ajaxlogin-create' => 'アカウント作成',
|
| 271 | +);
|
| 272 | +
|
| 273 | +/** Khmer (ភាសាខ្មែរ)
|
| 274 | + * @author វ័ណថារិទ្ធ
|
| 275 | + */
|
| 276 | +$messages['km'] = array(
|
| 277 | + 'ajaxLogin2' => 'តើអ្នកប្រាដកដែរទេ?
|
| 278 | +អ្នកនឹងអាចបាត់បងបំលាស់ប្តូរលើទំព័រនេះ ប្រសិនបើអ្នកចាកចេញពីទំព័រនេះឥឡូវ។',
|
| 279 | + 'ajaxlogin-create' => 'បង្កើតគណនី',
|
| 280 | +);
|
| 281 | +
|
| 282 | +/** Korean (한국어)
|
| 283 | + * @author Yknok29
|
| 284 | + */
|
| 285 | +$messages['ko'] = array(
|
| 286 | + 'ajaxlogin-desc' => '사용자에게 로그인을 허락하고 비밀번호를 생각나게 하는, 동적인 상자',
|
| 287 | + 'ajaxLogin1' => '로그인을 완전하게 하시려면, 사용자께서는 새로운 비밀번호를 입력해주셔야만 합니다.
|
| 288 | +이 것은 이 편집 페이지로부터 사용자를 이동시킬 것이고 사용자께서는 현재 본인의 편집을 잃으실 수 있습니다.',
|
| 289 | + 'ajaxLogin2' => '확신하십니까?
|
| 290 | +만약에 지금 사용자께서 이 페이지를 떠나신다면, 사용자께서는 이 페이지의 변화를 잃으실 수 있습니다.',
|
| 291 | + 'ajaxlogin-create' => '계정 만들기',
|
| 292 | +);
|
| 293 | +
|
| 294 | +/** Ripoarisch (Ripoarisch)
|
| 295 | + * @author Purodha
|
| 296 | + */
|
| 297 | +$messages['ksh'] = array(
|
| 298 | + 'ajaxlogin-desc' => 'Ene bewääschlesche Kaste, wo Metmaacher met enlogge künne, un och ehr Passwööter merke künne.',
|
| 299 | + 'ajaxLogin1' => 'Öm fädesch enzelögge, moß De e neu Passwoot endraare. Dat brengk Desch vun
|
| 300 | +dä Sigg zom Ändere fott, un Ding neu jetippte Änderunge künnte verschött jon.',
|
| 301 | + 'ajaxLogin2' => 'Bes De sescher, dat De dat wells? Ding Änderunge künnte verschött jon, wann De vun hee dä Sigg fott jeihß.',
|
| 302 | + 'ajaxlogin-create' => 'Ene neue Metmaacher aanmelde',
|
| 303 | +);
|
| 304 | +
|
| 305 | +/** Luxembourgish (Lëtzebuergesch)
|
| 306 | + * @author Robby
|
| 307 | + */
|
| 308 | +$messages['lb'] = array(
|
| 309 | + 'ajaxlogin-desc' => "Dynamesch Këscht déi et de Benotzer erlaabt sech anzeloggen an d'passwuert ze verhalen",
|
| 310 | + 'ajaxLogin1' => 'Fir Är Umeldung ofzeschléissen musst Dir e neit Passwuert aginn.
|
| 311 | +Dëst wäert Iech op vun dëser Ännerungssäit erofbréngen an Dir kënnt Är akuell Ännerung verléieren.',
|
| 312 | + 'ajaxLogin2' => 'Sidd Dir sécher?
|
| 313 | +Dir kënnt Är Ännerunge vun dëser Säit verléieren wann Dir elo vun dëser Säit erof gitt.',
|
| 314 | + 'ajaxlogin-create' => 'E Benotzerkont uleeën',
|
| 315 | +);
|
| 316 | +
|
| 317 | +/** Lithuanian (Lietuvių)
|
| 318 | + * @author Matasg
|
| 319 | + */
|
| 320 | +$messages['lt'] = array(
|
| 321 | + 'ajaxlogin-desc' => 'Dinaminis laukas, leidžiantis naudotojams prisijungti ir atsiminti slaptažodį',
|
| 322 | + 'ajaxLogin1' => 'Norėdami užbaigti prisijungimą, jūs turite įvesti naują slaptažodį.
|
| 323 | +Jūs paliksite šį redaguojamą puslapį ir galite prarasti tai, ką pataisėte.',
|
| 324 | + 'ajaxLogin2' => 'Ar esate įsitikinęs?
|
| 325 | +Jūs prarasite pakeitimus, atliktus šiame puslapyje, jei jį dabar paliksite.',
|
| 326 | + 'ajaxlogin-create' => 'Sukurti sąskaitą',
|
| 327 | +);
|
| 328 | +
|
| 329 | +/** Malay (Bahasa Melayu)
|
| 330 | + * @author Zamwan
|
| 331 | + */
|
| 332 | +$messages['ms'] = array(
|
| 333 | + 'ajaxLogin2' => 'Adakah anda pasti?
|
| 334 | +Perubahan yang anda lakukan di laman ini mungkin hilang sekiranya anda tinggalkan laman ini sekarang.',
|
| 335 | + 'ajaxlogin-create' => 'Cipta akaun',
|
| 336 | +);
|
| 337 | +
|
| 338 | +/** Dutch (Nederlands)
|
| 339 | + * @author Siebrand
|
| 340 | + */
|
| 341 | +$messages['nl'] = array(
|
| 342 | + 'ajaxlogin-desc' => 'Dynamisch venster voor aanmelden en wachtwoordherinneringen',
|
| 343 | + 'ajaxLogin1' => 'Voer een nieuw wachtwoord in om het aanmelden te voltooien.
|
| 344 | +Door deze handeling wordt u weggeleid van deze pagina, en verliest u mogelijk uw huidige bewerkingen.',
|
| 345 | + 'ajaxLogin2' => 'Wilt u doorgaan?
|
| 346 | +U verliest mogelijk uw huidige bewerkingen als u deze pagina nu verlaat.',
|
| 347 | + 'ajaxlogin-create' => 'Registreren',
|
| 348 | +);
|
| 349 | +
|
| 350 | +/** Norwegian Nynorsk (Norsk (nynorsk))
|
| 351 | + * @author Gunnernett
|
| 352 | + * @author Harald Khan
|
| 353 | + */
|
| 354 | +$messages['nn'] = array(
|
| 355 | + 'ajaxlogin-desc' => 'Ein dynamisk boks som lét brukarar logga inn og hugsa passord',
|
| 356 | + 'ajaxLogin1' => 'For å fullføra innlogginga lyt du skriva inn eit nytt passord.
|
| 357 | +Dette vil ta deg vekk frå denne endringssida, og du kan missa den noverande endringa di.',
|
| 358 | + 'ajaxLogin2' => 'Er du viss?
|
| 359 | +Du kan missa alle endringane du gjorde på denne sida om du går ut av ho no.',
|
| 360 | + 'ajaxlogin-create' => 'Opprett ein konto',
|
| 361 | +);
|
| 362 | +
|
| 363 | +/** Norwegian (bokmål) (Norsk (bokmål))
|
| 364 | + * @author Nghtwlkr
|
| 365 | + */
|
| 366 | +$messages['no'] = array(
|
| 367 | + 'ajaxlogin-desc' => 'En dynamisk boks som lar brukere logge inn og huske passord',
|
| 368 | + 'ajaxLogin1' => 'For å fullføre innloggingen må du skrive inn et nytt passord.
|
| 369 | +Dette vil føre deg vekk fra denne redigeringssiden, og du kan miste den nåværende redigeringen.',
|
| 370 | + 'ajaxLogin2' => 'Er du sikker?
|
| 371 | +Du kan miste alle endringene du gjorde på denne siden om du forlater denne siden nå.',
|
| 372 | + 'ajaxlogin-create' => 'Opprett en konto',
|
| 373 | +);
|
| 374 | +
|
| 375 | +/** Occitan (Occitan)
|
| 376 | + * @author Cedric31
|
| 377 | + */
|
| 378 | +$messages['oc'] = array(
|
| 379 | + 'ajaxlogin-desc' => 'Formulari dinamic que permet als utilizaires de se connectar e que se remembre lo senhal',
|
| 380 | + 'ajaxLogin1' => 'Per completar vòstra connexion, vos cal picar un senhal novèl.
|
| 381 | +Aquò vos farà quitar aquesta pagina e poiriatz perdre vòstra modificacion.',
|
| 382 | + 'ajaxLogin2' => 'Sètz segur(a) ?
|
| 383 | +Poiriatz perdre vòstras modificacions se quitatz aquesta pagina ara.',
|
| 384 | + 'ajaxlogin-create' => 'Crear un compte',
|
| 385 | +);
|
| 386 | +
|
| 387 | +/** Polish (Polski)
|
| 388 | + * @author Sp5uhe
|
| 389 | + */
|
| 390 | +$messages['pl'] = array(
|
| 391 | + 'ajaxlogin-desc' => 'Dynamiczne pole, które pozwala użytkownikom na zalogowanie się oraz przypomnienie hasła',
|
| 392 | + 'ajaxLogin1' => 'Aby się zalogować, należy wprowadzić nowe hasło.
|
| 393 | +Obecne edytowana strona zostanie zmieniana co może spowodować utratę wprowadzonych teraz zmian.',
|
| 394 | + 'ajaxLogin2' => 'Czy jesteś pewien?
|
| 395 | +Możesz stracić zmiany które zrobiłeś na tej stronie, jeśli ją teraz opuścisz.',
|
| 396 | + 'ajaxlogin-create' => 'Załóż konto',
|
| 397 | +);
|
| 398 | +
|
| 399 | +/** Pashto (پښتو)
|
| 400 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel
|
| 401 | + */
|
| 402 | +$messages['ps'] = array(
|
| 403 | + 'ajaxlogin-create' => 'يو کارن-حساب جوړول',
|
| 404 | +);
|
| 405 | +
|
| 406 | +/** Portuguese (Português)
|
| 407 | + * @author Malafaya
|
| 408 | + * @author Waldir
|
| 409 | + */
|
| 410 | +$messages['pt'] = array(
|
| 411 | + 'ajaxlogin-desc' => 'Caixa dinâmica que permite que os utilizadores se autentiquem e memorizem a palavra-passe',
|
| 412 | + 'ajaxLogin1' => 'Para completar a sua autenticação, terá de introduzir uma nova palavra-chave.
|
| 413 | +Isto leva-lo-á a abandonar esta página de edição e poderá perder a sua edição corrente.',
|
| 414 | + 'ajaxLogin2' => 'Tem a certeza?
|
| 415 | +Poderá perder as suas alterações a esta página se abandonar esta página agora.',
|
| 416 | + 'ajaxlogin-create' => 'Criar uma conta',
|
| 417 | +);
|
| 418 | +
|
| 419 | +/** Brazilian Portuguese (Português do Brasil)
|
| 420 | + * @author Brunoy Anastasiya Seryozhenko
|
| 421 | + * @author Eduardo.mps
|
| 422 | + */
|
| 423 | +$messages['pt-br'] = array(
|
| 424 | + 'ajaxlogin-desc' => 'Caixa dinâmica que permite que os utilizadores se autentiquem e gravem sua palavra-chave',
|
| 425 | + 'ajaxLogin1' => 'Para completar seu login, Você deve colocar uma nova password.
|
| 426 | +Isto o impedirá de editar esta página e você perderá esta edição.',
|
| 427 | + 'ajaxLogin2' => 'Tem certeza?
|
| 428 | +Você perderá as suas edições se abandonar a página agora.',
|
| 429 | + 'ajaxlogin-create' => 'Criar uma conta',
|
| 430 | +);
|
| 431 | +
|
| 432 | +/** Romanian (Română)
|
| 433 | + * @author Pixi
|
| 434 | + */
|
| 435 | +$messages['ro'] = array(
|
| 436 | + 'ajaxLogin1' => 'Pentru a te autentifica, trebuie să introduci o parolă nouă.
|
| 437 | +Aceasta înseamnă că vei părăsi pagina de editare şi vei pierde editările efectuate până acum.',
|
| 438 | + 'ajaxLogin2' => 'Eşti sigur?
|
| 439 | +Vei pierde editările efectuate dacă părăseşti această pagină acum.',
|
| 440 | +);
|
| 441 | +
|
| 442 | +/** Tarandíne (Tarandíne)
|
| 443 | + * @author Joetaras
|
| 444 | + */
|
| 445 | +$messages['roa-tara'] = array(
|
| 446 | + 'ajaxlogin-desc' => "Scatele dinamica ca permette a l'utinde de collegarse e arrecurdarse d'a passuord",
|
| 447 | + 'ajaxLogin1' => "Pe combletà 'u collegamende, tu ha 'nzerì 'na passuord nova.
|
| 448 | +Quiste te manne fore da 'a pàgene ca ste cange e puè perder tutte 'u cangiamende ca è fatte.",
|
| 449 | + 'ajaxLogin2' => 'Si secure??
|
| 450 | +Tu puè perdere le cangiaminde tue de sta pàgene ce tu lasse sta pàgene mò.',
|
| 451 | + 'ajaxlogin-create' => "Ccreje 'nu cunde utende",
|
| 452 | +);
|
| 453 | +
|
| 454 | +/** Russian (Русский)
|
| 455 | + * @author Exlex
|
| 456 | + * @author Александр Сигачёв
|
| 457 | + */
|
| 458 | +$messages['ru'] = array(
|
| 459 | + 'ajaxlogin-desc' => 'Динамическая область, позволяющая участникам представляться системе и напоминать пароль',
|
| 460 | + 'ajaxLogin1' => 'Чтобы закончить вход, необходимо ввести новый пароль.
|
| 461 | +При этом Вы покинете страницу редактирования и это может привести к потере внесённых изменений.',
|
| 462 | + 'ajaxLogin2' => 'Вы уверены?
|
| 463 | +Внесённые изменения могут быть утрачены, если сейчас покинуть эту страницу.',
|
| 464 | + 'ajaxlogin-create' => 'Создать учётную запись',
|
| 465 | +);
|
| 466 | +
|
| 467 | +/** Slovak (Slovenčina)
|
| 468 | + * @author Helix84
|
| 469 | + */
|
| 470 | +$messages['sk'] = array(
|
| 471 | + 'ajaxlogin-desc' => 'Dynamické pole, ktoré umožňuje používateľom prihlásiť sa a pripomenúť heslo',
|
| 472 | + 'ajaxLogin1' => 'Na dokončenie prihlásenia musíte zadať nové heslo.
|
| 473 | +Tým prejdete preč z tejto upravovacej stránky a mohli by ste stratiť svoje úpravy.',
|
| 474 | + 'ajaxLogin2' => 'Ste si istý? Ak teraz opustíte túto stránku, môžete stratiť svoje neuložené úpravy.',
|
| 475 | + 'ajaxlogin-create' => 'Vytvoriť účet',
|
| 476 | +);
|
| 477 | +
|
| 478 | +/** Serbian Cyrillic ekavian (ћирилица)
|
| 479 | + * @author Михајло Анђелковић
|
| 480 | + */
|
| 481 | +$messages['sr-ec'] = array(
|
| 482 | + 'ajaxlogin-desc' => 'Динамичка кутијица, која омогућава корисницима да се улогују и подсете се лозинке.',
|
| 483 | + 'ajaxLogin1' => 'Да бисте се улоговали, морате унети лозинку.
|
| 484 | +Ова акција ће вас одвести са ове стране за озмени чланка и могли бисте да изгубите своје неснимљене измене.',
|
| 485 | + 'ajaxLogin2' => 'Да ли сте сигурни?
|
| 486 | +Могли бисте да изгубите све неснимљене измене на овој страни ако је сада напустите.',
|
| 487 | + 'ajaxlogin-create' => 'Направите налог',
|
| 488 | +);
|
| 489 | +
|
| 490 | +/** Swedish (Svenska)
|
| 491 | + * @author Grillmannen
|
| 492 | + * @author Najami
|
| 493 | + */
|
| 494 | +$messages['sv'] = array(
|
| 495 | + 'ajaxlogin-desc' => 'En dynamisk box som låter användare logga in och komma ihåg lösenord',
|
| 496 | + 'ajaxLogin1' => 'För att komplettera din inloggning måste du skriva in ett nytt lösenord.
|
| 497 | +Detta kommer att föra dig bort från den här redigeringssidan och du kan komma att förlora din nuvarande redigering.',
|
| 498 | + 'ajaxLogin2' => 'Är du säker?
|
| 499 | +Du kan förlora din redigering om du lämnar den här sidan nu.',
|
| 500 | + 'ajaxlogin-create' => 'Skapa ett konto',
|
| 501 | +);
|
| 502 | +
|
| 503 | +/** Telugu (తెలుగు)
|
| 504 | + * @author Kiranmayee
|
| 505 | + * @author Ravichandra
|
| 506 | + */
|
| 507 | +$messages['te'] = array(
|
| 508 | + 'ajaxlogin-desc' => 'అప్పటికప్పుడు వాడుకరులను లాగిన్ అవ్వమని మరియు సంకేత పదం గుర్తు చేయమనేందుకు వాడే పెట్టె',
|
| 509 | + 'ajaxLogin1' => 'మీరు లోనికి ప్రవేశించాలంటే కొత్త సంకేత పదమును ఎన్నుకోవాలి.
|
| 510 | +ఈ చర్య మిమ్మలిని మార్చు పేజీ నుంచి అవతలకు తీసుకేడుతుంది. మీరు చేసిన మార్పులు చేరిగిపోవచ్చు.',
|
| 511 | + 'ajaxLogin2' => 'మీకు సమ్మతమేనా?
|
| 512 | +మీరు ఈ పేజీని వదిలి వెళితే ఇప్పటి దాకా ఈ పేజీకి చేసిన మార్పులను కోల్పోవచ్చు.',
|
| 513 | + 'ajaxlogin-create' => 'ఖాతాని సృష్టించుకోండి',
|
| 514 | +);
|
| 515 | +
|
| 516 | +/** Thai (ไทย)
|
| 517 | + * @author Octahedron80
|
| 518 | + */
|
| 519 | +$messages['th'] = array(
|
| 520 | + 'ajaxlogin-desc' => 'กล่องแบบไม่ตายตัว ให้ผู้ใช้ล็อกอินและจดจำรหัสผ่าน',
|
| 521 | + 'ajaxLogin1' => 'เพื่อให้การล็อกอินสำเร็จ คุณต้องป้อนรหัสผ่านใหม่
|
| 522 | +การดำเนินการนี้จะทำให้คุณออกไปจากหน้าแก้ไข และคุณอาจสูญเสียการแก้ไขปัจจุบันของคุณ',
|
| 523 | + 'ajaxLogin2' => 'แน่ใจหรือไม่?
|
| 524 | +คุณอาจสูญเสียการเปลี่ยนแปลงที่ทำกับหน้านี้ ถ้าคุณออกไปตอนนี้',
|
| 525 | + 'ajaxlogin-create' => 'สร้างบัญชี',
|
| 526 | +);
|
| 527 | +
|
| 528 | +/** Tagalog (Tagalog)
|
| 529 | + * @author AnakngAraw
|
| 530 | + */
|
| 531 | +$messages['tl'] = array(
|
| 532 | + 'ajaxlogin-desc' => 'Masiglang kahong nagpapahintulot sa mga tagagamit na lumagdang papasok at magpaalala ng salitang-hudyat',
|
| 533 | + 'ajaxLogin1' => 'Upang mabuo ang lagdang papasok, dapat kang magpasok ng isang bagong salitang-hudyat.',
|
| 534 | + 'ajaxLogin2' => 'Nakatitiyak ka ba?
|
| 535 | +Maaaring mawala ang mga pagbabago mo sa pahinang ito kapag nilisan mo ngayon ang pahinang ito.',
|
| 536 | + 'ajaxlogin-create' => 'Lumikha ng isang akawnt',
|
| 537 | +);
|
| 538 | +
|
| 539 | +/** Turkish (Türkçe)
|
| 540 | + * @author Joseph
|
| 541 | + */
|
| 542 | +$messages['tr'] = array(
|
| 543 | + 'ajaxlogin-desc' => 'Kullanıcıların oturum açmasına ve şifre hatırlatmasına izin veren dinamik kutu',
|
| 544 | + 'ajaxLogin1' => 'Girişinizi tamamlamak için, yeni bir şifre girmelisiniz.
|
| 545 | +Bu sizi, bu değişiklik sayfasından götürür ve mevcut değişikliğinizi kaybedebilirsiniz.',
|
| 546 | + 'ajaxLogin2' => 'Emin misiniz?
|
| 547 | +Eğer bu sayfadan şimdi çıkarsanız sayfaya yaptığınız değişiklikleri kaybedebilirsiniz.',
|
| 548 | + 'ajaxlogin-create' => 'Bir hesap oluşturun',
|
| 549 | +);
|
| 550 | +
|
| 551 | +/** ئۇيغۇرچە (ئۇيغۇرچە)
|
| 552 | + * @author Sahran
|
| 553 | + */
|
| 554 | +$messages['ug-arab'] = array(
|
| 555 | + 'ajaxlogin-create' => 'ھېساباتتىن بىرنى قۇر',
|
| 556 | +);
|
| 557 | +
|
| 558 | +/** Vietnamese (Tiếng Việt)
|
| 559 | + * @author Vinhtantran
|
| 560 | + */
|
| 561 | +$messages['vi'] = array(
|
| 562 | + 'ajaxlogin-desc' => 'Hộp động cho phép người dùng đăng nhập và gợi ý mật khẩu',
|
| 563 | + 'ajaxLogin1' => 'Để hoàn tất việc đăng nhập, bạn phải nhập vào một mật khẩu mới.
|
| 564 | +Việc này sẽ làm cho bạn thoát khỏi trang sửa đổi này và các sửa đổi hiện tại sẽ bị mất.',
|
| 565 | + 'ajaxLogin2' => 'Bạn có chắc chắn không?
|
| 566 | +Bạn có thể mất các sửa đổi tại trang này nếu bạn thoát khỏi trang ngay bây giờ.',
|
| 567 | + 'ajaxlogin-create' => 'Mở tài khoản',
|
| 568 | +);
|
| 569 | +
|
| 570 | +/** Chinese (中文)
|
| 571 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 572 | + */
|
| 573 | +$messages['zh'] = array(
|
| 574 | + 'ajaxLogin1' => '为完成登入动作,請輸入新的密碼。
|
| 575 | +这动作可能会使你跳离编輯頁面,可能会損失編輯結果。',
|
| 576 | +);
|
| 577 | +
|
| 578 | +/** Chinese (China) (中文(中国大陆))
|
| 579 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 580 | + */
|
| 581 | +$messages['zh-cn'] = array(
|
| 582 | + 'ajaxLogin1' => '为完成登入动作,请输入新的密码。
|
| 583 | +这动作可能会使你跳离编辑页面,可能会损失编辑结果。',
|
| 584 | + 'ajaxLogin2' => '这动作可能会使你跳离编辑页面,可能会损失编辑结果。确定要离开吗?',
|
| 585 | +);
|
| 586 | +
|
| 587 | +/** Simplified Chinese (中文(简体))
|
| 588 | + * @author Wmr89502270
|
| 589 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 590 | + */
|
| 591 | +$messages['zh-hans'] = array(
|
| 592 | + 'ajaxLogin2' => '这动作可能会使你跳离编辑页面,可能会损失编辑结果。确定要离开吗?',
|
| 593 | + 'ajaxlogin-create' => '创建一个账户',
|
| 594 | +);
|
| 595 | +
|
| 596 | +/** Traditional Chinese (中文(繁體))
|
| 597 | + * @author Alexsh
|
| 598 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 599 | + */
|
| 600 | +$messages['zh-hant'] = array(
|
| 601 | + 'ajaxlogin-desc' => '使用動態視窗登入及記憶密碼',
|
| 602 | + 'ajaxLogin1' => '為完成登入,您必需輸入一組新密碼。
|
| 603 | +這將可以讓您不損失任何編輯資料直接登入。',
|
| 604 | + 'ajaxLogin2' => '這動作可能會使你跳離編輯頁面,可能會損失編輯結果。確定要離開嗎?',
|
| 605 | + 'ajaxlogin-create' => '建立新帳號',
|
| 606 | +);
|
| 607 | +
|
| 608 | +/** Chinese (Hong Kong) (中文(香港))
|
| 609 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 610 | + */
|
| 611 | +$messages['zh-hk'] = array(
|
| 612 | + 'ajaxLogin1' => '為完成登入動作,請輸入新的密碼。
|
| 613 | +這動作可能會使你跳離編輯頁面,可能會損失編輯結果。',
|
| 614 | + 'ajaxLogin2' => '這動作可能會使你跳離編輯頁面,可能會損失編輯結果。確定要離開嗎?',
|
| 615 | +);
|
| 616 | +
|
| 617 | +/** Chinese (Singapore) (中文(新加坡))
|
| 618 | + * @author 許瑜真 (Yuchen Hsu/KaurJmeb)
|
| 619 | + */
|
| 620 | +$messages['zh-sg'] = array(
|
| 621 | + 'ajaxLogin1' => '为完成登入动作,请输入新的密码。
|
| 622 | +这动作可能会使你跳离编辑页面,可能会损失编辑结果。',
|
| 623 | +);
|
| 624 | +
|
| 625 | +/** Chinese (Taiwan) (中文(台灣)) */
|
| 626 | +$messages['zh-tw'] = array(
|
| 627 | + 'ajaxLogin1' => '為完成登入動作,請輸入新的密碼。
|
| 628 | +這動作可能會使你跳離編輯頁面,可能會損失編輯結果。',
|
| 629 | + 'ajaxLogin2' => '這動作可能會使你跳離編輯頁面,可能會損失編輯結果。確定要離開嗎?',
|
| 630 | +);
|
| 631 | +
|
Index: trunk/extensions/AjaxLoginJQ/AjaxLogin.php |
— | — | @@ -0,0 +1,139 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * AjaxLogin extension - allows users to log in through an AJAX pop-up box
|
| 5 | + *
|
| 6 | + * @file
|
| 7 | + * @ingroup Extensions
|
| 8 | + * @version 1.1.1
|
| 9 | + * @author Inez Korczyński <korczynski(at)gmail(dot)com>
|
| 10 | + * @author Jack Phoenix <jack@countervandalism.net>
|
| 11 | + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
|
| 12 | + */
|
| 13 | +
|
| 14 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 15 | + die( "This is not a valid entry point.\n" );
|
| 16 | +}
|
| 17 | +
|
| 18 | +// Extension credits that will show up on Special:Version
|
| 19 | +$wgExtensionCredits['other'][] = array(
|
| 20 | + 'path' => __FILE__,
|
| 21 | + 'name' => 'AjaxLogin',
|
| 22 | + 'version' => '1.1.1',
|
| 23 | + 'author' => array( 'Inez Korczyński', 'Jack Phoenix' ),
|
| 24 | + 'description' => 'Dynamic box which allow users to login and remind password',
|
| 25 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:AjaxLogin',
|
| 26 | + 'descmsg' => 'ajaxlogin-desc',
|
| 27 | +);
|
| 28 | +
|
| 29 | +// Array of skins for which AjaxLogin is enabled.
|
| 30 | +// Key is: 'skinname' => (true or false)
|
| 31 | +$wgEnableAjaxLogin = array(
|
| 32 | + 'monobook' => true
|
| 33 | +);
|
| 34 | +
|
| 35 | +// Autoload AjaxLogin API interface
|
| 36 | +$dir = dirname( __FILE__ ) . '/';
|
| 37 | +$wgAutoloadClasses['ApiAjaxLogin'] = $dir . 'ApiAjaxLogin.php';
|
| 38 | +$wgAPIModules['ajaxlogin'] = 'ApiAjaxLogin';
|
| 39 | +
|
| 40 | +// Internationalization file
|
| 41 | +$wgExtensionMessagesFiles['AjaxLogin'] = $dir . 'AjaxLogin.i18n.php';
|
| 42 | +
|
| 43 | +// Hook things up
|
| 44 | +$wgHooks['BeforePageDisplay'][] = 'AjaxLoginJS';
|
| 45 | +$wgHooks['SkinAfterContent'][] = 'GetAjaxLoginForm';
|
| 46 | +$wgHooks['MakeGlobalVariablesScript'][] = 'efAddAjaxLoginVariables';
|
| 47 | +
|
| 48 | +/**
|
| 49 | + * Adds required JavaScript & CSS files to the HTML output of a page if AjaxLogin is enabled
|
| 50 | + *
|
| 51 | + * @param $out OutputPage object
|
| 52 | + * @return true
|
| 53 | + */
|
| 54 | +function AjaxLoginJS( OutputPage $out ) {
|
| 55 | + global $wgEnableAjaxLogin, $wgScriptPath, $wgJsMimeType;
|
| 56 | +
|
| 57 | + # Don't load anything if AjaxLogin isn't enabled
|
| 58 | + if ( !isset( $wgEnableAjaxLogin ) ) {
|
| 59 | + return true;
|
| 60 | + }
|
| 61 | +
|
| 62 | +
|
| 63 | + // Our custom CSS
|
| 64 | + $out->addStyle( '../..' . $wgScriptPath . '/extensions/AjaxLogin/AjaxLogin.css' );
|
| 65 | + // JQuery and JQModal scripts
|
| 66 | + $out->addScriptFile( $wgScriptPath . '/extensions/AjaxLogin/jquery-1.3.2.min.js' );
|
| 67 | + $out->addScriptFile( $wgScriptPath . '/extensions/AjaxLogin/jqModal.js' );
|
| 68 | + $out->addScriptFile( $wgScriptPath . '/extensions/AjaxLogin/AjaxLoginJQ.js' );
|
| 69 | +
|
| 70 | + return true;
|
| 71 | +}
|
| 72 | +
|
| 73 | +/**
|
| 74 | + * Adds the required JavaScript variables inside the <head> tags of the page
|
| 75 | + * if AjaxLogin is enabled and the current page is not an article page.
|
| 76 | + *
|
| 77 | + * @param $vars Variables to be added
|
| 78 | + * @return true
|
| 79 | + */
|
| 80 | +function efAddAjaxLoginVariables( $vars ) {
|
| 81 | + global $wgEnableAjaxLogin;
|
| 82 | +
|
| 83 | + $vars['wgEnableAjaxLogin'] = ( is_array( $wgEnableAjaxLogin ) ) ? in_array( $vars['skin'], $wgEnableAjaxLogin ) : false;
|
| 84 | + if ( $vars['wgIsArticle'] == false && $vars['wgEnableAjaxLogin'] ) {
|
| 85 | + wfLoadExtensionMessages( 'AjaxLogin' );
|
| 86 | + $vars['ajaxLogin1'] = wfMsg( 'ajaxLogin1' );
|
| 87 | + $vars['ajaxLogin2'] = wfMsg( 'ajaxLogin2' );
|
| 88 | + }
|
| 89 | +
|
| 90 | + return true;
|
| 91 | +}
|
| 92 | +
|
| 93 | +/**
|
| 94 | + * Gets the AjaxLogin form
|
| 95 | + *
|
| 96 | + * @param $data The data, AjaxLogin form in this case, to be added to the HTML output of a page
|
| 97 | + * @return true
|
| 98 | + */
|
| 99 | +function GetAjaxLoginForm( &$data ) {
|
| 100 | + global $wgAuth, $wgEnableEmail, $wgOut, $wgTitle, $wgUser;
|
| 101 | + if ( $wgUser->isAnon() && $wgTitle->getNamespace() != 8 && $wgTitle->getDBkey() != 'Userlogin' ) {
|
| 102 | + $titleObj = SpecialPage::getTitleFor( 'Userlogin' );
|
| 103 | + $link = $titleObj->getLocalUrl( 'type=signup' );
|
| 104 | + $wgOut->addHTML( '<!--[if lt IE 9]><style type="text/css">#userloginRound { width: 350px !important; }</style><![endif]-->
|
| 105 | + <div id="userloginRound" class="roundedDiv jqmWindow">
|
| 106 | + <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
|
| 107 | + <div class="r_boxContent">
|
| 108 | + <div>
|
| 109 | + <div name="wpClose" id="wpClose" value="' . wfMsg( 'close' ) . '" style ="float:right;cursor:pointer;"><a href="#" tabindex="108"><font size="4" color="white"><b>X</b></font></a>
|
| 110 | + </div>
|
| 111 | + <div class="boxHeader color1">
|
| 112 | + ' . wfMsg( 'login' ) .'
|
| 113 | + </div>
|
| 114 | + </div>
|
| 115 | + <form action="" method="post" name="userajaxloginform" id="userajaxloginform" style="margin:5px">
|
| 116 | + <div id="wpError" style="width: 250px; line-height: 1.4em;"></div>
|
| 117 | + <label>' . wfMsg( 'loginprompt' ) . '</label><br /><br/>
|
| 118 | + <label for="wpName1">' . wfMsg( 'yourname' ) . '</label><br />
|
| 119 | + <input type="text" class="loginText" name="wpName" id="wpName1" tabindex="101" size="20" /><br />
|
| 120 | + <label for="wpPassword1">' . wfMsg( 'yourpassword' ) . '</label><br />
|
| 121 | + <input type="password" class="loginPassword" name="wpPassword" id="wpPassword1" tabindex="102" size="20" /><br />
|
| 122 | + <div style="padding-bottom:3px">
|
| 123 | + <input type="checkbox" name="wpRemember" tabindex="104" value="1" id="wpRemember1"' . ( $wgUser->getOption( 'rememberpassword' ) ? ' checked="checked"' : '' ) . ' />
|
| 124 | + <label for="wpRemember1">' . wfMsg( 'remembermypassword' ) . '</label><br />
|
| 125 | + </div>
|
| 126 | + <input style="margin:0;padding:0 .25em;width:auto;overflow:visible;" type="submit" name="wpLoginattempt" id="wpLoginattempt" tabindex="105" value="' . wfMsg( 'login' ) . '" />'
|
| 127 | + );
|
| 128 | + if ( $wgEnableEmail && $wgAuth->allowPasswordChange() ) {
|
| 129 | + $wgOut->addHTML( '<br /><input style="margin:3px 0;padding:0 .25em;width:auto;overflow:visible;font-size:0.9em" type="submit" name="wpMailmypassword" id="wpMailmypassword" tabindex="106" value="' . wfMsg( 'mailmypassword' ) . '" />' );
|
| 130 | + }
|
| 131 | + // Originally this used core message 'nologinlink' but it wouldn't work too well for Finnish, so I changed it. --Jack Phoenix
|
| 132 | + wfLoadExtensionMessages( 'AjaxLogin' );
|
| 133 | + $wgOut->addHTML( '<br /><a id="wpAjaxRegister" tabindex="107" href="' . htmlspecialchars( $link ) . '">' . wfMsg( 'ajaxlogin-create' ) . '</a>
|
| 134 | + </form>
|
| 135 | + </div>
|
| 136 | + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
|
| 137 | +</div>' );
|
| 138 | + }
|
| 139 | + return true;
|
| 140 | +}
|
Index: trunk/extensions/AjaxLoginJQ/AjaxLoginJQ.js |
— | — | @@ -0,0 +1,166 @@ |
| 2 | +(function($) {
|
| 3 | +mediawiki = new Object;
|
| 4 | +
|
| 5 | +mediawiki.AjaxLogin = function() {
|
| 6 | + this._loginPanel = null;
|
| 7 | + this._loginForm = null;
|
| 8 | +};
|
| 9 | +
|
| 10 | +mediawiki.AjaxLogin.prototype.initialize = function() {
|
| 11 | + this._loginPanel = $("#userloginRound");
|
| 12 | + this._loginForm = $("#userajaxloginform");
|
| 13 | + if(this._loginPanel.length > 0) {
|
| 14 | + this._loginPanel.jqm({modal : true, toTop : true});
|
| 15 | + var that = this;
|
| 16 | + $("#pt-anonlogin, #pt-login").click( function(event) {
|
| 17 | + event.preventDefault();
|
| 18 | + that.showLoginPanel();
|
| 19 | + });
|
| 20 | + $("#wpLoginattempt").click(function(event) {
|
| 21 | + event.preventDefault();
|
| 22 | + that.postAjax("wpLoginattempt");
|
| 23 | + });
|
| 24 | + $("#wpMailmypassword").click(function(event) {
|
| 25 | + event.preventDefault();
|
| 26 | + that.postAjax("wpMailmypassword");
|
| 27 | + });
|
| 28 | + $("#wpAjaxRegister").click(function(event) {
|
| 29 | + that.doRegister(event);
|
| 30 | + });
|
| 31 | + $("#wpClose").click(function(event) {
|
| 32 | + that.doClose(event);
|
| 33 | + });
|
| 34 | + }
|
| 35 | +};
|
| 36 | +
|
| 37 | +mediawiki.AjaxLogin.prototype.showLoginPanel = function() {
|
| 38 | + this.refreshForm();
|
| 39 | + this._loginPanel.jqmShow();
|
| 40 | +};
|
| 41 | +
|
| 42 | +mediawiki.AjaxLogin.prototype.postAjax = function(action) {
|
| 43 | + var actionURL = wgServer + wgScriptPath + '/api.php?action=ajaxlogin&format=json';
|
| 44 | + var dataString = this._loginForm.serialize();
|
| 45 | + dataString += "&" + action + "=" + action;
|
| 46 | + this.disableForm();
|
| 47 | + var that = this;
|
| 48 | + $.ajax({
|
| 49 | + type : "POST" ,
|
| 50 | + url : actionURL,
|
| 51 | + dataType : "json",
|
| 52 | + data : dataString,
|
| 53 | + success : function(data) {
|
| 54 | + that.requestSuccess(data);
|
| 55 | + },
|
| 56 | + error : function(XMLHttpRequest, textStatus, errorThrown)
|
| 57 | + {
|
| 58 | + //TODO : add error handling here
|
| 59 | + }
|
| 60 | + });
|
| 61 | +};
|
| 62 | +
|
| 63 | +mediawiki.AjaxLogin.prototype.enableForm = function() {
|
| 64 | + $("#wpName1").removeAttr("disabled");
|
| 65 | + $("#wpPassword1").removeAttr("disabled");
|
| 66 | + $("#wpLoginattempt").removeAttr("disabled");
|
| 67 | + $("#wpRemember").removeAttr("disabled");
|
| 68 | + $("#wpMailmypassword").removeAttr("disabled");
|
| 69 | + $("#wpPassword1").removeAttr("disabled");
|
| 70 | + $("#wpClose").removeAttr("disabled");
|
| 71 | +};
|
| 72 | +
|
| 73 | +mediawiki.AjaxLogin.prototype.disableForm = function() {
|
| 74 | + $("#wpName1").attr("disabled", "disabled");
|
| 75 | + $("#wpPassword1").attr("disabled", "disabled");
|
| 76 | + $("#wpLoginattempt").attr("disabled", "disabled");
|
| 77 | + $("#wpRemember").attr("disabled", "disabled");
|
| 78 | + $("#wpMailmypassword").attr("disabled", "disabled");
|
| 79 | + $("#wpPassword1").attr("disabled", "disabled");
|
| 80 | + $("#wpClose").attr("disabled", "disabled");
|
| 81 | +};
|
| 82 | +
|
| 83 | +mediawiki.AjaxLogin.prototype.displayReason = function(reason) {
|
| 84 | + $("#wpError").html(reason + "<br /><br />").show();
|
| 85 | +};
|
| 86 | +
|
| 87 | +mediawiki.AjaxLogin.prototype.doRegister = function(event){
|
| 88 | + if($("#wpPreview").length > 0 && $("#wpLogin").length > 0) {
|
| 89 | + if( typeof(ajaxLogin2) != 'undefined' && !confirm(ajaxLogin2)) {
|
| 90 | + event.preventDefault();
|
| 91 | + }
|
| 92 | + }
|
| 93 | +};
|
| 94 | +
|
| 95 | +
|
| 96 | +mediawiki.AjaxLogin.prototype.refreshForm = function() {
|
| 97 | + $("#wpName1").val("");
|
| 98 | + $("#wpPassword1").val("");
|
| 99 | + $("#wpError").html("");
|
| 100 | + this.enableForm();
|
| 101 | +
|
| 102 | +};
|
| 103 | +
|
| 104 | +
|
| 105 | +mediawiki.AjaxLogin.prototype.doClose = function(event){
|
| 106 | + this._loginPanel.jqmHide();
|
| 107 | +};
|
| 108 | +
|
| 109 | +
|
| 110 | +mediawiki.AjaxLogin.prototype.requestSuccess = function(data) {
|
| 111 | + var responseResult = data.ajaxlogin.result;
|
| 112 | + switch(responseResult) {
|
| 113 | + case "Reset":
|
| 114 | + if($("#wpPreview").length > 0 && $("#wpLogin").length > 0) {
|
| 115 | + if(typeof(ajaxLogin1) != 'undefined' && !confirm(ajaxLogin1)) {
|
| 116 | + break;
|
| 117 | + }
|
| 118 | + }
|
| 119 | + this._loginForm.attr("action", wgServer + wgScriptPath + "/index.php?title=Special:Userlogin&action=submitlogin&type=login");
|
| 120 | + this._loginForm.unbind("submit");
|
| 121 | + this.disableForm();
|
| 122 | + this._loginForm.submit();
|
| 123 | + this.enableForm();
|
| 124 | + break;
|
| 125 | + case "Success":
|
| 126 | + if($("#wpPreview").length > 0 && $("#wpLogin").length > 0) {
|
| 127 | + if($("#wikiDiff").length > 0 && ($("#wikiDiff").children.length > 0) ) {
|
| 128 | + $("#wpDiff").click();
|
| 129 | + } else {
|
| 130 | + if( $("#wikiPreview") && $("#wikiPreview").children.length == 0 ) {
|
| 131 | + $("#wpLogin").val(1);
|
| 132 | + }
|
| 133 | + $("#wpPreview").click();
|
| 134 | + }
|
| 135 | + } else {
|
| 136 | + if( wgCanonicalSpecialPageName == 'Userlogout' ) {
|
| 137 | + window.location.href = wgServer + wgScriptPath;
|
| 138 | + } else {
|
| 139 | + window.location.reload(true);
|
| 140 | + }
|
| 141 | + }
|
| 142 | + break;
|
| 143 | + case "NotExists":
|
| 144 | + this.enableForm();
|
| 145 | + $("#wpName1").value = "";
|
| 146 | + $("#wpPassword1").value = "";
|
| 147 | + $("#wpName1").focus();
|
| 148 | + case "WrongPass":
|
| 149 | + this.enableForm();
|
| 150 | + $("#wpPassword1").val("");
|
| 151 | + $("#wpPassword1").focus();
|
| 152 | + default:
|
| 153 | + this.enableForm();
|
| 154 | + this.displayReason(data.ajaxlogin.text);
|
| 155 | + break;
|
| 156 | + }
|
| 157 | +};
|
| 158 | +
|
| 159 | +$(document).ready( function() {
|
| 160 | + if( typeof wgEnableAjaxLogin != 'undefined' && wgEnableAjaxLogin )
|
| 161 | + {
|
| 162 | + var ajaxLogin = new mediawiki.AjaxLogin();
|
| 163 | + ajaxLogin.initialize();
|
| 164 | + }
|
| 165 | +});
|
| 166 | +
|
| 167 | +})(jQuery);
|
Index: trunk/extensions/AjaxLoginJQ/jqModal.js |
— | — | @@ -0,0 +1,69 @@ |
| 2 | +/* |
| 3 | + * jqModal - Minimalist Modaling with jQuery |
| 4 | + * (http://dev.iceburg.net/jquery/jqModal/) |
| 5 | + * |
| 6 | + * Copyright (c) 2007,2008 Brice Burgess <bhb@iceburg.net> |
| 7 | + * Dual licensed under the MIT and GPL licenses: |
| 8 | + * http://www.opensource.org/licenses/mit-license.php |
| 9 | + * http://www.gnu.org/licenses/gpl.html |
| 10 | + * |
| 11 | + * $Version: 03/01/2009 +r14 |
| 12 | + */ |
| 13 | +(function($) { |
| 14 | +$.fn.jqm=function(o){ |
| 15 | +var p={ |
| 16 | +overlay: 50, |
| 17 | +overlayClass: 'jqmOverlay', |
| 18 | +closeClass: 'jqmClose', |
| 19 | +trigger: '.jqModal', |
| 20 | +ajax: F, |
| 21 | +ajaxText: '', |
| 22 | +target: F, |
| 23 | +modal: F, |
| 24 | +toTop: F, |
| 25 | +onShow: F, |
| 26 | +onHide: F, |
| 27 | +onLoad: F |
| 28 | +}; |
| 29 | +return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s; |
| 30 | +H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s}; |
| 31 | +if(p.trigger)$(this).jqmAddTrigger(p.trigger); |
| 32 | +});}; |
| 33 | + |
| 34 | +$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');}; |
| 35 | +$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');}; |
| 36 | +$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});}; |
| 37 | +$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});}; |
| 38 | + |
| 39 | +$.jqm = { |
| 40 | +hash:{}, |
| 41 | +open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z); |
| 42 | + if(c.modal) {if(!A[0])L('bind');A.push(s);} |
| 43 | + else if(c.overlay > 0)h.w.jqmAddClose(o); |
| 44 | + else o=F; |
| 45 | + |
| 46 | + h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F; |
| 47 | + if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}} |
| 48 | + |
| 49 | + if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u; |
| 50 | + r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});} |
| 51 | + else if(cc)h.w.jqmAddClose($(cc,h.w)); |
| 52 | + |
| 53 | + if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o); |
| 54 | + (c.onShow)?c.onShow(h):h.w.show();e(h);return F; |
| 55 | +}, |
| 56 | +close:function(s){var h=H[s];if(!h.a)return F;h.a=F; |
| 57 | + if(A[0]){A.pop();if(!A[0])L('unbind');} |
| 58 | + if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove(); |
| 59 | + if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F; |
| 60 | +}, |
| 61 | +params:{}}; |
| 62 | +var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false, |
| 63 | +i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}), |
| 64 | +e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, |
| 65 | +f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, |
| 66 | +L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, |
| 67 | +m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, |
| 68 | +hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { |
| 69 | + if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; |
| 70 | +})(jQuery); |
\ No newline at end of file |
Index: trunk/extensions/AjaxLoginJQ/AjaxLogin.css |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +/*** AJAX LOGIN ***/
|
| 3 | +/* styles copied from monaco/css/header.css */
|
| 4 | +/* #userloginRound_c { z-index: 2000 !important; }
|
| 5 | +#userloginRound_mask { z-index: 1000 !important; } */
|
| 6 | +
|
| 7 | +#userloginRound .r_boxContent {
|
| 8 | + background-color: #fff;
|
| 9 | + color: #000000;
|
| 10 | + border: solid 1px #aaaaaa;
|
| 11 | +}
|
| 12 | +
|
| 13 | +#userloginRound .boxHeader {
|
| 14 | + padding: 3px 5px;
|
| 15 | + font-size: 12px; /* Jack: added this */
|
| 16 | +
|
| 17 | +}
|
| 18 | +
|
| 19 | +#userloginRound form {
|
| 20 | + padding: 3px;
|
| 21 | + font-size: 12px;
|
| 22 | +/* font-size: 0.9em; original -- doesn't look too good on monobook*/
|
| 23 | +}
|
| 24 | +
|
| 25 | +/* copied from monaco/css/root.css */
|
| 26 | +.color1, .color1 a, .hd {
|
| 27 | + background-color: #36C;
|
| 28 | + color: white;
|
| 29 | +}
|
| 30 | +.color2 {
|
| 31 | + background-color: #F5F5F5;
|
| 32 | +}
|
| 33 | +
|
| 34 | +.jqmWindow {
|
| 35 | + display: none;
|
| 36 | +
|
| 37 | + position: fixed;
|
| 38 | + top: 30%;
|
| 39 | + left: 60%;
|
| 40 | +
|
| 41 | + margin-left: -300px;
|
| 42 | +
|
| 43 | + background-color: #EEE;
|
| 44 | + color: #333;
|
| 45 | + border: 1px solid black;
|
| 46 | +}
|
| 47 | +
|
| 48 | +
|
| 49 | +.jqmOverlay { background-color: #000; }
|
| 50 | +
|
| 51 | +/* Fixed posistioning emulation for IE6
|
| 52 | + Star selector used to hide definition from browsers other than IE6
|
| 53 | + For valid CSS, use a conditional include instead */
|
| 54 | +
|
| 55 | +
|
| 56 | +* html .jqmWindow {
|
| 57 | + position: absolute;
|
| 58 | + top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
|
| 59 | +}
|
| 60 | +
|
Index: trunk/extensions/AjaxLoginJQ/jquery-1.3.2.min.js |
Index: trunk/extensions/AjaxLoginJQ/ApiAjaxLogin.php |
— | — | @@ -0,0 +1,149 @@ |
| 2 | +<?php
|
| 3 | +/**
|
| 4 | + * API module for AjaxLogin extension
|
| 5 | + *
|
| 6 | + * @file
|
| 7 | + * @ingroup API
|
| 8 | + * @author Inez Korczyński <korczynski@gmail.com>
|
| 9 | + */
|
| 10 | +
|
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) {
|
| 12 | + die( "This is not a valid entry point.\n" );
|
| 13 | +}
|
| 14 | +
|
| 15 | +class ApiAjaxLogin extends ApiBase {
|
| 16 | +
|
| 17 | + public function __construct( $main, $action ) {
|
| 18 | + parent::__construct( $main, $action, 'wp' );
|
| 19 | + }
|
| 20 | +
|
| 21 | + public function execute() {
|
| 22 | + session_start();
|
| 23 | + $Name = $Password = $Remember = $Loginattempt = $Mailmypassword = null;
|
| 24 | + extract( $this->extractRequestParams() );
|
| 25 | +
|
| 26 | + if ( !empty( $Loginattempt ) ) {
|
| 27 | + // Login attempt
|
| 28 | + $params = new FauxRequest(
|
| 29 | + array(
|
| 30 | + 'wpName' => $Name,
|
| 31 | + 'wpPassword' => $Password,
|
| 32 | + 'wpRemember' => $Remember,
|
| 33 | + 'wpLoginattempt' => $Loginattempt
|
| 34 | + )
|
| 35 | + );
|
| 36 | +
|
| 37 | + $result = array();
|
| 38 | + $loginForm = new LoginForm( $params );
|
| 39 | + switch( $loginForm->authenticateUserData() ) {
|
| 40 | + case LoginForm::RESET_PASS:
|
| 41 | + $result['result'] = 'Reset';
|
| 42 | + break;
|
| 43 | + case LoginForm::SUCCESS:
|
| 44 | + global $wgUser;
|
| 45 | +
|
| 46 | + $wgUser->setOption( 'rememberpassword', $Remember ? 1 : 0 );
|
| 47 | + $wgUser->setCookies();
|
| 48 | +
|
| 49 | + $result['result'] = 'Success';
|
| 50 | + $result['lguserid'] = $_SESSION['wsUserID'];
|
| 51 | + $result['lgusername'] = $_SESSION['wsUserName'];
|
| 52 | + $result['lgtoken'] = $_SESSION['wsToken'];
|
| 53 | + break;
|
| 54 | + case LoginForm::NO_NAME:
|
| 55 | + $result['result'] = 'NoName';
|
| 56 | + $result['text'] = wfMsg( 'noname' );
|
| 57 | + break;
|
| 58 | + case LoginForm::ILLEGAL:
|
| 59 | + $result['result'] = 'Illegal';
|
| 60 | + $result['text'] = wfMsg( 'noname' );
|
| 61 | + break;
|
| 62 | + case LoginForm::WRONG_PLUGIN_PASS:
|
| 63 | + $result['result'] = 'WrongPluginPass';
|
| 64 | + $result['text'] = wfMsg( 'wrongpassword' );
|
| 65 | + break;
|
| 66 | + case LoginForm::NOT_EXISTS:
|
| 67 | + $result['result'] = 'NotExists';
|
| 68 | + wfLoadExtensionMessages( 'AjaxLogin' );
|
| 69 | + $result['text'] = wfMsg( 'nosuchuser', htmlspecialchars( $Name ) );
|
| 70 | + break;
|
| 71 | + case LoginForm::WRONG_PASS:
|
| 72 | + $result['result'] = 'WrongPass';
|
| 73 | + $result['text'] = wfMsg( 'wrongpassword' );
|
| 74 | + break;
|
| 75 | + case LoginForm::EMPTY_PASS:
|
| 76 | + $result['result'] = 'EmptyPass';
|
| 77 | + $result['text'] = wfMsg( 'wrongpasswordempty' );
|
| 78 | + break;
|
| 79 | + default:
|
| 80 | + ApiBase::dieDebug( __METHOD__, 'Unhandled case value' );
|
| 81 | + }
|
| 82 | + $dbw = wfGetDB( DB_MASTER );
|
| 83 | + $dbw->commit();
|
| 84 | +
|
| 85 | + $this->getResult()->addValue( null, 'ajaxlogin', $result );
|
| 86 | + } else if ( !empty( $Mailmypassword ) ) {
|
| 87 | + // Remind password attempt
|
| 88 | + $params = new FauxRequest(
|
| 89 | + array(
|
| 90 | + 'wpName' => $Name
|
| 91 | + )
|
| 92 | + );
|
| 93 | + $result = array();
|
| 94 | + $loginForm = new LoginForm( $params );
|
| 95 | + global $wgUser, $wgOut, $wgAuth;
|
| 96 | + if ( !$wgAuth->allowPasswordChange() ) {
|
| 97 | + $result['result'] = 'resetpass_forbidden';
|
| 98 | + $result['text'] = wfMsg( 'resetpass_forbidden' );
|
| 99 | + } else if ( $wgUser->isBlocked() ) {
|
| 100 | + $result['result'] = 'blocked-mailpassword';
|
| 101 | + $result['text'] = wfMsg( 'blocked-mailpassword' );
|
| 102 | + } else if ( '' == $loginForm->mName ) {
|
| 103 | + $result['result'] = 'noname';
|
| 104 | + $result['text'] = wfMsg( 'noname' );
|
| 105 | + } else {
|
| 106 | + $u = User::newFromName( $loginForm->mName );
|
| 107 | + if ( is_null( $u ) ) {
|
| 108 | + $result['result'] = 'noname';
|
| 109 | + $result['text'] = wfMsg( 'noname' );
|
| 110 | + } else if ( 0 == $u->getID() ) {
|
| 111 | + $result['result'] = 'nosuchuser';
|
| 112 | + wfLoadExtensionMessages( 'AjaxLogin' );
|
| 113 | + $result['text'] = wfMsg( 'nosuchuser', $u->getName() );
|
| 114 | + } else if ( $u->isPasswordReminderThrottled() ) {
|
| 115 | + global $wgPasswordReminderResendTime;
|
| 116 | + $result['result'] = 'throttled-mailpassword';
|
| 117 | + $result['text'] = wfMsg( 'throttled-mailpassword', round( $wgPasswordReminderResendTime, 3 ) );
|
| 118 | + } else {
|
| 119 | + $res = $loginForm->mailPasswordInternal( $u, true );
|
| 120 | + if ( WikiError::isError( $res ) ) {
|
| 121 | + $result['result'] = 'mailerror';
|
| 122 | + $result['text'] = wfMsg( 'mailerror', $res->getMessage() );
|
| 123 | + } else {
|
| 124 | + $result['result'] = 'OK';
|
| 125 | + $result['text'] = wfMsg( 'passwordsent', $u->getName() );
|
| 126 | + }
|
| 127 | + }
|
| 128 | + }
|
| 129 | + $dbw = wfGetDB( DB_MASTER );
|
| 130 | + $dbw->commit();
|
| 131 | +
|
| 132 | + $this->getResult()->addValue( null, 'ajaxlogin', $result );
|
| 133 | + }
|
| 134 | + }
|
| 135 | +
|
| 136 | + public function getAllowedParams() {
|
| 137 | + return array(
|
| 138 | + 'Name' => null,
|
| 139 | + 'Password' => null,
|
| 140 | + 'Remember' => null,
|
| 141 | + 'Loginattempt' => null,
|
| 142 | + 'Mailmypassword' => null
|
| 143 | +
|
| 144 | + );
|
| 145 | + }
|
| 146 | +
|
| 147 | + public function getVersion() {
|
| 148 | + return __CLASS__ . ': $Id: ApiLogin.php 17065 2006-10-17 02:11:29Z yurik $';
|
| 149 | + }
|
| 150 | +} |
\ No newline at end of file |
Index: trunk/extensions/AjaxLoginJQ/README |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +This is the readme file for AjaxLogin extension.
|
| 3 | +The newest documentation for this extension can always be found at
|
| 4 | +<http://www.mediawiki.org/wiki/Extension:AjaxLogin>.
|
| 5 | +
|
| 6 | +==History==
|
| 7 | +AjaxLogin was written by Inez Korczyński <korczynski(at)gmail(dot)com> for Wikia, Inc.
|
| 8 | +
|
| 9 | +Some code hacks were written by Jack Phoenix <jack@countervandalism.net>.
|
| 10 | +
|
| 11 | +Replaced YUI with JQuery - Chamindu Munasinghe <chamindu@calcey.com>.
|
| 12 | +
|
| 13 | +==License==
|
| 14 | +GNU General Public License 2.0 or later
|
| 15 | +
|
| 16 | +==Dependency==
|
| 17 | +
|
| 18 | +JQuery
|
| 19 | +
|
| 20 | +==Manual modifications==
|
| 21 | +You will need to modify one core MediaWiki file, includes/EditPage.php, if you want users to be able to log in with AjaxLogin
|
| 22 | +on edit view (?action=edit) without losing their changes.
|
| 23 | +
|
| 24 | +Find protected function showFormBeforeText() and add this line inside the $wgOut->addHTML() call so that it'll be the first <input> to be added:
|
| 25 | +
|
| 26 | + <input type='hidden' value=\"\" name=\"wpLogin\" id=\"wpLogin\" />
|
| 27 | +
|
| 28 | +==To-do & bugs==
|
| 29 | +This extension is right now a major hack. It requires YUI and isn't pretty in any case,
|
| 30 | +but it works and has been tested on MediaWiki 1.14alpha.
|
| 31 | +
|
| 32 | +The JavaScript file should be rewritten so that the YUI dependency could be removed.
|
| 33 | +Obviously YAHOOTools.js should also be killed in the process.
|
| 34 | +
|
| 35 | +Patches are more than welcome and they can be submitted either through Bugzilla <https://bugzilla.wikimedia.org> or emailed to me
|
| 36 | +<jack@countervandalism.net> directly.
|
| 37 | +
|
| 38 | +--Jack Phoenix, February 2009 |
\ No newline at end of file |