Back to vBulletin 4.x Template Modifications

prevent guest from use the mouse in the pages of threads
Mod Version: 1.00, by hazem_aliraqi

vB Version: 4.2.x Rating: (1 vote - 1.00 average) Installs: 2
Released: 09 May 2015 Last Update: Never Downloads: 0
Not Supported Template Edits  

hello

this code for prevent guest from use the mouse in the pages of threads

so this code is work only in thread pages

and i find it work with Google Chrome , Firefox, Enternet

just add this at the end of headinclude template

this code with out alert
PHP Code:

<vb:if condition="$show['guest']">
<
vb:if condition="THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'threads'">
<
script>
 var 
isNS = (navigator.appName) ? 0;
  if(
navigator.appName == "Netscape"document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
  function 
mischandler(){
   return 
false;
 }
  function 
mousehandler(e){
     var 
myevent = (isNS) ? event;
     var 
eventbutton = (isNS) ? myevent.which myevent.button;
    if((
eventbutton==1)||(eventbutton==3))  return false;
 }
 
document.oncontextmenu mischandler;
 
document.onmousedown mousehandler;
 
document.onmouseup mousehandler;
    </
script></vb:if> </vb:if> 

if you want to add alert to appear for guest use that code

PHP Code:
<vb:if condition="$show['guest']">

<
vb:if condition="THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'threads'">

<
script>
 var 
isNS = (navigator.appName) ? 0;
  if(
navigator.appName == "Netscape"document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
  function 
mischandler(){
   return 
false;
 }
  function 
mousehandler(e){
     var 
myevent = (isNS) ? event;
     var 
eventbutton = (isNS) ? myevent.which myevent.button;
    if((
eventbutton==1)||(eventbutton==3)) alert(" Sorry you cannot use shading and copies in threads only after you register  "); return false;
 }
 
document.oncontextmenu mischandler;
 
document.onmousedown mousehandler;
 
document.onmouseup mousehandler;
    </
script></vb:if> </vb:if> 

Download

No files for download.

Similar Mods

Anon Floodcheck - prevent guest spamming vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024