PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
devo
New Member
New Member


Joined: Oct 02, 2003
Posts: 23

PostPosted: Thu Oct 02, 2003 9:00 pm Reply with quote Back to top

hi there I have a java script tp diable right clicking in all my site, what I would like to know where to inesrt it please?

Would I insert into mainfile.php??? if so is there a correct place to insert it please?

thank
Devo
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Oct 02, 2003 9:26 pm Reply with quote Back to top

I would insert it into includes/my_header.php. That's what that file is for.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Savent
Regular
Regular


Joined: Jun 30, 2003
Posts: 81

PostPosted: Thu Oct 02, 2003 9:28 pm Reply with quote Back to top

Hi, In header.php

add this before the ?> at the bottom:

echo "<script language=JavaScript>\n";
echo "<!--\n";
echo "\n";
echo "//Disable right click script III- By Renigade (renigade@mediaone.net)\n";
echo "//For full source code, visit
Only registered users can see links on this board!
Get registered or login to the forums!
";
echo "\n";
echo "var message=\"\";\n";

echo "///////////////////////////////////\n";
echo "function clickIE() {if (document.all) {(message);return false;}}\n";
echo "function clickNS(e) {if \n";
echo "(document.layers||(document.getElementById&&!document.all)) {\n";
echo "if (e.which==2||e.which==3) {(message);return false;}}}\n";
echo "if (document.layers) \n";
echo "{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}\n";
echo "else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}\n";
echo "\n";
echo "document.oncontextmenu=new Function(\"return false\")\n";
echo "// --> \n";
echo "</script>\n";
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Fri Oct 03, 2003 5:47 am Reply with quote Back to top

I didn't check the code, but yes on the placement. An easier (and better) way is to use the WHEREDOC syntax
Code:
$someVarName = <<<_JSCODE_
<script>alert('Hello World');</script>
_JSCODE_;

echo $someVarName;
See this post for more info
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
devo
New Member
New Member


Joined: Oct 02, 2003
Posts: 23

PostPosted: Fri Oct 03, 2003 8:40 pm Reply with quote Back to top

good work, thanks to all that replied!!! Smile appreciated Smile
View user's profile Send private message
Savent
Regular
Regular


Joined: Jun 30, 2003
Posts: 81

PostPosted: Fri Oct 03, 2003 9:55 pm Reply with quote Back to top

no problem Smile I fiquired i would save Raven some time, cause I know he is always busy
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 9:19 pm Reply with quote Back to top

And Raven needs all the help he can get (hint, hint) Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous 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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum