You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 362 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How to disable right mouse click? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
jbsarma
Corporal
Corporal


Joined: Feb 16, 2003
Posts: 59

Location: UK

PostPosted: Sun Apr 18, 2004 3:37 am Reply with quoteBack to top

Would anybody tell me How to disable right mouse click so as to prevent people copying text and saving images from a PHPNuke site. I serached the forum but could find anything.
Find all posts by jbsarmaView user's profileSend private messageVisit poster's website
serkan61
Nuke Cadet
Nuke Cadet


Joined: Apr 09, 2003
Posts: 2


PostPosted: Sun Apr 18, 2004 3:55 am Reply with quoteBack to top

Code:
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">


Laughing Laughing Laughing
Find all posts by serkan61View user's profileSend private message
jbsarma
Corporal
Corporal


Joined: Feb 16, 2003
Posts: 59

Location: UK

PostPosted: Sun Apr 18, 2004 6:12 am Reply with quoteBack to top

Thanks. Presumably, I have to put this code in every story or there is place where the code will be applicable to the whole site.
Find all posts by jbsarmaView user's profileSend private messageVisit poster's website
dezina
Support Mod
Support Mod


Joined: Jun 09, 2003
Posts: 1713

Location: England

PostPosted: Sun Apr 18, 2004 9:20 am Reply with quoteBack to top

Quote:
Thanks. Presumably, I have to put this code in every story or there is place where the code will be applicable to the whole site.

No. You alter the file /includes/my_header.php so it becomes as below
Code:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

/*
   This file is to customize whatever stuff you need to include in your site
   when the header loads. This can be used for third party banners, custom
   javascript, popup windows, etc. With this file you don't need to edit
   system code each time you upgrade to a new version. Just remember, in case
   you add code here to not overwrite this file when updating!
   Whatever you put here will be between <head> and </head> tags.
*/

?>
<script language=JavaScript>
 <!--

 //Disable right click script III- By Renigade (renigade@mediaone.net)
 //For full source code, visit http://www.dynamicdrive.com

 var message="";
 ///////////////////////////////////
 function clickIE() {if (document.all) {(message);return false;}}
 function clickNS(e) {if
 (document.layers||(document.getElementById&&!document.all)) {
 if (e.which==2||e.which==3) {(message);return false;}}}
 if (document.layers)
 {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
 else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

 document.oncontextmenu=new Function("return false")
 // -->
</script>

BACK UP my_header.php file BEFORE you alter Wink

_________________
Image
Backup files BEFORE altering
Use PHPNuke 7.6 with patches!!
No private messages please, POST in forums.
Find all posts by dezinaView user's profileSend private messageVisit poster's website
djmaze
Captain
Captain


Joined: Nov 29, 2003
Posts: 566

Location: Netherlands

PostPosted: Sun Apr 18, 2004 9:23 am Reply with quoteBack to top

And everyone who turns off javascript can right-click for the contextmenu

And everyone that uses File->Save and choose "Full webpage" still have all content of your webpage

So what do you want to accomplish by disabling right-click ???
Find all posts by djmazeView user's profileSend private messageVisit poster's website
jbsarma
Corporal
Corporal


Joined: Feb 16, 2003
Posts: 59

Location: UK

PostPosted: Sun Apr 18, 2004 9:37 am Reply with quoteBack to top

djmaze wrote:
And everyone who turns off javascript can right-click for the contextmenu

And everyone that uses File->Save and choose "Full webpage" still have all content of your webpage

So what do you want to accomplish by disabling right-click ???
Good to know the trick and also the fact there is still way for people to copy your web page. Thanks to Dezina and djmaze.
Find all posts by jbsarmaView user's profileSend private messageVisit poster's website
Mouldy_punk
Sergeant
Sergeant


Joined: Mar 20, 2004
Posts: 91


PostPosted: Mon Apr 19, 2004 3:36 am Reply with quoteBack to top

I've seen a site that disable highlighting and right click so you couldn't copy. It uses PHP Nuke. and when you right click a messege comes up and says "Highlighting and Right Clicks are not allowed". The only way I've found to copy stuff from the site is to go View and the View source and scroll down until you find the bit you want. (I don't take stuff from other peoples site by the way, I was just wondering if his plan was as fool proof as he thought)
Find all posts by Mouldy_punkView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Mon Apr 19, 2004 4:55 am Reply with quoteBack to top

Hello,

The disable right mouse click work perfect if you add a snipplet to your header to stop users from viewing the source.

There's a script that you can add to your website "my_header.php" whenever someone click "View - Source" that function is automatic disabled as well.

Now what are you willing to pay me to tell you where to find the snipplet? Laughing

_________________
If you shoot for the moon and miss, you'll still be amongst the stars.
Find all posts by foxyfemfemView user's profileSend private message
rakishoner
Nuke Soldier
Nuke Soldier


Joined: Jan 24, 2004
Posts: 25


PostPosted: Wed Apr 21, 2004 8:57 am Reply with quoteBack to top

cache of course. Mr. Green
Find all posts by rakishonerView user's profileSend private message
Mouldy_punk
Sergeant
Sergeant


Joined: Mar 20, 2004
Posts: 91


PostPosted: Wed Apr 21, 2004 11:39 am Reply with quoteBack to top

Quote:
Support Staff


You should be supporting us :p and as this is a free service shouldn't you be supporting us with no charge? Laughing

I'm usless with inserting code...unless its realy simple Im a newbie as far as PHP is concerned.

_________________
[url=http://www.mouldypunk.com]Mouldy Punk[/url]
[url=http://www.mod-shack.com]GTA Mods[/url]
Find all posts by Mouldy_punkView user's profileSend private messageSend e-mailVisit poster's websiteMSN Messenger
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Wed Apr 21, 2004 3:31 pm Reply with quoteBack to top

Laughing Support for phpnuke issues... this is beyond phpnuke Laughing... Stopping someone from right clicking on your website has nothing to do with phpnuke nor stopping someone from using the View - Source from their browser .. that's not a phpnuke issue ... Laughing

_________________
If you shoot for the moon and miss, you'll still be amongst the stars.
Find all posts by foxyfemfemView user's profileSend private message
Shenphen
Lieutenant
Lieutenant


Joined: Oct 29, 2003
Posts: 164


PostPosted: Fri Apr 23, 2004 4:03 am Reply with quoteBack to top

hello,
foxyfemfem wrote:
The disable right mouse click work perfect if you add a snipplet to your header to stop users from viewing the source.
Is it possible to get this code (snipplet)? Smile
thank you
Find all posts by ShenphenView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.045 Seconds - 293 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::