Disable Left and Right click on Legend only

Go down

Solved Disable Left and Right click on Legend only

Post by gunsmaker on February 23rd 2015, 8:56 am

is there a code to disable the mouse right-click and left-click on the legend only?
My forum using phpbb3.

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by SLGray on February 23rd 2015, 9:07 am

There is a tutorial for this, but it is for the whole forum.  You do know that if someone turns off JavaScript in their browser, they can right/left click still?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43465
Reputation : 3084
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by gunsmaker on February 23rd 2015, 10:00 am

@SLGray wrote:There is a tutorial for this, but it is for the whole forum.  You do know that if someone turns off JavaScript in their browser, they can right/left click still?

@SLGray i saw the tutorial for the whole forum, but i want for the legends only.
is there other choice for the other than staff cant access the legends??

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by _Twisted_Mods_ on February 23rd 2015, 10:27 am

try this

goto acp>modules>javascript management

create a new script

title:up to you
placement: homepage

copy the code below and save/submit

Code:
    $(function(){
         if (_userdata.user_level==1 || _userdata.user_level==2) return;
         $('em:contains(Legend) a').attr('href','/');   
      });
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by gunsmaker on February 23rd 2015, 1:00 pm

it works, nice.
thankyou @_Twisted_Mods_

-Solved-

gunsmaker
Forumember

Posts : 34
Reputation : 1
Language : English and Indonesian

http://tcga.forumn.org

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by _Twisted_Mods_ on February 23rd 2015, 5:43 pm

Topic solved and archived
avatar
_Twisted_Mods_
Helper
Helper

Male Posts : 2064
Reputation : 314
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Back to top


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