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) ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : 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) ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : 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>