Thread subject: Official Home of the PHPFusion CMS :: right click lock

Posted by zimi27 on 25-02-2022 20:48
#1

In which file should I set the right-click lock?
Code
<body bgcolor='$body_bg' text='$body_text' >'return false'>n";

Posted by RobiNN on 25-02-2022 21:15
#2

Code you provided does nothing. You need javascript code that will do this. And you can do it in theme.php.

Btw this is silly idea, because user can disable javascript and copy text anyway. Also he can use view-source code (via right click or keyboard shortcut). Smarter users can even download page and then copy.. There are many ways how to bypass it. So you have 0 ways to block right-click or text copying that works 100%.

So don't do it. It's a waste of time and annoying to users.

Edited by RobiNN on 11-07-2026 08:53

Posted by zimi27 on 25-02-2022 22:00
#3

In PF7 I gave the code in
themes -> templates -> header.php
And it worked, now this file is different.
I know there is a way around it, but not everyone can do it or want to.
Some kid won't copy the article if someone else blocks the ad.

I don't know why the code got lost, that's how it is:
echo "<body bgcolor='$body_bg' text='$body_text' Xoncontextmenu='return false'>n";

del X wink

Edited by zimi27 on 25-02-2022 22:01

Posted by RobiNN on 25-02-2022 22:06
#4

This is the worst way.. With this you can still select text and copy with ctrl c. You blocking only right click but not text selecting.

Effectiveness 0%.

Edited by RobiNN on 11-07-2026 08:53