Difference between revisions of "Watermark"

From TNG_Wiki
Jump to navigation Jump to search
Line 253: Line 253:
 
| [[User:NLapierre|Normand Lapierre]]
 
| [[User:NLapierre|Normand Lapierre]]
 
| Private
 
| Private
| v12.2.0.1a
+
| v12.2.0.1f
 
| v12.3.0
 
| v12.3.0
 
| FR/EN
 
| FR/EN

Revision as of 12:04, 1 February 2021

Restricted Downloads of Watermark are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted
Caution If you have trouble downloading with Google Chrome, Vivaldi, Brave or other Chromium based browser, try using a right-click and select Open in new Window, then F5, or use another browser such as Firefox


Caution



Ambox notice.png The latest version of this mod uses the guidelines for TNG v12+ cust_text.php files. If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]

TNG 14.0
TNG 13.0
TNG 12.0



Watermark
Summary Shows a watermarked image instead the original image.
Validation
Mod Updated 30 jan 2021
Download link v12.2.0.1f
TNG 12.0
TNG 13.0
Download stats Montrer les statistiques
Author(s) Michel Kirsch
Homepage Racines luxo-hennuyeres
Mod Support TNG Community Forums
Contact Developer MyMail
Latest Mod v12.2.0.1f for TNG v12 & 13
Min TNG V n.c
Max TNG V v12+
Files modified
admin_users.php
albumlib.php
browsemedia.php
functions.php
genlib.php
globallib.php
headstones.php
img_viewer.php
languages/English-UTF8/cust_text.php
languages/English/cust_text.php
languages/French-UTF8/cust_text.php
languages/French/cust_text.php
mostwanted.php
personlib.php
randomphoto.php
showalbum.php
showmap.php
showmedialib.php
templates/template10/index.php
Related Mods
Notes



Prior to install the version 12.2.0.1f, you must manually delete, rename or complete your extensions/watermark_mod_vars.php file

Purpose of the Mod

This Mod watermarks your images on the fly and hides their names to prevent image theft. Your original images are not altered.
The watermark is customizable: text, color, tilt, transparency, repetition and font.
[Optional] : Your users can request an unwatermarked copy of the media they are viewing

You can designate some of your users (via Administration/Users) so they can view the media without watermark


Thanks to

Ron, Philippe, Jean-Louis, Pascal and Alain Evrard for their tests, ideas and comments to realize this first version !
DeepL.com for some translations...

Mod Developer

Written by : Michel Kirsch from Charleroi - Hainaut - Belgium

Requirements

A TNG V12.2.0 installation in working order.
Users of the Mod Add cousins button will update their version with the version 1b to standardize the appearance of the table of users.


IMPORTANT : Before installing

- Before installing, it is judicious to make a backup copy of the files that will be modified by this mod.

TNG Modules Impacted

You can click on the [Expand] link on the right to display the list of TNG Modules change and the [Collapse] link to hide this section again.

The following TNG Modules are modified, and should be backed up prior to installing this mod:

admin_users.php
albumlib.php
browsemedia.php
functions.php
genlib.php
globallib.php
headstones.php
img_viewer.php
languages/English-UTF8/cust_text.php
languages/English/cust_text.php
languages/French-UTF8/cust_text.php
languages/French/cust_text.php
mostwanted.php
personlib.php
randomphoto.php
showalbum.php
showmap.php
showmedialib.php
templates/template10/index.php

Files created/copied by this Mod

Source Destination
watermark_1/watermark_no.gif TNG root/img/watermark_no.gif
watermark_1/watermark_yes.gif TNG root/img/watermark_yes.gif
watermark_1/watermodfont.ttf TNG root/font/watermodfont.ttf
(protected)watermark_1/watermark_mod_allowedusers.txt TNG root/$extspath/watermark_mod_allowedusers.txt
(protected)watermark_1/watermark_mod_vars.php TNG root/$extspath/watermark_mod_vars.php


INSTALLATION

  • Unzip the received file directly in the "mods" subdirectory of your TNG installation.
  • Via Mod Manager, install the Mod.

Upgrade

  • Uninstall and eventually Delete the current Mod.
  • Proceed as for an installation with the new Mod.
  • Your files watermark_mod_vars.php and watermark_mod_allowedusers.txt are copy protected and will not crushed by the new installation.
  • VERSION 12.2.0.1f : You MUST manually delete, rename or complete your TNGRoot/extensions/watermark_mod_vars.php before installing this version !!

Known Problems

This Mod is NOT compatible with the Admin_Users_Menu Mod. Contact me for a solution.
With some too large files, you may receive a message "Fatal error: Allowed memory size of ...". Refresh your browser (F5). If the probllem persists, you can then reduce the number of results during queries ( via the menu Administration/Setup/General Settings/Miscellaneous/Max Search Results:). Try to reduce this number...


In the event of a problem

  • Try using the Mod Manager Remove capability
  • Copy the backup of the affected files back to your TNG directory
  • Retry. If the problem persists, open an issue in the TNG Community Forums or on the page of Michel Kirsch. At worst, send a mail to MyMail

Parameters

Text: You can use 2 lines for the watermark. These two lines are separated in the Text parameter by " -x- " (space dash x space dash)

In addition to the common options text, color, transparency, font, owner and proportionality,

If you use the option Angle = "45"
version 1f: A new option allows you to display two lines of watermarks diagonally. The result is NOT guaranteed!
You can determine whether the watermark will be repeated 2 or 3 times on the image.Only the first line of text appears.
If you use the option Angle = "0"
You can use the vpos option to "top" or "bottom". The Repeat option must be imperatively set to "1".
These are the only cases where both lines of the watermark appear.
Repeat on "2" or "3" deletes the second line.
version 1f : you can suppress the possibility of ordering the media without a watermark.

Historic of modifications

Version Release Date Contents
V12.2.0.1f 30 jan 2021 Adds 2 new parameters : Display 2 lines of watermark diagonally and Show or not the "command without watermark" line. Modify some calculations
V12.2.0.1e 11 jan 2021 Internal modifications to avoid Mods conflicts, warnings and notices. Secure the allowed users list
V12.2.0.1c 28 jul 2020 New option to NOT watermark the pictures from one or more folders. Your file RootTNG/extensions/watermark_mod_vars.php is protected against overwriting. You MUST delete or rename it manually before installing this version !
V12.2.0.1b 10 Jun 2020 Doesn't try to watermark if file's MIME type is not 'image'.
V12.2.0.1a 06 apr 2020 Fix problems with the mysqli_fetch_all() function, replaced with mysqli_fetch_array()
V12.2.0.1 04 mar 2020 First online version.

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:
If you have any problem to do it, send me a mail...

URL User Note Mod-Version TNG-Version User-language
Racines luxo-hennuyeres Michel Kirsch Developper of the Mod V12.2.0.1e V13.0.2 FR/EN/NL/D/SP
A Line of Malkins in NZ Rick Malkin Private (Living) / Public V12.2.0.1e V13.0.2 English
Racine d'Alsace J-Louis Valory Private 12.2.0.1f 13.02 FR
Famille Potié et ses Maisons Alliées Stillman V12.2.0.1 FR
Généalogie des familles Meresse et Facon Philippe Meresse V12.2.0.1 12.2 AN/FR/NL
Drzewo rodziny Góźdź & Lisiak: genealogia Slawekg V12.2.0.1a 12.2 EN
Site Jgrantham V12.2.0.1
Home Page Dominiccovell V12.2.0.1a 12.2 EN
Backus Family History Dbackus2 V12.2.0.1 12.2 EN
Startpagina Abram V12.2.0.1a 12.2 EN
Crawford County, Pennsylvania Genealogy Gateway Fraber V12.2.0.1a 12.2 EN
Auf den Spuren meiner Vorfahren Uwe Haase Public/Private V12.2.0.1 V12.3 DE,EN
Généalogie des Malvache, Hermary... Cédric Malvache v12.2.0.1a v12.3.0 FR/EN/SP
Les Lapierre d'Amérique Normand Lapierre Private v12.2.0.1f v12.3.0 FR/EN
Botebygden - Local Community Research Erik Hoppe Public v12.2.0.1c v12.3.0 SE
Familenforschung Kattau Uwe Kattau Public v12.2.0.1c v13.0.2 DE
Kentucky Kindred kentuckykindred Public v12.2.0.1c v13.0.2 EN

Visualization

Watermark Examples

This image shows different styles of watermarks. From L to R:
(1) Angle 45 - Repeat 1 - Transparency 80 - (2) Angle 45 - Repeat 2 - Transparency 20 - (3) Angle 0 - vpos bottom - Repeat 1 - 2 lines - Proportioned
(4) Idem - vpos top - NOT proportioned - (5) Angle 0 - Repeat 3 - Proportioned

watermark_showmedia

The bottom of showmedia.php page. Remark the filename unrelevant, the owner field and the possibility for user to command a not watermarked image. (version 1 f : these possibility can be disabled)

watermark_users

The user table with the new column Wmk?. A green icon means that this user will view the photos WITHOUT watermark.