Index: trunk/extensions/EmailPage/EmailPage.alias.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Aliases for Special:EmailArticle |
| 4 | + * Aliases for Special:EmailPage |
5 | 5 | * |
6 | 6 | * @addtogroup Extensions |
7 | 7 | */ |
— | — | @@ -11,50 +11,50 @@ |
12 | 12 | * @author Jon Harald Søby |
13 | 13 | */ |
14 | 14 | $aliases['en'] = array( |
15 | | - 'EmailArticle' => array( 'EmailArticle' ), |
| 15 | + 'EmailPages' => array( 'EmailPages' ), |
16 | 16 | ); |
17 | 17 | |
18 | 18 | /** Arabic (العربية) */ |
19 | 19 | $aliases['ar'] = array( |
20 | | - 'EmailArticle' => array( 'مراسلة المقالة' ), |
| 20 | + 'EmailPages' => array( 'مراسلة الصفحة' ), |
21 | 21 | ); |
22 | 22 | |
23 | 23 | /** Egyptian Spoken Arabic (مصرى) */ |
24 | 24 | $aliases['arz'] = array( |
25 | | - 'EmailArticle' => array( 'مراسلة المقالة' ), |
| 25 | + 'EmailPages' => array( 'مراسلة المقالة' ), |
26 | 26 | ); |
27 | 27 | |
28 | 28 | /** French (Français) */ |
29 | 29 | $aliases['fr'] = array( |
30 | | - 'EmailArticle' => array( 'EnvoyerArticle', 'Envoyer Article', 'Envoyer l’article' ), |
| 30 | + 'EmailPages' => array( 'EnvoyerPage', 'Envoyer Page' ), |
31 | 31 | ); |
32 | 32 | |
33 | 33 | /** Hebrew (עברית) |
34 | 34 | * @author Rotem Liss |
35 | 35 | */ |
36 | 36 | $aliases['he'] = array( |
37 | | - 'EmailArticle' => array( 'שליחת_דף_בדואר' ), |
| 37 | + 'EmailPages' => array( 'שליחת_דף_בדואר' ), |
38 | 38 | ); |
39 | 39 | |
40 | 40 | /** Haitian (Kreyòl ayisyen) */ |
41 | 41 | $aliases['ht'] = array( |
42 | | - 'EmailArticle' => array( 'EmèlAtik' ), |
| 42 | + 'EmailPages' => array( 'EmèlAtik' ), |
43 | 43 | ); |
44 | 44 | |
45 | 45 | /** Hungarian (Magyar) */ |
46 | 46 | $aliases['hu'] = array( |
47 | | - 'EmailArticle' => array( 'Szócikk elküldése e-mailben' ), |
| 47 | + 'EmailPages' => array( 'Szócikk elküldése e-mailben' ), |
48 | 48 | ); |
49 | 49 | |
50 | 50 | /** Dutch (Nederlands) */ |
51 | 51 | $aliases['nl'] = array( |
52 | | - 'EmailArticle' => array( 'PaginaE-mailen', 'PaginaEmailen' ), |
| 52 | + 'EmailPages' => array( 'PaginaE-mailen', 'PaginaEmailen' ), |
53 | 53 | ); |
54 | 54 | |
55 | 55 | /** Norwegian (bokmål) (Norsk (bokmål)) |
56 | 56 | * @author Jon Harald Søby |
57 | 57 | */ |
58 | 58 | $aliases['no'] = array( |
59 | | - 'EmailArticle' => array( 'Send_side_som_e-post' ), |
| 59 | + 'EmailPages' => array( 'Send_side_som_e-post' ), |
60 | 60 | ); |
61 | 61 | |
Index: trunk/extensions/EmailPage/EmailPage_body.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | |
5 | | -class SpecialEmailArticle extends SpecialPage { |
| 5 | +class SpecialEmailPage extends SpecialPage { |
6 | 6 | |
7 | 7 | var $recipients = array(); |
8 | 8 | var $title; |
— | — | @@ -14,56 +14,56 @@ |
15 | 15 | var $css; |
16 | 16 | |
17 | 17 | public function __construct() { |
18 | | - global $wgEmailArticleGroup; |
19 | | - SpecialPage::SpecialPage('EmailArticle', $wgEmailArticleGroup); |
| 18 | + global $wgEmailPageGroup; |
| 19 | + SpecialPage::SpecialPage('EmailPages', $wgEmailPageGroup); |
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Override SpecialPage::execute($param = '') |
24 | 24 | */ |
25 | 25 | function execute($param) { |
26 | | - global $wgOut, $wgUser, $wgEmailArticleContactsCat, $wgGroupPermissions, $wgSitename, $wgEmailArticleCss, $wgEmailArticleAllowAllUsers; |
| 26 | + global $wgOut, $wgUser, $wgEmailPageContactsCat, $wgGroupPermissions, $wgSitename, $wgEmailPageCss, $wgEmailPageAllowAllUsers; |
27 | 27 | $db =& wfGetDB(DB_SLAVE); |
28 | 28 | $param = str_replace('_', ' ', $param); |
29 | 29 | |
30 | | - wfLoadExtensionMessages( 'EmailArticle' ); |
| 30 | + wfLoadExtensionMessages( 'EmailPage' ); |
31 | 31 | |
32 | 32 | $this->setHeaders(); |
33 | 33 | |
34 | 34 | # Get info from request or set to defaults |
35 | 35 | $this->title = isset($_REQUEST['ea-title']) ? $_REQUEST['ea-title'] : $param; |
36 | | - $this->subject = isset($_REQUEST['ea-subject']) ? $_REQUEST['ea-subject'] : '' . wfMsg('ea-articlesend', $this->title, $wgSitename ); |
| 36 | + $this->subject = isset($_REQUEST['ea-subject']) ? $_REQUEST['ea-subject'] : '' . wfMsg('ea-pagesend', $this->title, $wgSitename ); |
37 | 37 | $this->header = isset($_REQUEST['ea-header']) ? $_REQUEST['ea-header'] : ''; |
38 | 38 | $this->cat = isset($_REQUEST['ea-cat']) ? $_REQUEST['ea-cat'] : ''; |
39 | 39 | $this->group = isset($_REQUEST['ea-group']) ? $_REQUEST['ea-group'] : ''; |
40 | 40 | $this->list = isset($_REQUEST['ea-list']) ? $_REQUEST['ea-list'] : ''; |
41 | 41 | $this->textonly = isset($_REQUEST['ea-textonly']) ? $_REQUEST['ea-textonly'] : false; |
42 | | - $this->css = isset($_REQUEST['ea-css']) ? $_REQUEST['ea-css'] : $wgEmailArticleCss; |
| 42 | + $this->css = isset($_REQUEST['ea-css']) ? $_REQUEST['ea-css'] : $wgEmailPageCss; |
43 | 43 | |
44 | | - # Bail if no article title to send has been specified |
| 44 | + # Bail if no page title to send has been specified |
45 | 45 | if ($this->title) $wgOut->addWikiText(wfMsg('ea-heading', $this->title)); |
46 | | - else return $wgOut->addWikiText(wfMsg('ea-noarticle')); |
| 46 | + else return $wgOut->addWikiText(wfMsg('ea-nopage')); |
47 | 47 | |
48 | 48 | # If the send button was clicked, attempt to send and exit |
49 | 49 | if (isset($_REQUEST['ea-send'])) return $this->send(); |
50 | 50 | |
51 | 51 | # Render form |
52 | | - $special = Title::makeTitle(NS_SPECIAL, 'EmailArticle'); |
| 52 | + $special = Title::makeTitle(NS_SPECIAL, 'EmailPage'); |
53 | 53 | $wgOut->addHTML(wfElement('form',array( |
54 | | - 'class' => 'EmailArticle', |
| 54 | + 'class' => 'EmailPage', |
55 | 55 | 'action' => $special->getLocalURL('action=submit'), |
56 | 56 | 'method' => 'POST' |
57 | 57 | ),null)); |
58 | 58 | $wgOut->addHTML('<fieldset><legend>'.wfMsg('ea-selectrecipients').'</legend>'); |
59 | 59 | $wgOut->addHTML('<table style="padding:0;margin:0;border:none;">'); |
60 | 60 | |
61 | | - # If $wgEmailArticleContactsCat is set, create a select list of all categories |
62 | | - if ($wgEmailArticleContactsCat) { |
| 61 | + # If $wgEmailPageContactsCat is set, create a select list of all categories |
| 62 | + if ($wgEmailPageContactsCat) { |
63 | 63 | $cats = ''; |
64 | 64 | $result = $db->select( |
65 | 65 | 'categorylinks', |
66 | 66 | 'cl_from', |
67 | | - 'cl_to = '.$db->addQuotes($wgEmailArticleContactsCat), |
| 67 | + 'cl_to = '.$db->addQuotes($wgEmailPageContactsCat), |
68 | 68 | __METHOD__, |
69 | 69 | array('ORDER BY' => 'cl_sortkey') |
70 | 70 | ); |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | $groups = '<option/>'; |
85 | 85 | foreach (array_keys($wgGroupPermissions) as $group) if ($group != '*') { |
86 | 86 | $selected = $group == $this->group ? ' selected' : ''; |
87 | | - if ($wgEmailArticleAllowAllUsers || $group != 'user') $groups .= "<option$selected>$group</option>"; |
| 87 | + if ($wgEmailPageAllowAllUsers || $group != 'user') $groups .= "<option$selected>$group</option>"; |
88 | 88 | } |
89 | 89 | $wgOut->addHTML("<tr><td>".wfMsg('ea-fromgroup')."</td><td><select name=\"ea-group\">$groups</select></td></tr>\n"); |
90 | 90 | $wgOut->addHTML('</table>'); |
— | — | @@ -139,10 +139,10 @@ |
140 | 140 | # Send the message to the recipients (or just list them if arg = false) |
141 | 141 | function send($send = true) { |
142 | 142 | global $wgOut, $wgUser, $wgParser, $wgServer, $wgScript, $wgArticlePath, $wgScriptPath, |
143 | | - $wgEmailArticleCss, $wgEmailArticleGroup, $wgEmailArticleAllowRemoteAddr, $wgEmailArticleAllowAllUsers; |
| 143 | + $wgEmailPageCss, $wgEmailPageGroup, $wgEmailPageAllowRemoteAddr, $wgEmailPageAllowAllUsers; |
144 | 144 | |
145 | 145 | # Set error and bail if user not in postmaster group, and request not from trusted address |
146 | | - if ($wgEmailArticleGroup && !in_array($wgEmailArticleGroup, $wgUser->getGroups()) && !in_array($_SERVER['REMOTE_ADDR'], $wgEmailArticleAllowRemoteAddr)) { |
| 146 | + if ($wgEmailPageGroup && !in_array($wgEmailPageGroup, $wgUser->getGroups()) && !in_array($_SERVER['REMOTE_ADDR'], $wgEmailPageAllowRemoteAddr)) { |
147 | 147 | $denied = wfMsg('ea-denied'); |
148 | 148 | $wgOut->addWikiText(wfMsg('ea-error', $this->title, $denied )); |
149 | 149 | return false; |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | $title = Title::newFromText($this->title); |
154 | 154 | $opt = new ParserOptions; |
155 | 155 | |
156 | | - # Get contact article titles from selected cat |
| 156 | + # Get contact page titles from selected cat |
157 | 157 | if ($this->cat) { |
158 | 158 | $result = $db->select( |
159 | 159 | 'categorylinks', |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | } |
168 | 168 | |
169 | 169 | # Get email addresses from users in selected group |
170 | | - if ($this->group && ($wgEmailArticleAllowAllUsers || $this->group != 'user')) { |
| 170 | + if ($this->group && ($wgEmailPageAllowAllUsers || $this->group != 'user')) { |
171 | 171 | $group = $db->addQuotes($this->group); |
172 | 172 | $result = $this->group == 'user' |
173 | 173 | ? $db->select('user', 'user_email', 'user_email != \'\'', __METHOD__) |
— | — | @@ -179,15 +179,15 @@ |
180 | 180 | $list = $wgParser->preprocess($this->list, $title, $opt); |
181 | 181 | foreach (preg_split("/[\\x00-\\x1f,;*]+/", $list) as $item) $this->addRecipient($item); |
182 | 182 | |
183 | | - # Compose the wikitext content of the article to send |
184 | | - $article = new Article($title); |
185 | | - $message = $article->getContent(); |
| 183 | + # Compose the wikitext content of the page to send |
| 184 | + $page = new Article($title); |
| 185 | + $message = $page->getContent(); |
186 | 186 | if ($this->header) $message = "{$this->header}\n\n$message"; |
187 | 187 | |
188 | 188 | # Convert the message text to html unless textonly |
189 | 189 | if ($this->textonly == '') { |
190 | 190 | |
191 | | - # Parse the wikitext using absolute URL's for local article links |
| 191 | + # Parse the wikitext using absolute URL's for local page links |
192 | 192 | $tmp = array($wgArticlePath, $wgScriptPath, $wgScript); |
193 | 193 | $wgArticlePath = $wgServer.$wgArticlePath; |
194 | 194 | $wgScriptPath = $wgServer.$wgScriptPath; |
— | — | @@ -197,8 +197,8 @@ |
198 | 198 | |
199 | 199 | # Get CSS content if any |
200 | 200 | if ($this->css) { |
201 | | - $article = new Article(Title::newFromText($this->css)); |
202 | | - $css = '<style type="text/css">'.$article->getContent().'</style>'; |
| 201 | + $page = new Article(Title::newFromText($this->css)); |
| 202 | + $css = '<style type="text/css">'.$page->getContent().'</style>'; |
203 | 203 | } |
204 | 204 | |
205 | 205 | # Create a html wrapper for the message |
— | — | @@ -239,12 +239,12 @@ |
240 | 240 | |
241 | 241 | /** |
242 | 242 | * Add a recipient the list |
243 | | - * - accepts title objects for article containing email address, or string of actual address |
| 243 | + * - accepts title objects for page containing email address, or string of actual address |
244 | 244 | */ |
245 | 245 | function addRecipient($recipient) { |
246 | 246 | if (is_object($recipient) && $recipient->exists()) { |
247 | | - $article = new Article($recipient); |
248 | | - if (preg_match('/[a-z0-9_.-]+@[a-z0-9_.-]+/i', $article->getContent(), $emails)) $recipient = $emails[0]; |
| 247 | + $page = new Article($recipient); |
| 248 | + if (preg_match('/[a-z0-9_.-]+@[a-z0-9_.-]+/i', $page->getContent(), $emails)) $recipient = $emails[0]; |
249 | 249 | else $recipient = ''; |
250 | 250 | } |
251 | 251 | if ($valid = User::isValidEmailAddr($recipient)) $this->recipients[] = $recipient; |
Index: trunk/extensions/EmailPage/EmailPage.i18n.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Internationalisation file for extension EmailArticle. |
| 4 | + * Internationalisation file for extension EmailPage. |
5 | 5 | * |
6 | 6 | * @addtogroup Extensions |
7 | 7 | */ |
— | — | @@ -11,12 +11,12 @@ |
12 | 12 | * @author Nad |
13 | 13 | */ |
14 | 14 | $messages['en'] = array( |
15 | | - 'emailarticle' => 'E-mail page', |
| 15 | + 'emailpages' => 'E-mail page', |
16 | 16 | 'ea-desc' => 'Send rendered HTML page to an e-mail address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].', |
17 | 17 | 'ea-heading' => "=== E-mailing the page [[$1]] ===", |
18 | 18 | 'ea-fromgroup' => 'From group:', |
19 | | - 'ea-articlesend' => 'Page "$1" sent from $2', |
20 | | - 'ea-noarticle' => "Please specify a page to send, for example [[Special:EmailArticle/Main Page]].", |
| 19 | + 'ea-pagesend' => 'Page "$1" sent from $2', |
| 20 | + 'ea-nopage' => "Please specify a page to send, for example [[Special:EmailPage/Main Page]].", |
21 | 21 | 'ea-norecipients' => "No valid e-mail addresses found!", |
22 | 22 | 'ea-listrecipients' => "=== {{PLURAL:$1|Recipient|$1 recipients}} ===", |
23 | 23 | 'ea-error' => "'''Error sending [[$1]]:''' ''$2''", |
— | — | @@ -39,15 +39,16 @@ |
40 | 40 | * @author Meno25 |
41 | 41 | */ |
42 | 42 | $messages['ar'] = array( |
43 | | - 'emailarticle' => 'مراسلة الصفحة', |
| 43 | + 'emailpages' => 'إرسال رسالة للمستخدم', |
44 | 44 | 'ea-heading' => '=== مراسلة صفحة [[$1]] ===', |
45 | 45 | 'ea-fromgroup' => 'من مجموعة:', |
46 | | - 'ea-articlesend' => 'الصفحة "$1" أُرسلت من $2', |
| 46 | + 'ea-pagesend' => 'الصفحة "$1" أُرسلت من $2', |
47 | 47 | 'ea-norecipients' => 'لا عناوين بريد إلكتروني صحيحة وُجدت!', |
48 | 48 | 'ea-error' => "'''خطأ في إرسال [[$1]]:''' ''$2''", |
49 | 49 | 'ea-denied' => 'السماح مرفوض', |
50 | 50 | 'ea-selectrecipients' => 'اختر المتلقين', |
51 | 51 | 'ea-compose' => 'كتابة المحتوى', |
| 52 | + 'ea-show' => 'عرض المتلقين', |
52 | 53 | 'ea-send' => 'أرسل!', |
53 | 54 | 'ea-subject' => 'أدخل سطر عنوان للبريد الإلكتروني', |
54 | 55 | ); |
— | — | @@ -57,7 +58,7 @@ |
58 | 59 | */ |
59 | 60 | $messages['bg'] = array( |
60 | 61 | 'ea-fromgroup' => 'От група:', |
61 | | - 'ea-noarticle' => 'Необходимо е да се посочи страница, която да бъде изпратена, напр. [[Special:EmailArticle/Начална страница]].', |
| 62 | + 'ea-nopage' => 'Необходимо е да се посочи страница, която да бъде изпратена, напр. [[Special:EmailPage/Начална страница]].', |
62 | 63 | 'ea-norecipients' => 'Не бяха намерени валидни адреси за е-поща!', |
63 | 64 | 'ea-listrecipients' => '=== Списък на $1 {{PLURAL:$1|получател|получателя}} ===', |
64 | 65 | 'ea-error' => "'''Грешка при изпращане на [[$1]]:''' ''$2''", |
— | — | @@ -71,11 +72,11 @@ |
72 | 73 | * @author Yekrats |
73 | 74 | */ |
74 | 75 | $messages['eo'] = array( |
75 | | - 'emailarticle' => 'Retpoŝtigi paĝon', |
| 76 | + 'emailpages' => 'Retpoŝtigi paĝon', |
76 | 77 | 'ea-heading' => '=== Retpoŝtigante paĝon [[$1]] ===', |
77 | 78 | 'ea-fromgroup' => 'De grupo:', |
78 | | - 'ea-articlesend' => 'Paĝo "$1" sendita de $2', |
79 | | - 'ea-noarticle' => 'Bonvolu enigi paĝon por retsendi, ekz-e [[Special:EmailArticle/Main Page]].', |
| 79 | + 'ea-pagesend' => 'Paĝo "$1" sendita de $2', |
| 80 | + 'ea-nopage' => 'Bonvolu enigi paĝon por retsendi, ekz-e [[Special:EmailPage/Main Page]].', |
80 | 81 | 'ea-norecipients' => 'Neniaj validaj retadresoj trovitaj!', |
81 | 82 | 'ea-listrecipients' => '=== Listo de $1 {{PLURAL:$1|ricevonto|ricevontoj}} ===', |
82 | 83 | 'ea-error' => "'''Eraro sendante [[$1]]:''' ''$2''", |
— | — | @@ -91,12 +92,12 @@ |
92 | 93 | * @author Grondin |
93 | 94 | */ |
94 | 95 | $messages['fr'] = array( |
95 | | - 'emailarticle' => 'Envoyer l’article par courriel', |
| 96 | + 'emailpages' => 'Envoyer l’article par courriel', |
96 | 97 | 'ea-desc' => 'Envoie le rendu d’une page HTML à une adresse électronique où à une liste d’adresses en utilisant [http://phpmailer.sourceforge.net phpmailer]', |
97 | 98 | 'ea-heading' => '=== Envoi de la page [[$1]] par courrier électronique ===', |
98 | 99 | 'ea-fromgroup' => 'Depuis le groupe :', |
99 | | - 'ea-articlesend' => 'Page « $1 » envoyée depuis $2', |
100 | | - 'ea-noarticle' => 'Veuillez spécifier une page à envoyer, par exemple [[Special:EmailArticle/Accueil]]', |
| 100 | + 'ea-pagesend' => 'Page « $1 » envoyée depuis $2', |
| 101 | + 'ea-nopage' => 'Veuillez spécifier une page à envoyer, par exemple [[Special:EmailPage/Accueil]]', |
101 | 102 | 'ea-norecipients' => 'Aucune adresse courriel de trouvée !', |
102 | 103 | 'ea-listrecipients' => '=== Liste de $1 {{PLURAL:$1|destinataire|destinataires}} ===', |
103 | 104 | 'ea-error' => "'''Erreur de l’envoi de [[$1]] :''' ''$2''", |
— | — | @@ -118,12 +119,12 @@ |
119 | 120 | * @author Toliño |
120 | 121 | */ |
121 | 122 | $messages['gl'] = array( |
122 | | - 'emailarticle' => 'Enviar a páxina por correo electrónico', |
| 123 | + 'emailpages' => 'Enviar a páxina por correo electrónico', |
123 | 124 | 'ea-desc' => 'Enviar páxinas HTML renderizadas a un enderezo de correo electrónico (ou a varios correos) usando [http://phpmailer.sourceforge.net phpmailer].', |
124 | 125 | 'ea-heading' => '=== Enviando a páxina "[[$1]]" ===', |
125 | 126 | 'ea-fromgroup' => 'Desde o grupo:', |
126 | | - 'ea-articlesend' => 'O artigo "$1" foi enviado desde $2', |
127 | | - 'ea-noarticle' => 'Por favor, especifique a páxina que quere enviar, por exemplo: [[Special:EmailArticle/Main Page]].', |
| 127 | + 'ea-pagesend' => 'O artigo "$1" foi enviado desde $2', |
| 128 | + 'ea-nopage' => 'Por favor, especifique a páxina que quere enviar, por exemplo: [[Special:EmailPage/Main Page]].', |
128 | 129 | 'ea-norecipients' => 'Non foi atopado ningún enderezo de correo electrónico válido!', |
129 | 130 | 'ea-listrecipients' => '=== {{PLURAL:$1|Nome do destinatario|Listaxe dos $1 destinatarios}} ===', |
130 | 131 | 'ea-error' => "'''Erro no envío de \"[[\$1]]\":''' ''\$2''", |
— | — | @@ -145,9 +146,9 @@ |
146 | 147 | * @author Lovekhmer |
147 | 148 | */ |
148 | 149 | $messages['km'] = array( |
149 | | - 'emailarticle' => 'ទំព័រអ៊ីមែល', |
| 150 | + 'emailpages' => 'ទំព័រអ៊ីមែល', |
150 | 151 | 'ea-fromgroup' => 'ពីក្រុម:', |
151 | | - 'ea-articlesend' => 'ទំព័រ"$1"ត្រូវបានបញ្ជូនពី$2', |
| 152 | + 'ea-pagesend' => 'ទំព័រ"$1"ត្រូវបានបញ្ជូនពី$2', |
152 | 153 | 'ea-send' => 'ផ្ញើ!', |
153 | 154 | ); |
154 | 155 | |
— | — | @@ -155,10 +156,10 @@ |
156 | 157 | * @author Robby |
157 | 158 | */ |
158 | 159 | $messages['lb'] = array( |
159 | | - 'emailarticle' => 'Säit per Mail schécken', |
| 160 | + 'emailpages' => 'Säit per Mail schécken', |
160 | 161 | 'ea-heading' => '=== Säit [[$1]] peer E-Mail verschécken ===', |
161 | 162 | 'ea-fromgroup' => 'Vun der Grupp:', |
162 | | - 'ea-articlesend' => 'D\'Säit "$1" gouf verschéckt vum $2', |
| 163 | + 'ea-pagesend' => 'D\'Säit "$1" gouf verschéckt vum $2', |
163 | 164 | 'ea-norecipients' => 'Keng gëlteg E-Mailadress fonnt', |
164 | 165 | 'ea-denied' => 'Rechter refuséiert', |
165 | 166 | 'ea-selectrecipients' => 'Adressaten erauswielen', |
— | — | @@ -172,11 +173,11 @@ |
173 | 174 | * @author Shijualex |
174 | 175 | */ |
175 | 176 | $messages['ml'] = array( |
176 | | - 'emailarticle' => 'ഇമെയില് താള്', |
| 177 | + 'emailpages' => 'ഇമെയില് താള്', |
177 | 178 | 'ea-heading' => '=== [[$1]] എന്ന താള് ഇമെയില് ചെയ്യുന്നു ===', |
178 | 179 | 'ea-fromgroup' => 'ഗ്രൂപ്പ്:', |
179 | | - 'ea-articlesend' => '$2 സംരംഭത്തില് നിന്നു "$1" എന്ന താള് അയച്ചു', |
180 | | - 'ea-noarticle' => 'അയക്കുവാന് വേണ്ടി ഒരു താള് തിരഞ്ഞെടുക്കുക. ഉദാ: [[Special:EmailArticle/Main Page]]', |
| 180 | + 'ea-pagesend' => '$2 സംരംഭത്തില് നിന്നു "$1" എന്ന താള് അയച്ചു', |
| 181 | + 'ea-nopage' => 'അയക്കുവാന് വേണ്ടി ഒരു താള് തിരഞ്ഞെടുക്കുക. ഉദാ: [[Special:EmailPage/Main Page]]', |
181 | 182 | 'ea-norecipients' => 'സാധുവായ ഇമെയില് വിലാസങ്ങള് കണ്ടില്ല!', |
182 | 183 | 'ea-listrecipients' => '=== $1 {{PLURAL:$1|സ്വീകര്ത്താവിന്റെ|സ്വീകര്ത്താക്കളുടെ}} പട്ടിക ===', |
183 | 184 | 'ea-error' => "'''[[$1]] അയക്കുന്നതില് പിഴവ്:''' ''$2''", |
— | — | @@ -193,12 +194,12 @@ |
194 | 195 | * @author Kaustubh |
195 | 196 | */ |
196 | 197 | $messages['mr'] = array( |
197 | | - 'emailarticle' => 'पान इ-मेल करा', |
| 198 | + 'emailpages' => 'पान इ-मेल करा', |
198 | 199 | 'ea-desc' => ' [http://phpmailer.sourceforge.net पीएचपी मेलर] चा वापर करून एखादे पान एखाद्या इ-मेल पत्त्यावर किंवा इ-मेल पत्त्यांच्या यादीवर पाठवा.', |
199 | 200 | 'ea-heading' => '=== [[$1]] पान इ-मेल करीत आहे ===', |
200 | 201 | 'ea-fromgroup' => 'गटाकडून:', |
201 | | - 'ea-articlesend' => '$2 ने "$1" पान पाठविले', |
202 | | - 'ea-noarticle' => 'कृपया पाठविण्यासाठी एक पान निवडा, उदाहरणासाठी [[Special:EmailArticle/Main Page]].', |
| 202 | + 'ea-pagesend' => '$2 ने "$1" पान पाठविले', |
| 203 | + 'ea-nopage' => 'कृपया पाठविण्यासाठी एक पान निवडा, उदाहरणासाठी [[Special:EmailPage/Main Page]].', |
203 | 204 | 'ea-norecipients' => 'योग्य इ-मेल पत्ता सापडला नाही!', |
204 | 205 | 'ea-listrecipients' => '=== $1 {{PLURAL:$1|सदस्याची|सदस्यांची}}यादी ===', |
205 | 206 | 'ea-error' => "'''पाठविण्यामध्ये त्रुटी [[$1]]:''' ''$2''", |
— | — | @@ -227,12 +228,12 @@ |
228 | 229 | * @author Siebrand |
229 | 230 | */ |
230 | 231 | $messages['nl'] = array( |
231 | | - 'emailarticle' => 'Pagina e-mailen', |
| 232 | + 'emailpages' => 'Pagina e-mailen', |
232 | 233 | 'ea-desc' => 'Stuur een gerenderde pagina naar een e-mailadres of een lijst van adressen met behulp van [http://phpmailer.sourceforge.net phpmailer].', |
233 | 234 | 'ea-heading' => '=== Pagina [[$1]] e-mailen ===', |
234 | 235 | 'ea-fromgroup' => 'Van groep:', |
235 | | - 'ea-articlesend' => 'Pagina "$1" is vanuit $2 verstuurd', |
236 | | - 'ea-noarticle' => 'Geef een pagina op om te versturen, bijvoorbeeld [[Special:EmailArticle/Hoofdpagina]].', |
| 236 | + 'ea-pagesend' => 'Pagina "$1" is vanuit $2 verstuurd', |
| 237 | + 'ea-nopage' => 'Geef een pagina op om te versturen, bijvoorbeeld [[Special:EmailPage/Hoofdpagina]].', |
237 | 238 | 'ea-norecipients' => 'Er is geen geldig e-mailadres opgegeven!', |
238 | 239 | 'ea-listrecipients' => '=== Lijst met $1 {{PLURAL:$1|ontvanger|ontvangers}} ===', |
239 | 240 | 'ea-error' => "'''Fout bij het versturen van [[$1]]:''' ''$2''", |
— | — | @@ -254,12 +255,12 @@ |
255 | 256 | * @author Jon Harald Søby |
256 | 257 | */ |
257 | 258 | $messages['no'] = array( |
258 | | - 'emailarticle' => 'Send side som e-post', |
| 259 | + 'emailpages' => 'Send side som e-post', |
259 | 260 | 'ea-desc' => 'Send HTML-side til en eller flere e-postadresser ved hjelp av [http://phpmailer.sourceforge.net/ phpmailer].', |
260 | 261 | 'ea-heading' => '=== Send siden [[$1]] som e-post ===', |
261 | 262 | 'ea-fromgroup' => 'Fra gruppe:', |
262 | | - 'ea-articlesend' => 'Siden «$1» sendt fra $2', |
263 | | - 'ea-noarticle' => 'Oppgi en side du vil sende, for eksempel [[Special:EmailArticle/{{MediaWiki:Mainpage}}]].', |
| 263 | + 'ea-pagesend' => 'Siden «$1» sendt fra $2', |
| 264 | + 'ea-nopage' => 'Oppgi en side du vil sende, for eksempel [[Special:EmailPage/{{MediaWiki:Mainpage}}]].', |
264 | 265 | 'ea-norecipients' => 'Ingen gyldige e-postadresser funnet.', |
265 | 266 | 'ea-listrecipients' => '=== Liste over $1 {{PLURAL:$1|mottaker|mottakere}} ===', |
266 | 267 | 'ea-error' => "'''Feil under sending av [[$1]]:''' ''$2''", |
— | — | @@ -281,12 +282,12 @@ |
282 | 283 | * @author Cedric31 |
283 | 284 | */ |
284 | 285 | $messages['oc'] = array( |
285 | | - 'emailarticle' => 'Mandar l’article per corrièr electronic', |
| 286 | + 'emailpages' => 'Mandar l’article per corrièr electronic', |
286 | 287 | 'ea-desc' => 'Manda lo rendut d’una pagina HTML a una adreça electronica o a una tièra d’adreças en utilizant [http://phpmailer.sourceforge.net phpmailer]', |
287 | 288 | 'ea-heading' => '=== Mandadís de la pagina [[$1]] per corrièr electronic ===', |
288 | 289 | 'ea-fromgroup' => 'Dempuèi lo grop :', |
289 | | - 'ea-articlesend' => 'Pagina « $1 » mandada dempuèi $2', |
290 | | - 'ea-noarticle' => 'Especificatz una pagina de mandar, per exemple [[Special:EmailArticle/Acuèlh]]', |
| 290 | + 'ea-pagesend' => 'Pagina « $1 » mandada dempuèi $2', |
| 291 | + 'ea-nopage' => 'Especificatz una pagina de mandar, per exemple [[Special:EmailPage/Acuèlh]]', |
291 | 292 | 'ea-norecipients' => "Cap d'adreça de corrièr electronic pas trobada !", |
292 | 293 | 'ea-listrecipients' => '=== Tièra de $1 {{PLURAL:$1|destinatari|destinataris}} ===', |
293 | 294 | 'ea-error' => "'''Error del mandadís de [[$1]] :''' ''$2''", |
— | — | @@ -304,16 +305,27 @@ |
305 | 306 | 'ea-selectcss' => "Seleccionar un fuèlh d'estil CSS", |
306 | 307 | ); |
307 | 308 | |
| 309 | +/** Polish (Polski) |
| 310 | + * @author Maikking |
| 311 | + */ |
| 312 | +$messages['pl'] = array( |
| 313 | + 'ea-selectrecipients' => 'Wybierz odbiorców', |
| 314 | + 'ea-show' => 'Pokaż odbiorców', |
| 315 | + 'ea-send' => 'Wyślij', |
| 316 | + 'ea-subject' => 'Wprowadź temat', |
| 317 | + 'ea-selectcss' => 'Wybierz styl CSS', |
| 318 | +); |
| 319 | + |
308 | 320 | /** Slovak (Slovenčina) |
309 | 321 | * @author Helix84 |
310 | 322 | */ |
311 | 323 | $messages['sk'] = array( |
312 | | - 'emailarticle' => 'Poslať stránku emailom', |
| 324 | + 'emailpages' => 'Poslať stránku emailom', |
313 | 325 | 'ea-desc' => 'Poslať stránku vo formáte HTML na emailovú adresu alebo zoznam adries pomocou [http://phpmailer.sourceforge.net phpmailer].', |
314 | 326 | 'ea-heading' => '=== Poslanie stránky [[$1]] emailom ===', |
315 | 327 | 'ea-fromgroup' => 'Zo skupiny:', |
316 | | - 'ea-articlesend' => 'Článok „$1” poslaný z $2', |
317 | | - 'ea-noarticle' => 'Prosím, uveďte stránku, ktorú chcete poslať, napr. [[Special:EmailArticle/Hlavná stránka]].', |
| 328 | + 'ea-pagesend' => 'Článok „$1” poslaný z $2', |
| 329 | + 'ea-nopage' => 'Prosím, uveďte stránku, ktorú chcete poslať, napr. [[Special:EmailPage/Hlavná stránka]].', |
318 | 330 | 'ea-norecipients' => 'Nebola nájdená platná emailová adresa!', |
319 | 331 | 'ea-listrecipients' => '=== Zoznam $1 {{PLURAL:$1|príjemcu|príjemcov}} ===', |
320 | 332 | 'ea-error' => "'''Chyba pri odosielaní [[$1]]:''' ''$2''", |
— | — | @@ -342,12 +354,12 @@ |
343 | 355 | * @author M.M.S. |
344 | 356 | */ |
345 | 357 | $messages['sv'] = array( |
346 | | - 'emailarticle' => 'E-posta sida', |
| 358 | + 'emailpages' => 'E-posta sida', |
347 | 359 | 'ea-desc' => 'Skicka en renderad HTML-sida till en e-postadress eller en lista över adresser som använder [http://phpmailer.sourceforge.net phpmailer].', |
348 | 360 | 'ea-heading' => '=== E-posta sidan [[$1]] ===', |
349 | 361 | 'ea-fromgroup' => 'Från grupp:', |
350 | | - 'ea-articlesend' => 'Artikeln "$1" skickades från $2', |
351 | | - 'ea-noarticle' => 'Var god ange en sida att skicka, för exempel [[Special:EmailArticle/Main Page]].', |
| 362 | + 'ea-pagesend' => 'Artikeln "$1" skickades från $2', |
| 363 | + 'ea-nopage' => 'Var god ange en sida att skicka, för exempel [[Special:EmailPage/Main Page]].', |
352 | 364 | 'ea-norecipients' => 'Inga giltiga e-postadresser hittades!', |
353 | 365 | 'ea-listrecipients' => '=== Lista över $1 {{PLURAL:$1|mottagare|mottagare}} ===', |
354 | 366 | 'ea-error' => "'''Fel under sändande av [[$1]]:''' ''$2''", |
— | — | @@ -378,10 +390,10 @@ |
379 | 391 | * @author Vinhtantran |
380 | 392 | */ |
381 | 393 | $messages['vi'] = array( |
382 | | - 'emailarticle' => 'Trang thư điện tử', |
| 394 | + 'emailpages' => 'Trang thư điện tử', |
383 | 395 | 'ea-desc' => 'Gửi trang HTML giản lược đến một địa chỉ hoặc danh sách các địa chỉ thư điện tử dùng [http://phpmailer.sourceforge.net phpmailer].', |
384 | 396 | 'ea-heading' => '=== Gửi trang [[$1]] ===', |
385 | | - 'ea-noarticle' => 'Xin hãy xác định trang muốn gửi, ví dụ [[Special:EmailArticle/Trang_Chính]].', |
| 397 | + 'ea-nopage' => 'Xin hãy xác định trang muốn gửi, ví dụ [[Special:EmailPage/Trang_Chính]].', |
386 | 398 | 'ea-norecipients' => 'Không tìm thấy địa chỉ thư điện tử hợp lệ!', |
387 | 399 | 'ea-listrecipients' => '=== Danh sách $1 {{PLURAL:$1|người nhận|người nhận}} ===', |
388 | 400 | 'ea-error' => "'''Lỗi khi gửi [[$1]]:''' ''$2''", |
Index: trunk/extensions/EmailPage/EmailPage.php |
— | — | @@ -1,8 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * EmailArticle extension - Send rendered HTML article to an email address or list of addresses using phpmailer |
| 4 | + * EmailPage extension - Send rendered HTML page to an email address or list of addresses using phpmailer |
5 | 5 | * |
6 | | - * See http://www.mediawiki.org/wiki/Extension:EmailArticle for installation and usage details |
| 6 | + * See http://www.mediawiki.org/wiki/Extension:EmailPage for installation and usage details |
7 | 7 | * |
8 | 8 | * @package MediaWiki |
9 | 9 | * @subpackage Extensions |
— | — | @@ -13,61 +13,60 @@ |
14 | 14 | |
15 | 15 | if (!defined('MEDIAWIKI')) die('Not an entry point.'); |
16 | 16 | |
17 | | -define('EMAILARTICLE_VERSION', '1.1.0, 2008-06-04'); |
| 17 | +define('EMAILPAGE_VERSION', '1.2.0, 2008-07-13'); |
18 | 18 | |
19 | | -$wgEmailArticleGroup = 'sysop'; # Users must belong to this group to send emails (empty string means anyone can send) |
20 | | -$wgEmailArticleContactsCat = ''; # This specifies the name of a category containing categories of contact articles |
21 | | -$wgEmailArticleCss = 'EmailArticle.css'; # A minimal CSS article to embed in the email (eg. monobook/main.css without portlets, actions etc) |
22 | | -$wgEmailArticleAllowRemoteAddr = array($_SERVER['SERVER_ADDR'],'127.0.0.1'); # Allow anonymous sending from these addresses |
23 | | -$wgEmailArticleAllowAllUsers = false; # Whether to allow sending to all users (the "user" group) |
24 | | -$wgEmailArticleToolboxLink = 'Send to email'; # Link title for toolbox link (set to "" to not have any link in toolbox) |
25 | | -$wgEmailArticleActionLink = 'email'; # Link title for action link (set to "" to not have any action link) |
| 19 | +$wgEmailPageGroup = 'sysop'; # Users must belong to this group to send emails (empty string means anyone can send) |
| 20 | +$wgEmailPageContactsCat = ''; # This specifies the name of a category containing categories of contact pages |
| 21 | +$wgEmailPageCss = 'EmailPage.css'; # A minimal CSS page to embed in the email (eg. monobook/main.css without portlets, actions etc) |
| 22 | +$wgEmailPageAllowRemoteAddr = array($_SERVER['SERVER_ADDR'],'127.0.0.1'); # Allow anonymous sending from these addresses |
| 23 | +$wgEmailPageAllowAllUsers = false; # Whether to allow sending to all users (the "user" group) |
| 24 | +$wgEmailPageToolboxLink = 'Send to email'; # Link title for toolbox link (set to "" to not have any link in toolbox) |
| 25 | +$wgEmailPageActionLink = 'email'; # Link title for action link (set to "" to not have any action link) |
26 | 26 | $wgPhpMailerClass = dirname(__FILE__).'/phpMailer_v2.1.0beta2/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/ |
27 | 27 | |
28 | | -if ($wgEmailArticleGroup) $wgGroupPermissions['sysop'][$wgEmailArticleGroup] = true; |
| 28 | +if ($wgEmailPageGroup) $wgGroupPermissions['sysop'][$wgEmailPageGroup] = true; |
29 | 29 | |
30 | 30 | $dir = dirname(__FILE__) . '/'; |
31 | | -$wgAutoloadClasses['SpecialEmailArticle'] = $dir . 'EmailArticle_body.php'; |
32 | | -$wgExtensionMessagesFiles['EmailArticle'] = $dir . 'EmailArticle.i18n.php'; |
33 | | -$wgExtensionAliasesFiles['EmailArticle'] = $dir . 'EmailArticle.alias.php'; |
34 | | -$wgSpecialPages['EmailArticle'] = 'SpecialEmailArticle'; |
| 31 | +$wgAutoloadClasses['SpecialEmailPage'] = $dir . 'EmailPage_body.php'; |
| 32 | +$wgExtensionMessagesFiles['EmailPage'] = $dir . 'EmailPage.i18n.php'; |
| 33 | +$wgExtensionAliasesFiles['EmailPage'] = $dir . 'EmailPage.alias.php'; |
| 34 | +$wgSpecialPages['EmailPages'] = 'SpecialEmailPage'; |
35 | 35 | |
36 | 36 | $wgExtensionCredits['specialpage'][] = array( |
37 | | - 'name' => 'Special:EmailArticle', |
| 37 | + 'name' => 'Special:EmailPages', |
38 | 38 | 'author' => '[http://www.organicdesign.co.nz/nad User:Nad]', |
39 | | - 'description' => 'Send rendered HTML article to an email address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].', |
| 39 | + 'description' => 'Send rendered HTML page to an email address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].', |
40 | 40 | 'descriptionmsg' => 'ea-desc', |
41 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:EmailArticle', |
42 | | - 'version' => EMAILARTICLE_VERSION |
| 41 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:EmailPage', |
| 42 | + 'version' => EMAILPAGE_VERSION |
43 | 43 | ); |
44 | 44 | |
45 | 45 | # If form has been posted, include the phpmailer class |
46 | 46 | if (isset($_REQUEST['ea-send'])) require_once($wgPhpMailerClass); |
47 | 47 | |
48 | 48 | # Add toolbox and action links |
49 | | -if ($wgEmailArticleToolboxLink) { |
50 | | - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfEmailArticleToolboxLink'; |
| 49 | +if ($wgEmailPageToolboxLink) { |
| 50 | + $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink'; |
51 | 51 | } |
52 | 52 | |
53 | | -if ($wgEmailArticleActionLink) { |
54 | | - $wgHooks['SkinTemplateTabs'][] = 'wfEmailArticleActionLink'; |
| 53 | +if ($wgEmailPageActionLink) { |
| 54 | + $wgHooks['SkinTemplateTabs'][] = 'wfEmailPageActionLink'; |
55 | 55 | } |
56 | 56 | |
57 | | -function wfEmailArticleToolboxLink() { |
58 | | - global $wgEmailArticleToolboxLink,$wgTitle; |
| 57 | +function wfEmailPageToolboxLink() { |
| 58 | + global $wgEmailPageToolboxLink,$wgTitle; |
59 | 59 | if (is_object($wgTitle)) { |
60 | | - $url = Title::makeTitle(NS_SPECIAL,'EmailArticle')->getLocalURL('ea-title='.$wgTitle->getPrefixedText()); |
61 | | - echo("<li><a href=\"$url\">$wgEmailArticleToolboxLink</li>"); |
| 60 | + $url = Title::makeTitle(NS_SPECIAL,'EmailPages')->getLocalURL('ea-title='.$wgTitle->getPrefixedText()); |
| 61 | + echo("<li><a href=\"$url\">$wgEmailPageToolboxLink</li>"); |
62 | 62 | } |
63 | 63 | return true; |
64 | 64 | } |
65 | 65 | |
66 | | - |
67 | | -function wfEmailArticleActionLink(&$skin,&$actions) { |
68 | | - global $wgEmailArticleActionLink,$wgTitle; |
| 66 | +function wfEmailPageActionLink(&$skin,&$actions) { |
| 67 | + global $wgEmailPageActionLink,$wgTitle; |
69 | 68 | if (is_object($wgTitle)) { |
70 | | - $url = Title::makeTitle(NS_SPECIAL,'EmailArticle')->getLocalURL('ea-title='.$wgTitle->getPrefixedText()); |
71 | | - $actions['email'] = array('text' => $wgEmailArticleActionLink, 'class' => false, 'href' => $url); |
| 69 | + $url = Title::makeTitle(NS_SPECIAL,'EmailPage')->getLocalURL('ea-title='.$wgTitle->getPrefixedText()); |
| 70 | + $actions['email'] = array('text' => $wgEmailPageActionLink, 'class' => false, 'href' => $url); |
72 | 71 | } |
73 | 72 | return true; |
74 | 73 | } |