The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Disable Left and Right click on Legend only

3 posters

Go down

Solved Disable Left and Right click on Legend only

Post by gunsmaker February 23rd 2015, 09:56

is there a code to disable the mouse right-click and left-click on the legend only?
My forum using phpbb3.
avatar
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 February 23rd 2015, 10:07

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?


Disable Left and Right click on Legend only Slgray10

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

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Disable Left and Right click on Legend only

Post by gunsmaker February 23rd 2015, 11:00

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??
avatar
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_ February 23rd 2015, 11:27

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','/');   
      });
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2108
Reputation : 336
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 February 23rd 2015, 14:00

it works, nice.
thankyou @_Twisted_Mods_

-Solved-
avatar
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_ February 23rd 2015, 18:43

Topic solved and archived
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2108
Reputation : 336
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