no right click ... except for admins?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   no right click ... except for admins?
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
does anyone know where i might find a "no right click" script that will allow any admins to still use the right click but normal users will not be able to use it?



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   

if (!is_admin($admin)) {
echo "NO RIGHT CLICK SCRIPT";
}




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: no right click ... except for admins?
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Now for my question...Telli where does that go? Does it run with some other no right click script?



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Probably want to put it into your includes/javascript.php or includes/my_header.php here is one from dynamic drive:


if (!is_admin($admin)) {
     echo "<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>\n";
}




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: no right click ... except for admins?
echo
CZ Wiz
 Codezwiz Site Donator
Gender: Male
Status: Offline
Joined: Oct 04, 2003
0.15 posts per day
Posts: 1147
Points: 93
   
Thank you Telli. Sorry gutchunks, I didn't mean to hijack this thread. icon_neutral.gif



Back to top Reply with quote
#6   Re: re: no right click ... except for admins?
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   


Originally posted by echo @ Sun Nov 28, 2004 2:25 pm:

Thank you Telli. Sorry gutchunks, I didn't mean to hijack this thread. icon_neutral.gif


haha you beat me to the question icon_biggrin.gif ... thanks telli



Back to top Reply with quote
#7   re: no right click ... except for admins?
gutchunks
CZ Newbie
gutchunks has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Apr 21, 2004
0.00 posts per day
Posts: 29
Points: 2,148
   
this didnt work for me ... i pasted it in both the javascript.php and my_header.php and no luck

did anyone else have luck with this? am i doing something wrong?



Back to top Reply with quote
#8   re: no right click ... except for admins?
webshark
PayPal Donation
CZ Moderator
 Codezwiz Site Donator
webshark has been a member for over 20 year's 20 Year Member
turkey.gif
Age: 55
Gender: Male
Website:
Status: Offline
Joined: Mar 23, 2004
0.09 posts per day
Posts: 643
Points: 57,200
   
hello u can try the one from [ Register or login to view links on this board. ]




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#9   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Add a:


global $admin;


Right above it.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum