Contributors: wielebenwirteam, m0rb, flegfleg, chriwen
Donate link: https://www.wielebenwir.de/verein/unterstutzen
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
CommonsBooking is a plugin for the management and booking of common goods. This plugin provides associations, groups, and individuals with the ability to share items (such as cargo bikes and tools) among users. It is based on the concept of Commons, where resources are shared for the benefit of the community.
- WordPress Plugin Page
- View Changelog
- Official Website
- For users read the documentation or get Support
- For developers use the Bug-Tracker
- Navigate to the 'Add New' in the plugins dashboard
- Search for 'commonsbooking'
- Click 'Install Now'
- Activate the plugin in the plugins dashboard
- Navigate to the 'Add New' in the plugins dashboard
- Navigate to the 'Upload' area
- Select
commonsbooking.zip
from your computer - Click 'Install Now'
- Activate the plugin in the plugins dashboard
- Download
commonsbooking.zip
- Extract the
commonsbooking
directory to your computer - Upload the
commonsbooking
directory to the/wp-content/plugins/
directory - Activate the plugin in the plugins dashboard
- Make sure that composer is installed on your system
- Navigate into your wp-content/plugins directory
- Open a terminal and run
git clone https://github.com/wielebenwir/commonsbooking
- cd into the directory commonsbooking and run
composer install
This might fail, if you don't have the PHP extension uopz installed. Try running
composer install --no-dev
if you just quickly want to test a specific branch without installing the extension.
- Activate the plugin in the plugins dashboard
Either through translating WordPress into your native tongue (see the already existing WordPress Plugin Translations) or through developing and testing new versions of the application.
First, we have to install the necessary dependencies and packages, we can do this by using the
npm run start
command.
The most easy way to start hacking WordPress plugins in general (if you have no other development environment set up) is using wp-env. Install it and it's dependencies (mainly Docker) and run this to start the enviroment:
npm run env:start
The provided .wp-env.json
should be sufficient for normal development, for details see the documentation of wp-env config. You can create a .wp-env.override.json
for a custom configuration you don't want to check in.
For testing, you can activate the kasimir theme via wp cli inside the wp-env docker container:
npm run env run cli wp theme activate kasimir-theme
To test the code you first run the preparation scripts to load the wordpress core and configure database connection via wp-config.php
. The following line can vary on your system, use the appropriate credentials, databse port and version of wordpress. The appropriate database port is printed out by npm run env:start
:
bash bin/install-wp-tests.sh wordpress root password 127.0.0.1:49153 latest
Testing the plugin code via phpunit
. At the moment it works only with a manually downloaded phar. We are using PHPUnit 9 and PHP7.4 for the automated tests. The tests might fail if you are using a different version.
php ~/phpunit.phar --bootstrap tests/php/bootstrap.php
E2E (end to end) tests are written in cypress. To run them you need to install cypress and start the wordpress environment:
npm run env:start
Now, install the test data needed for the tests:
npm run cypress:setup
Then you can run the tests:
npm run cypress:run
Or open Cypress using
npm run cypress:open
Currently, we only manage German and English translations as po files in the repository, so they are available at build time. See the WordPress plugin translation page for other languages available at runtime.
Create a new .pot file using the
wp i18n make-pot . languages/commonsbooking.pot
command in the plugin directory. Make sure that all of your strings use the __
function with the domain commonsbooking
. Then you can use poedit
to open the commonsbooking-de_DE.po
and update the strings from the pot
file.
To create the plugin zip file for uploading to a development server:
bin/build-zip.sh