Announcement

#1 2021-04-06 20:11:58

cbiweb
Member
2021-04-04
46

How to add my own theft protection to Piwigo

Hello!

I'm new to Piwigo, and currently building a website for it.  It is not yet public.

I have some javascript that prevents right-clicking, dragging, and Ctrl+C, and I want to apply it to my Piwigo gallery.  Can someone advise where to place the script in the Piwigo files?

Thanks!

Offline

 

#2 2021-04-06 22:12:25

erAck
Only trying to help
2015-09-06
2023

Re: How to add my own theft protection to Piwigo

That approach is quite futile anyway. Anything displayed on the screen can be screenshot'ed and page source can be inspected, JavaScript deactivated and rewritten and images downloaded by their URIs


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-04-06 23:43:41

cbiweb
Member
2021-04-04
46

Re: How to add my own theft protection to Piwigo

Yes, but I'd still like to know how to do it.

Anyone?

Offline

 

#4 2021-04-07 02:02:22

erAck
Only trying to help
2015-09-06
2023

Re: How to add my own theft protection to Piwigo

You could try to load it in the page banner, which is displayed on top of every page, under Admin -> Configuration -> Options, tab General; like

Code:

<script type="text/javascript" src="/path/scriptfile.js"></script>

Don't know if that actually works, just an idea. Other simple HTML code works there (it's all in a <div id="theHeader"> element). The script path needs to be an absolute path, or otherwise you'd have to determine the proper relative path (../../) for nested albums.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2021-04-07 07:44:52

homdax
Member
Sweden
2015-02-02
294

Re: How to add my own theft protection to Piwigo

as erAck posts those attempts are rather futile to protect site and files. It is also known as Web scraping.

Sites can, with some limitations, even be copied offline with tools like HTTrack... https://www.httrack.com/ or https://websitedownloader.io/ and more at https://www.toolsbug.com/website-copier-online.php

Check how that works in order to prevent it. Not easy.

Last edited by homdax (2021-04-07 07:46:17)

Offline

 

#6 2021-04-07 11:16:22

Katryne
Member
2016-12-03
369

Re: How to add my own theft protection to Piwigo

Hello,
Best way to keep things secret is to not publish them on the web. There will always be a way to pick and copy them.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#7 2021-04-07 15:12:10

cbiweb
Member
2021-04-04
46

Re: How to add my own theft protection to Piwigo

I appreciate everyone's feedback on what I'm doing, but I'm well aware of all those things.

Regardless of your personal opinions on the subject, I would very much like to know how to do what I asked anyway.

Why, when someone asks for help, do so many people feel they need to reply with unhelpful comments???  Your idea of help isn't really help.

Offline

 

#8 2021-04-07 15:13:27

cbiweb
Member
2021-04-04
46

Re: How to add my own theft protection to Piwigo

erAck wrote:

You could try to load it in the page banner, which is displayed on top of every page, under Admin -> Configuration -> Options, tab General; like

Code:

<script type="text/javascript" src="/path/scriptfile.js"></script>

Don't know if that actually works, just an idea. Other simple HTML code works there (it's all in a <div id="theHeader"> element). The script path needs to be an absolute path, or otherwise you'd have to determine the proper relative path (../../) for nested albums.

Thanks.  I tried that but it didn't work - but only due to a brain fart, lol.  I will try again soon, and let you know either way. :)

Offline

 

#9 2021-04-07 16:30:28

homdax
Member
Sweden
2015-02-02
294

Re: How to add my own theft protection to Piwigo

cbiweb wrote:

I appreciate everyone's feedback on what I'm doing, but I'm well aware of all those things.

Regardless of your personal opinions on the subject, I would very much like to know how to do what I asked anyway.

Why, when someone asks for help, do so many people feel they need to reply with unhelpful comments???  Your idea of help isn't really help.

Because there is nothing practical to be done about protecting the content of a site that is exposed to the general Internet.

You asked about right-click and got an answer.

A search on Google for "prevent right-click on site" gave a BILLION results (seriously) and among the very top (after narrowing to last year):

https://neuronthemes.com/how-to-disable … ght-click/

but also:

"How to Copy Content from Right-Click Disabled Webpages?"

Last edited by homdax (2021-04-07 16:33:56)

Offline

 

#10 2021-04-07 17:06:29

cbiweb
Member
2021-04-04
46

Re: How to add my own theft protection to Piwigo

homdax wrote:

...You asked about right-click and got an answer...

I did not ask about right-click.  I clearly said I already have a script that prevents that and more.

My question is where in the files to put the script.

I don't care that anyone thinks it's futile, I care that I want to be helped.

I asked for help, not opinions.

So again, anyone who has trudged through this thread so far, if YOU know the actual answer, please share.
If you happen to read this far and don't know the answer, please move on.

Last edited by cbiweb (2021-04-07 17:10:26)

Offline

 

#11 2021-04-07 23:56:39

erAck
Only trying to help
2015-09-06
2023

Re: How to add my own theft protection to Piwigo

cbiweb wrote:

Why, when someone asks for help, do so many people feel they need to reply with unhelpful comments???

Probably because often enough people asking for such thing are not aware that it doesn't prevent anything but the dumbest approach even if it was correctly implemented.


Running Piwigo at https://erack.net/gallery/

Offline

 

#12 2021-04-08 00:42:48

Zentalquabula
Member
2014-05-10
217

Re: How to add my own theft protection to Piwigo

Offline

 

#13 2021-04-08 02:33:38

cbiweb
Member
2021-04-04
46

Re: How to add my own theft protection to Piwigo

Zentalquabula wrote:

https://piwigo.org/ext/extension_view.php?eid=582

Thank you, Zentalquabula!  That's super helpful and works perfectly!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact