Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
I can hardly imagine that I am the first to pose this question, but I can not find a topic on this, so here goes.
In Backlight2, using the default page and default album, any visitor of the webpage, looking at the full screen gallery, can just right-click on any image and copy it. In Wordpress there is the "No Right Click Images" plugin, which blocks this. Is there any solution for this in the non Wordpress environment of Backlight2?
Thanks,
WimR.
Last edited by wrietvel (2020-03-06 18:58:54)
Offline
this is not supported in Backlight, though you can use phplugins to implement it.
Here is some old CE 4 documentation on doing it : http://ce4.theturninggate.net/docs/doku … ntext_menu
Probably use the scripts hook instead for BL 2
And you would need to update the phplugins function syntax: http://backlight.theturninggate.net/doc … _phplugins
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Actually, for each of your albums you can put the following in your album copy settings main copy window to have no right click images on the page/album. I have this currently implemented on my site.
<script>
window.oncontextmenu = function () {
return false;
}
</script>
Offline
Actually, for each of your albums you can put the following in your album copy settings main copy window to have no right click images on the page/album. I have this currently implemented on my site.
<script>
window.oncontextmenu = function () {
return false;
}
</script>
Or use phplugins to automatically insert the code on each page:
function scripts() {
echo '<script> window.oncontextmenu = function () { return false; } </script> ';
return false;
}
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
That's good to know, Daniel.
If you had more than one script, Daniel, can you load them all into that one function? And then they will work for all pages?
Cheers
Chumby
Offline
Thanks all. Works fine.
Offline
That's good to know, Daniel.
If you had more than one script, Daniel, can you load them all into that one function? And then they will work for all pages?
Cheers
Chumby
Yes, just make sure you don’t use the scripts hook more than once
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Pages: 1