Product Description: Maileon WordPress Module

This chapter provides a description of the XQueue WordPress extension and its functions. The plugin provides a subscription page for a newsletter account in Maileon as template.

Implementing the Module

Installation

The module consists of a plugin and a template (newsletter.php). The plugin needs to be copied to the WordPress plugin directory (Target: \wp-content\plugins\xqueue). The template needs to be  copied to the directory of the currently used template, e.g.  \wp-content\themes\twentyfourteen. Please note: to enable logging of information such as subscription or, as the case may be, errors, the plugin directory needs to contain a directory named „log“ where the plugin can write to: \wp-content\plugins\xqueue\log.

Configuration

When the installation has been successfully completed you need to enter your data into the plugin. The API URL (API_URL), the API key (API_KEY) and the ID of a DOI mailing (DOIMAILINGKEY) – in case you don’t want to use the default DOI mailing – can be specified in the file \wp-content\plugins\xqueue\xqueue.config. The preset default server is https://api.maileon.com/1.0 . The new plugin „XQueue – Maileon“ can now be found in the WordPress administration area. Please activate it now. Settings for Maileon Now please create a new page and select the template „XQueue Newsletter“. The following picture shows an example where a page named „Newsletteranmeldung“ (= newsletter subscription) has been generated. The menu item for the page should now be visible as menu item on the top level. Setting up the Template

Setting up the Form Pages

Subscription Form

Now you can call the menu item and thus the standard subscription form. Please note: if this calls an empty page please verify that the plugin has been activated! Standard Subscription Field The HTML Code for the subscription form is specified in the file \wp-content\plugins\xqueue\templates\registration_form.tpl, styling can be specified in the file \wp-content\plugins\xqueue\templates\registration_css.tpl. Please note: In case you want to add new values, these need to be added in the file  \wp-content\plugins\xqueue\xqueue.php in the method xqueue_nl_form_processing() . The file also contains examples.

OK Page

When the call to the Maileon API was successful an OK page will be displayed. You can specify this page at \wp-content\plugins\xqueue\templates\registration_ok.tpl . If you wish to forward the subscribers to another page you can modify the necessary PHP code in the file \wp-content\plugins\xqueue\xqueue.php . For this, just replace the content of the method „show_newsletter_registration_ok“ by, for instance: header(‚Location: http://???.de/subscribe-success‘);
An entry for the registration can be found in the file \wp-content\plugins\xqueue\log\xqueue.log .
The last entry in the line represents the HTTP status code the API has returned. Any value in the range 200 – 299 is considered „successful“.
OK Page

Error Page

When the call to the Maileon API was not successful an error page will be displayed. You can specify this page at \wp-content\plugins\xqueue\xqueue.php . For this, please replace the content of the method „show_newsletter_registration_ failed()“ by, for instance: header(‚Location: http://???.de/subscribe-failure‘); The file \wp-content\plugins\xqueue\log\xqueue.log will then contain an entry for the failed registration, as well as an error description.   Error Page    
]]>

English EN Deutsch DE