PageRenderTime 43ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

/mailing-lists.php

http://github.com/php/web-php
PHP | 394 lines | 341 code | 37 blank | 16 comment | 22 complexity | b8922cd7be9df6f2156203ba71ea3ab8 MD5 | raw file
  1. <?php
  2. $_SERVER['BASE_PAGE'] = 'mailing-lists.php';
  3. include_once __DIR__ . '/include/prepend.inc';
  4. include_once __DIR__ . '/include/posttohost.inc';
  5. include_once __DIR__ . '/include/email-validation.inc';
  6. $SIDEBAR_DATA = '
  7. <h3>Would like to unsubscribe yourself?</h3>
  8. <p>
  9. If you have trouble getting off from any of our mailing lists, or
  10. would like to unsubscribe from a mailing list not listed here, we
  11. have more information for you on <a href="/unsub.php">the
  12. unsubscription page</a>.
  13. </p>
  14. <h3>Other PHP related mailing lists</h3>
  15. <p>
  16. Find the <a href="http://pear.php.net/support/lists.php">PEAR
  17. lists</a>, the <a href="http://pecl.php.net/support.php">PECL
  18. lists</a>, and the <a href="http://gtk.php.net/resources.php">PHP-GTK
  19. lists</a> on their own pages.
  20. </p>
  21. <a id="local"></a>
  22. <h3>Local Mailing Lists and Newsgroups</h3>
  23. <ul class="toc">
  24. <li><a href="http://groups.google.com/group/dk.edb.internet.webdesign.serverside.php/topics">Danish Newsgroup</a></li>
  25. <li><a href="http://groups.google.com/group/fr.comp.lang.php/topics">French Newsgroup</a></li>
  26. <li><a href="http://lists.phpbar.de/mailman/listinfo">German Mailing List</a></li>
  27. <li><a href="http://groups.google.com/group/de.comp.lang.php.misc/topics">German Newsgroup</a> (also other topics under de.comp.lang.php)</li>
  28. <li><a href="http://groups.yahoo.com/group/php_greek/">Greek Mailing List</a></li>
  29. <li><a href="http://weblabor.hu/levlistak">Hungarian Mailing List</a></li>
  30. <li><a href="http://www.domeus.it/circles/php">Italian Mailing List (at PHPItalia)</a></li>
  31. <li><a href="http://ml.php.gr.jp/">The Japanese PHP User Group\'s Mailing lists</a></li>
  32. <li><a href="http://br.groups.yahoo.com/group/php-pt/">Portuguese Mailing List</a></li>
  33. </ul>
  34. ';
  35. site_header("Mailing Lists", array("current" => "help"));
  36. // Some mailing list is selected for [un]subscription
  37. if (isset($_POST['action'])) {
  38. // No error found yet
  39. $error = "";
  40. // Check email address
  41. if (empty($_POST['email']) || $_POST['email'] == 'user@example.com' ||
  42. $_POST['email'] == 'fake@from.net' || !is_emailable_address($_POST['email'])) {
  43. $error = "You forgot to specify an email address to be added to the list, or specified an invalid address." .
  44. "<br>Please go back and try again.";
  45. }
  46. // Check if any mailing list was selected
  47. else if (empty($_POST['maillist'])) {
  48. $error = "You need to select at least one mailing list to subscribe to." .
  49. "<br>Please go back and try again.";
  50. }
  51. // Seems to be a valid email address
  52. else {
  53. // Decide on request mode, email address part and IP address
  54. $request = strtolower($_POST['action']);
  55. if ($request != "subscribe" && $request != "unsubscribe") {
  56. $request = "subscribe";
  57. }
  58. $remote_addr = i2c_realip();
  59. // Get in contact with main server to [un]subscribe the user
  60. $result = posttohost(
  61. "https://main.php.net/entry/subscribe.php",
  62. array(
  63. "request" => $request,
  64. "email" => $_POST['email'],
  65. "maillist" => $_POST['maillist'],
  66. "remoteip" => $remote_addr,
  67. "referer" => $MYSITE . "mailing-lists.php"
  68. )
  69. );
  70. // Provide error if unable to [un]subscribe
  71. if ($result) {
  72. $error = "We were unable to subscribe you due to some technical problems.<br>" .
  73. "Please try again later.";
  74. }
  75. }
  76. // Give error information or success report
  77. if (!empty($error)) {
  78. echo "<p class=\"formerror\">$error</p>";
  79. } else {
  80. ?>
  81. <p>
  82. A request has been entered into the mailing list processing queue. You
  83. should receive an email at <?php echo clean($_POST['email']); ?> shortly describing
  84. how to complete your request.
  85. </p>
  86. <?php
  87. }
  88. site_footer();
  89. exit;
  90. }
  91. // No form submitted
  92. ?>
  93. <h1>Mailing Lists</h1>
  94. <p>
  95. There are many PHP-related mailing lists available on our server.
  96. Most of them are archived, and all of them are available as newsgroups
  97. on our <a href="news://news.php.net">news server</a>. You can search
  98. some mailing lists right from this website from <a href="/search.php">the
  99. search page</a> or by using the search input box selecting the
  100. appropriate option on the top-right of every page.
  101. </p>
  102. <p>
  103. There is an experimental web interface for the news server at
  104. <a href="http://news.php.net/">http://news.php.net/</a>, and
  105. there are also other archives provided by
  106. <a href="http://marc.info/">Marc</a>.
  107. </p>
  108. <h2>Twitter</h2>
  109. <p>
  110. The PHP team maintains an official PHP.net account on twitter,
  111. <a href="https://twitter.com/official_php">@official_php</a>, for those
  112. interested in following news and other announcements from the PHP project.
  113. </p>
  114. <h2>Mailing List Posting guidelines</h2>
  115. <p>
  116. When posting to mailing lists or newsgroups, please keep the following in mind:
  117. </p>
  118. <ul>
  119. <li>
  120. Use a valid email address. Every new poster's email address
  121. is checked for validity through confirmation.
  122. </li>
  123. <li>
  124. Send plain ASCII messages, no HTML-formatted emails please.
  125. </li>
  126. <li>
  127. Turn on word wrapping so your entire message doesn't show up on
  128. a single line.
  129. </li>
  130. <li>
  131. Be sure to click <strong>Reply-All</strong> to reply to list. Clicking
  132. <strong>Reply</strong> will email the author of the message privately.
  133. </li>
  134. <li>
  135. No attachments please, just post a URL if you want someone to
  136. look at something.
  137. </li>
  138. <li>
  139. Don't GPG/PGP sign your messages. If you want people to be able
  140. to send you encrypted email, stick your key-locator in your signature
  141. </li>
  142. <li>
  143. Don't hijack other peoples' threads. To post on a new topic, start
  144. a new message, don't reply and just change the subject.
  145. </li>
  146. <li>
  147. Check the archives before posting a question, chances are it has
  148. already been asked and answered a few times.
  149. </li>
  150. <li>
  151. When asking a question, don't just tell us, &quot;it doesn't work&quot;.
  152. Tell us what you are trying to accomplish, a <strong>short</strong> code
  153. snippet showing how you tried to solve it, what you expected to get and
  154. what you got instead.
  155. </li>
  156. </ul>
  157. <p>
  158. And make sure you have read our
  159. <a href="https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md">Mailinglist Rules</a>.
  160. </p>
  161. <?php
  162. // array of lists (list, name, short desc., moderated, archive, digest, newsgroup)
  163. $general_mailing_lists = array(
  164. 'General mailing lists for PHP users',
  165. array (
  166. 'php-announce', 'Announcements',
  167. 'Announcements of new PHP releases are sent to this very low-volume list',
  168. TRUE, FALSE, FALSE, "php.announce"
  169. ),
  170. array (
  171. 'php-general', 'General user list',
  172. 'This is a high volume list for general PHP support; ask PHP questions here',
  173. FALSE, TRUE, TRUE, "php.general"
  174. ),
  175. array (
  176. 'php-windows', 'Windows PHP users list',
  177. 'Using PHP on Microsoft Windows',
  178. FALSE, TRUE, TRUE, "php.windows"
  179. ),
  180. 'Subject specific lists for PHP users',
  181. array (
  182. 'php-install', 'Installation issues and problems',
  183. 'How to install PHP with particular configurations and servers',
  184. FALSE, TRUE, TRUE, "php.install"
  185. ),
  186. array (
  187. 'php-db', 'Databases and PHP',
  188. 'This list is for the discussion of PHP database topics',
  189. FALSE, TRUE, TRUE, "php.db"
  190. ),
  191. array (
  192. 'php-i18n', 'Unicode and Internationalization',
  193. 'Unicode support, Internationalization (i18n) and localization (l10n) issues and features',
  194. FALSE, TRUE, TRUE, "php.i18n"
  195. ),
  196. array (
  197. 'php-evangelism', 'PHP evangelism mailing list',
  198. 'A list for people interested in promoting PHP and learning good reasons to support PHP in the enterprise',
  199. TRUE, TRUE, TRUE, "php.evangelism"
  200. ),
  201. array (
  202. 'soap', 'PHP SOAP list',
  203. 'List for the SOAP developers',
  204. FALSE, FALSE, FALSE, 'php.soap'
  205. ),
  206. 'Non-English language mailing lists',
  207. array (
  208. 'php-es', 'Spanish PHP Mailing list',
  209. 'List for Spanish speaking people interested in PHP',
  210. FALSE, FALSE, FALSE, 'php.general.es'
  211. ),
  212. );
  213. // array of lists (list, name, short desc., moderated, archive, digest, newsgroup)
  214. $internals_mailing_lists = array(
  215. 'PHP and Zend Engine internals lists',
  216. array (
  217. 'internals', 'Internals list',
  218. 'A medium volume list for those who want to help out with the development of PHP',
  219. FALSE, 'php-internals', TRUE, "php.internals"
  220. ),
  221. array (
  222. 'internals-win', 'Windows Internals list',
  223. 'A low volume list for those who want to help out with the development of PHP on Windows',
  224. FALSE, FALSE, TRUE, "php.internals.win"
  225. ),
  226. array (
  227. 'php-cvs', 'Git commit list',
  228. 'All commits to internals (php-src) and the Zend Engine are posted to this list automatically',
  229. TRUE, TRUE, FALSE, "php.cvs"
  230. ),
  231. array (
  232. 'git-pulls', 'Git pull requests',
  233. 'Pull requests from Github',
  234. FALSE, FALSE, FALSE, "php.git-pulls"
  235. ),
  236. array (
  237. 'php-qa', 'Quality Assurance list',
  238. 'List for the members of the PHP-QA Team',
  239. FALSE, TRUE, FALSE, "php.qa"
  240. ),
  241. array (
  242. 'php-bugs', 'General bugs',
  243. 'General bug activity are posted here',
  244. FALSE, FALSE, FALSE, "php.bugs"
  245. ),
  246. array (
  247. 'standards', 'PHP Standardization and interoperability list',
  248. 'Development of language standards',
  249. FALSE, FALSE, FALSE, "php.standards"
  250. ),
  251. 'PHP internal website mailing lists',
  252. array (
  253. 'php-webmaster', 'PHP php.net internal infrastructure discussion',
  254. 'List for discussing and maintaining the php.net web infrastructure.<br>
  255. For general PHP support questions, see "General Mailing Lists" or the <a href="/support.php">support page</a>',
  256. FALSE, FALSE, FALSE, "php.webmaster"
  257. ),
  258. 'PHP documentation mailing lists',
  259. array (
  260. 'phpdoc', 'Documentation discussion',
  261. 'List for discussing the PHP documentation',
  262. FALSE, TRUE, FALSE, "php.doc"
  263. ),
  264. array (
  265. 'doc-cvs', 'Documentation changes and commits',
  266. 'Changes to the documentation are posted here',
  267. TRUE, "php-doc-cvs", FALSE, "php.doc.cvs"
  268. ),
  269. array (
  270. 'doc-bugs', 'Documentation bugs',
  271. 'Documentation bug activity (translations, sources, and build system) are posted here',
  272. TRUE, 'php-doc-bugs', FALSE, "php.doc.bugs"
  273. ),
  274. );
  275. // Print out a table for a given list array
  276. function output_lists_table($mailing_lists)
  277. {
  278. echo '<table cellpadding="5" border="0" class="standard mailing-lists">', "\n";
  279. foreach ($mailing_lists as $listinfo) {
  280. if (!is_array($listinfo)) {
  281. echo "<tr><th>{$listinfo}</th><th>Moderated</th><th>Archive</th>" .
  282. "<th>Newsgroup</th><th>Normal</th><th>Digest</th></tr>\n";
  283. } else {
  284. echo '<tr align="center">';
  285. echo '<td align="left"><strong>' . $listinfo[1] . '</strong> <small>&lt;<a href="mailto:' . $listinfo[0] . '@lists.php.net">' . $listinfo[0] . '@lists.php.net</a>&gt;</small><br><small>'. $listinfo[2] . '</small></td>';
  286. echo '<td>' . ($listinfo[3] ? 'yes' : 'no') . '</td>';
  287. // Let the list name defined with a string, if the
  288. // list is archived under a different name then php.net
  289. // uses for it (for backward compatibilty for example)
  290. if ($listinfo[4] !== FALSE) {
  291. $larchive = ($listinfo[4] === TRUE ? $listinfo[0] : $listinfo[4]);
  292. } else { $larchive = FALSE; }
  293. echo '<td>' . ($larchive ? "<a href=\"http://marc.info/?l={$larchive}\">yes</a>" : 'n/a') . '</td>';
  294. echo '<td>' . ($listinfo[6] ? "<a href=\"news://news.php.net/{$listinfo[6]}\">yes</a> <a href=\"http://news.php.net/group.php?group={$listinfo[6]}\">http</a>" : 'n/a') . '</td>';
  295. echo '<td><input name="maillist" type="radio" value="' . $listinfo[0] . '"></td>';
  296. echo '<td>' . ($listinfo[5] ? '<input name="maillist" type="radio" value="' . $listinfo[0] . '-digest">' : 'n/a' ) . '</td>';
  297. echo "</tr>\n";
  298. }
  299. }
  300. echo "</table>\n";
  301. }
  302. ?>
  303. <form method="post" action="/mailing-lists.php">
  304. <h2 id="general">General Mailing Lists</h2>
  305. <?php output_lists_table($general_mailing_lists); ?>
  306. <h2 id="internals">Internals Mailing Lists</h2>
  307. <?php output_lists_table($internals_mailing_lists); ?>
  308. <p class="center">
  309. <strong>Email:</strong>
  310. <input type="text" name="email" size="40" value="user@example.com">
  311. <input type="submit" name="action" value="Subscribe">
  312. <input type="submit" name="action" value="Unsubscribe">
  313. </p>
  314. </form>
  315. <p>
  316. You will be sent a confirmation mail at the address you wish to
  317. be subscribed or unsubscribed, and only added to the list after
  318. following the directions in that mail.
  319. </p>
  320. <p>
  321. <strong>Warning:</strong> The PHP users mailing list gets close to 1500-2000
  322. messages per month currently. Do the math. That translates to about 60
  323. messages per day. If your mailbox can't handle this sort of traffic you
  324. might want to consider subscribing to the digest list instead (two messages
  325. per day), using the news server, or reading the mailing list using the
  326. archives.
  327. </p>
  328. <h2>Subscribe via Email</h2>
  329. <p>
  330. If you experience trouble subscribing via the form above, you may also
  331. subscribe by sending an email to the list server.
  332. To subscribe to any mailing list, send an email to
  333. <code><em>listname</em>-subscribe@lists.php.net</code>
  334. (substituting the name of the list for <code><em>listname</em></code>
  335. &mdash; for example, <code>php-general-subscribe@lists.php.net</code>).
  336. </p>
  337. <h2>Mailing list options</h2>
  338. <p>
  339. All of the mailing lists hosted at <a
  340. href="http://lists.php.net/">lists.php.net</a> are managed using the <a
  341. href="http://untroubled.org/ezmlm/">ezmlm-idx</a> mailing list software.
  342. There are a variety of commands you can use to modify your subscription.
  343. Either send a message to <code>php-whatever-help@lists.php.net</code> (as in,
  344. <code>php-general-help@lists.php.net</code>) or you can view the commands for
  345. ezmlm <a href="http://untroubled.org/ezmlm/ezman/ezman1.html">here.</a>
  346. </p>
  347. <?php site_footer(); ?>