Web based family history software

Question Watermarks

  • fa10175
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 8 months ago #1 by fa10175
Watermarks was created by fa10175
Currently, it is possible to remove the watermarks for visitors, for members, for managers or have them for everybody.
Of him by now, I'm the manager of my site (for changes) I would like to give the right "editor" or "moderator" to some people and thereby remove them watermarks, it is not possible . They must to be "Managers", I will not.

Could we have this development in the future?

Thank you.

- Nginx 1.22.1
- PHP 8.2.7
- MariaDB 10.11.6
- Webtrees 2.1.19
- Raspberry Pi 5
Modules : jc-fancy-imagebar, jc-fancy-treeview, vesta, faces, fan-chart, pedigree-chart, descendants-chart, hh_extended_family

Please Log in or Create an account to join the conversation.

  • fa10175
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #2 by fa10175
Replied by fa10175 on topic Watermarks
I ask again my question:

I would like members or guests to see the documents with the watermarks and that the "editor" or "moderator" or "manager" see them without the watermarks.

This is not possible today in webtrees.

What should I change and how?

Thanks

- Nginx 1.22.1
- PHP 8.2.7
- MariaDB 10.11.6
- Webtrees 2.1.19
- Raspberry Pi 5
Modules : jc-fancy-imagebar, jc-fancy-treeview, vesta, faces, fan-chart, pedigree-chart, descendants-chart, hh_extended_family

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
7 years 1 month ago - 7 years 1 month ago #3 by bertkoor
Replied by bertkoor on topic Watermarks

fa10175 wrote: I would like members or guests to see the documents with the watermarks and that the "editor" or "moderator" or "manager" see them without the watermarks.

This is not possible today in webtrees.

What should I change and how?


Control Panel - Manage family trees - Watermarks.
Item "Images without watermarks" has the option "Show to Managers".

That isn't what you want? Is it just the Editors you're missing?

stamboom.BertKoor.nl runs on webtrees v1.7.13
Last edit: 7 years 1 month ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 1 month ago #4 by fisharebest
Replied by fisharebest on topic Watermarks
> This is not possible today in webtrees.

No. Watermarks are set for access levels.

The access levels are: visitor/member/manager. They control what data you can see.

The roles editor/moderator can see the *same* data as a member. (They have the extra ability to edit it.)

> What should I change and how?

How good is your PHP? Search for all occurrences of 'SHOW_NO_WATERMARK' and modify the surrounding code...

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 1 month ago #5 by fisharebest
Replied by fisharebest on topic Watermarks
> That isn't what you want??

No. I think he wants watermarks for members, but not for editors.

These both have the same access level, so will have the same watermarks.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • fa10175
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #6 by fa10175
Replied by fa10175 on topic Watermarks
Here are my needs:

Access to my tree is forbidden to visitors, you must be a member to access it (login + password)
The members can see everything, but I do not want when they look at documents that they can make copies (without my consent), and that's where the watermarks come in
By cons I trust some people giving them the ability to edit data, so they are editors and therefore to reward them I would like the documents to be without watermarks.

I have the solution to put them managers but then I can no longer control the changes (validate, refuse, modify).

I could see that there were only 4 levels
PRIV_PRIVATE => I18N :: translate ('Show to visitors'),
PRIV_USER => I18N :: translate ('Show to members'),
PRIV_NONE => I18N :: translate ('Show to managers'),
PRIV_HIDE => I18N :: translate ('Hide from everyone')

PRIV_PRIVATE = 2; // Allows visitors to view the item
PRIV_USER = 1; // Allows members to access the item
PRIV_NONE = 0; // Allows managers to access the item

And so I should give privilege PRIV_NONE to editor and Moderators only for the "watermarks"

- Nginx 1.22.1
- PHP 8.2.7
- MariaDB 10.11.6
- Webtrees 2.1.19
- Raspberry Pi 5
Modules : jc-fancy-imagebar, jc-fancy-treeview, vesta, faces, fan-chart, pedigree-chart, descendants-chart, hh_extended_family

Please Log in or Create an account to join the conversation.

  • fa10175
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 1 month ago #7 by fa10175
Replied by fa10175 on topic Watermarks
To do what I wanted, I made a change in mediafirewall.php
At line 304 I replaced
if (Auth::accessLevel($WT_TREE) > $WT_TREE->getPreference('SHOW_NO_WATERMARK')) {
by
if ((Auth::accessLevel($WT_TREE) > $WT_TREE->getPreference('SHOW_NO_WATERMARK'))&&(!(Auth::isEditor($WT_TREE)||Auth::isModerator($WT_TREE)))) {

thank you for the information

- Nginx 1.22.1
- PHP 8.2.7
- MariaDB 10.11.6
- Webtrees 2.1.19
- Raspberry Pi 5
Modules : jc-fancy-imagebar, jc-fancy-treeview, vesta, faces, fan-chart, pedigree-chart, descendants-chart, hh_extended_family

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}