Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

right click lock

Asked Modified Viewed 1,635 times
Z
zimi27
Z
zimi27 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
asked
Junior Member

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

3 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

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.
0 replies
Z
zimi27
Z
zimi27 10
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 8 threads in the forums
  • Started this discussions
answered
Junior Member

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,
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

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%.
0 replies

Category Forum

BB Codes - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet