This is a plugin for Question2Answer that sends out an html newsletter of the latest top questions, answers and comments.
- fully customizable HTML template via admin/plugins
- options for sorting and inclusion
- option for static or on-the-fly creation (static requires PHP to write to file)
- option to create PDF file - requires wkhtmltopdf (see below)
- Install Question2Answer
- Get the source code for this plugin from github, either using git, or downloading directly:
- To download using git, install git and then type
git clone git://github.com/NoahY/q2a-newsletter.git book
at the command prompt (on Linux, Windows is a bit different) - To download directly, go to the project page and click Download
- To download using git, install git and then type
- navigate to your site, go to Admin -> Plugins on your q2a install, go to the "Newsletter" panel, select options, click "Save".
- If you want the newsletter to actually send out, you will need to set up a cron job to access the page (e.g. via wget). The cron url is in the admin/plugins section.
To output static files you need to find a location that is writeable by PHP. The default is to write to the plugin dir itself, which is probably not writeable. On Linux, something like this works:
touch newsletter.html newsletter.pdf chmod 666 newsletter.html newsletter.pdf
To use the PDF export, you need to put the binary of wkhtmltopdf, available here:
http://code.google.com/p/wkhtmltopdf/downloads/list
in the same directory as these plugin files. It works for Linux 64-bit, no guarantees apart from that.
This is beta code. It is probably okay for production environments, but may not work exactly as expected. Refunds will not be given. If it breaks, you get to keep both parts.
All code herein is Copylefted.
Question2Answer is a free and open source platform for Q&A sites. For more information, visit: