This webtrees custom module changes the default position of the webtrees watermark image.
This Readme contains the following main sections
This custom module changes the default position of the watermark image. This can be altered to you needs with simple edits to the MyImageFactory code. webtrees 2.2 has improved the way images and watermarks are scaled. Watermarks now scale to fit the image size. The position can be set to top, center or bottom. To position watermarks left or right use white space in the watermark image to pad the text or symbol left or right. This module was created with the generous input from Greg Roach fisharebest.
This module requires webtrees version 2.2 or later. This module has the same requirements as webtrees#system-requirements.
This module was tested with webtrees 2.2.1 version and most available themes.
This section documents installation instructions for this module.
- Download the latest release.
- Unzip the package into your
webtrees/modules_v4
directory of your web server. - Rename the folder to
watermark-module
. It's safe to overwrite the respective directory if it already exists. - Login to webtrees as administrator, go to Control Panel/Modules/
and find the module
Watermark Module
. Check if it has a tick for "Enabled". - Finally, click SAVE, to complete the configuration.
The default instalation contains default webtrees watermark image, some sample images and a Photshop PSD template image as a basis for your own personalization. Simply modify and saveas with the file name 'watermark.png' of type .png The position of the watermark can be changed with simple modifications to code in the 'webtrees/modules_v4/watermark-module/MyWatermarkFactory.php' On line 47 'return $image->place(element: $watermark, position: 'bottom');' change the position with key words: 'center' or 'top' or, 'bottom'
The final watermarked images are single combined images and are stores in the webtrees data/cache. After installing or updating the module or code, images can take some time to be used instead of those previously cached. This can be sped up by clearing the data/cache. Go to: Control panel/Clean up data folder/cache and click the bin icon. Some images may also be stored for a time in the Browswer cache and this may also need to be cleared if required.
To update simply replace the watermark-module
files with the new ones from the latest release.
Issues: you can report errors raising an issue in this GitHub repository.
Forum: general webtrees support can be found at the webtrees forum
- Copyright © 2024 Murray J Peterson
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.