Script to avoid right clicking ?

Post new topic   This topic is locked: you cannot edit posts or make replies.

View previous topic View next topic Go down

Solved Script to avoid right clicking ?

Post by sumi_7 on September 28th 2008, 9:59 am

Can anyone pls give a script to avoid right cliking in my forum.??


Last edited by Nessa on September 28th 2008, 12:44 pm; edited 1 time in total (Reason for editing : Edit To Mark Topic Solved)

sumi_7
Forumotion Member

Male
Posts: 9
Language: English
Country:
Join date: 2008-09-27

http://mugglenet.darkbb.com

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by Nessa on September 28th 2008, 10:18 am

Code:
<script language=Javascript1.2> function ejs_nodroit() { alert('[b][b]Right[/b][/b]-[b][b]click[/b][/b] is forbidden !!!'); return(false); } document.oncontextmenu = ejs_nodroit; </script>


Here is the code I used to Disable Right Clicking on my forum before. Smile

Nessa
Global Moderator
Global Moderator

Female
Posts: 5552
Language: English
Country:
Join date: 2007-07-22

http://therealm.forumotion.com/index.htm

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by Placehold on September 28th 2008, 10:38 am

Nice nessa, Here is a function that stops the right click menu, It doesn't effect the cookies Smile

The best place to put it is in the forum description,
This way it will cover the whole forum

1. Navigate to:

Admin Panel\General\Configuration

2. Add the following code to "Site description * :" and press "Save"

Code:
<body oncontextmenu='return false';>




This will now disable right click no matter where you go

If your just loooking to stop right click on the main forum page and just the portal



1. Navigate to:

Admin Panel\Display\Generalities


2. Add the following code to "Message content :" and press "Save"

Code:
<body oncontextmenu='return false';>


3. Navigate to:

Admin Panel\Modules\Portal Management\Structure

4. Create a new section and add it as the header

5. Add the code into the header and press "Save"

This will only disable right click on these two sections

Regards








Craig

Placehold
Forumotion Member

Male
Posts: 2047
Age: 24
Language: English
Country:
Join date: 2008-04-16

http://www.craigreville.com/

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by Nessa on September 28th 2008, 10:39 am

Thanks for sharing your new tutorial with us Craig. Wink I wasn't sure If I was allowed to use that one yet. Razz

Nessa
Global Moderator
Global Moderator

Female
Posts: 5552
Language: English
Country:
Join date: 2007-07-22

http://therealm.forumotion.com/index.htm

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by Placehold on September 28th 2008, 10:44 am

Hahahahaha Actually now that i think on it, Even though they haven't yet been released,

I give my consent to use them Very Happy
(or if you want to publish them Wink )

Feel free to digg in hahahaha

Regards







Craig

Placehold
Forumotion Member

Male
Posts: 2047
Age: 24
Language: English
Country:
Join date: 2008-04-16

http://www.craigreville.com/

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by johanmandal on September 28th 2008, 10:47 am

Nice avatar Craig
hehe
sorry for being off topic mods

johanmandal
Forumotion Member

Male
Posts: 209
Language: English
Country:
Join date: 2008-08-28

http://love.9forum.info

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by sumi_7 on September 28th 2008, 10:54 am

Thanks Nessa,Placehold.

sumi_7
Forumotion Member

Male
Posts: 9
Language: English
Country:
Join date: 2008-09-27

http://mugglenet.darkbb.com

Back to top Go down

Solved Re: Script to avoid right clicking ?

Post by Nessa on September 28th 2008, 12:43 pm

You're Welcome Sumi_7 Smile

Since this problem appears to be resolved, I will lock this topic now.



=> Locked

Nessa

Nessa
Global Moderator
Global Moderator

Female
Posts: 5552
Language: English
Country:
Join date: 2007-07-22

http://therealm.forumotion.com/index.htm

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum