Demovox (dev readme)
WordPress plugin demovox is a tool to collect signatures for Swiss popular initiatives by offering the visitor a personalized signature sheet.
This Plugin was developed by the Socialist Party of Switzerland, it was initially built for the popular initiative Prämien-Entlastungs-Initiative in 2019. It has been used for numerous others since, like umverkehR (2020) and AHVx13 (2020) by SGB, to name a few.
- PHP >= 7.0 (feature "Hashid" requires >= 7.1.3)
- MySQL >= 5.6.5
- WordPress >= 4.9
- SSL certificate for HTTPS (non-https is only allowed for development)
- Optional feature requires the PHP modules "GMP" or "BC Math"
Simply install the WordPress plugin demovox from within the Plugin manager of your WordPress installation. You can find the admin manual or the prebuilt Zip-File for manual installation on demovox.ch.
Please send us a pull request for any improvements on the plugin.
- Use the webserver
docker-compose.yaml(for development purposes), which includes a WordPress webserver and mailhog for mail testing. Or use your own webserver (see below).
- Install required project packages and generate assets with grunt (see below)
- Activate the plugin through the 'Plugins' menu in local WordPress
- Place shortcodes [demovox_form] on a page or use the automatically generated page
- Optionally use and [demovox_count] to show the number of collected signatures and [demovox_optin] for opt-in edit form
- Configure the plugin in WordPress admin. Allow non-https access in the advanced settings of the plugin and disable "Redirect clients to secure HTTPS".
You can use your own webserver (see requirements above) and map the demovox directory to
While developing, you might want to work on a web server without SSL. Enable
wp-config.php and you probably want to disable
open the Advanced settings of the plugin in the WordPress backend and disable "Redirect clients to secure HTTPS".
docker/docker-compose.yaml. The plugin is monted in
Manual installation (instead of docker container)
If you don't want to use the docker container, install the following build dependencies:
node.js (use v8.10.0 as po2mo fails with higher versions), composer,
Install required NPM packages with
npm install grunt-cli sass -g
Install required project packages
Go to demovox directory (e.g.
npm install composer install --no-dev
Install required packages for tests:
composer install bin/install-wp-tests.sh <db-name> <db-user> <db-pass> [db-host]
Generate assets for development
Generate minified JS and CSS files and compile .mo translation files:
Build for wordpress.org repo
Build plugin snapshot in
demovox/buildWpOrg which can be uploaded to the WordPress.org repository:
Running the tests
There are just a few PHPUnit tests available yet, feel free to contribute some and send a pull-request to increase the test coverage.
Build plugin snapshot as ZIP in
demovox/demovox.zip, which can be uploaded to a remote WordPress installation:
Show all other available commands:
See README.txt and commit log.
This project is licensed under the GPLv3 License - see the LICENSE.txt file for details.