{"id":50,"date":"2016-02-01T14:45:43","date_gmt":"2016-02-01T14:45:43","guid":{"rendered":"http:\/\/cop21.developmentsites.net\/endecocide\/?p=50"},"modified":"2016-02-01T21:10:51","modified_gmt":"2016-02-01T21:10:51","slug":"webtask-add-newsletter-subscription-feature","status":"publish","type":"post","link":"https:\/\/www.endecocide.org\/de\/2016\/02\/01\/webtask-add-newsletter-subscription-feature\/","title":{"rendered":"(English) Webtask: add newsletter subscription feature"},"content":{"rendered":"<p class=\"qtranxs-available-languages-message qtranxs-available-languages-message-de\">Leider ist der Eintrag nur auf <a href=\"https:\/\/www.endecocide.org\/en\/wp-json\/wp\/v2\/posts\/50\" class=\"qtranxs-available-language-link qtranxs-available-language-link-en\" title=\"English\">English<\/a> verf\u00fcgbar.<\/p><p><\/p>\n<h2>User story<\/h2>\n<p>Visitors of our website should be able to register for receiving the newsletter. While submitting their email adress, they also should be able to choose in which language they want to receive the newsletter. The language selected to display the website\u00a0should be preselected.<\/p>\n<p>After registration the user should receive the newsletters with a link at the bottom that allows them to modify the language or unsubscribe from the newsletter totally.<\/p>\n<h2>Technicalities<\/h2>\n<h3>Database<\/h3>\n<p>Database table &#8222;newsletter&#8220; of database &#8222;stats&#8220;<\/p>\n<pre>mysql&gt; desc newsletter; \r\n+-----------+------------------+------+-----+----------------------------------+----------------+ \r\n| Field \u00a0\u00a0\u00a0\u00a0| Type \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| Null | Key | Default \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| Extra \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n+-----------+------------------+------+-----+----------------------------------+----------------+ \r\n| mail \u00a0\u00a0\u00a0\u00a0\u00a0| varchar(120) \u00a0\u00a0\u00a0\u00a0| YES \u00a0| \u00a0\u00a0\u00a0\u00a0| NULL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n| lang \u00a0\u00a0\u00a0\u00a0\u00a0| varchar(2) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| YES \u00a0| \u00a0\u00a0\u00a0\u00a0| NULL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n| signdate \u00a0| datetime \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| YES \u00a0| \u00a0\u00a0\u00a0\u00a0| NULL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n| useragent | varchar(256) \u00a0\u00a0\u00a0\u00a0| YES \u00a0| \u00a0\u00a0\u00a0\u00a0| NULL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n| id \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| int(10) unsigned | NO \u00a0\u00a0| PRI | NULL \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| auto_increment | \r\n| hash \u00a0\u00a0\u00a0\u00a0\u00a0| varchar(32) \u00a0\u00a0\u00a0\u00a0\u00a0| YES \u00a0| \u00a0\u00a0\u00a0\u00a0| abcdefghijklmnopqrstuvwxyz012345 | \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0| \r\n+-----------+------------------+------+-----+----------------------------------+----------------+<\/pre>\n<p>hash is a UNIQUE 32 character hash with all letters and digits.<\/p>\n<h3>User interface<\/h3>\n<p>Subscription to newsletter should be realize by clicking on a link and opening a popup window, asking for email address, providing a select box with all languages supported and a recaptcha input field. Submission of data is to be done using AJAX.<\/p>\n<p>Modifying user prefs can be done via plain html\/post requests to access the pref page the user must give its email address again (which is then compared to the hash used in the url of the newsletter)<\/p>\n<h2>Status<\/h2>\n<p>Assigned to\u00a0x-ray_3<\/p>","protected":false},"excerpt":{"rendered":"<p>Leider ist der Eintrag nur auf English verf\u00fcgbar. User story Visitors of our website should be able to register for receiving the newsletter. While submitting their email adress, they also should be able to choose in which language they want to receive the newsletter. The language selected to display the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webtasks"],"_links":{"self":[{"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":2,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":52,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/posts\/50\/revisions\/52"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/media\/5"}],"wp:attachment":[{"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.endecocide.org\/de\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}