Skip to content

A Joomla module to show random quotes from community zitat-service.de. Developed on the basis of automated Cypress tests and Docker containerisation.

License

Notifications You must be signed in to change notification settings

muhme/quote_joomla

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quote_joomla

Joomla module mod_zitat_service_de configuration screen shot

Joomla module mod_zitat_service_de to display random quotes from community zitat-service.de.

Help for the Joomla module administration is available in five languages at https://github.com/muhme/quote_joomla/wiki.

Tested Joomla/PHP versions are:

Joomla PHP
3.10 8.0
4.4 8.1
5.0 8.2

Test & Development Environment

There is a docker test and development environment prepared, including automated Cypress installation.

Docker Containers

As a prerequisite, git, docker and npm must be installed (under Microsoft Windows in WSL2). To create your test and development environment run:

git clone https://github.com/muhme/quote_joomla
cd quote_joomla
docker compose up -d

Six Docker containers are running:

docker ps
IMAGE                   PORTS                  NAMES
mysql                   3306/tcp, 33060/tcp    quote_joomla_mysql
phpmyadmin/phpmyadmin   0.0.0.0:2001->80/tcp   quote_joomla_mysqladmin
joomla:3                0.0.0.0:2003->80/tcp   quote_joomla_3
joomla:4                0.0.0.0:2004->80/tcp   quote_joomla_4
joomla:5.0              0.0.0.0:2005->80/tcp   quote_joomla_5
cypress/included        0.0.0.0:2080->80/tcp   quote_joomla_cypress

Available Ports are:

Cypress

Cypress is used for running Joomla installation and for the automated end-to-end tests. This is described in detail in subfolder test.

Scripts

There are scripts prepared for a more pleasant and also faster development, see folder scripts and commented list of scripts there.

Development

For development purposes, it is useful to synchronise the files from the host with the Joomla module inside the Docker container in order to test changes immediately. The current host folder is already mapped in the docker container as /quote_joomla for module installation. After installing the module, the mapped files can then be used directly with a symbolic link, e.g. for the Joomla 5 container:

docker exec -it quote_joomla_5 bash -e 'cd /var/www/html/modules && rm -r mod_zitat_service_de && ln -s /quote_joomla mod_zitat_service_de'

👉 The script scripts/exec.sh not only runs an interactive shell within the container, but also creates this symbolic link.

⚠️ Caution: If you uninstall the module in Joomla after symbolic linking the module folder you delete all source files in your host folder! 👉 Inside container, you have to delete symbolic link before.

API zitat-service.de

The Joomla module fetches all data from api.zitat-service.de. Terms of use and privacy statement can be found in the Imprint.

License

MIT License, Copyright (c) 2008 - 2023 Heiko Lübbe, see LICENSE

Contact

Don't hesitate to ask if you have any questions or comments. If you encounter any problems or have suggestions for enhancements, please feel free to open an issue.