I have just completed the installation process of new forum into my account....And now i want to incorporate a script into every pages of the forum wherever the posts appear...
And the script is a script which disables right click both on screen and on images which i want....(But i know it wont do to prevent the downloading of images from forum,which is my ultimate aim....)
So to incorporate this "disability" will it be successful if i copy the script to the template css file....???
Otherwise what else will i do...???Please anyone help me...Either post it here or private message me which will be of great help....
its impossible to add that in CSS. You will need to use javascript to do that, the script is quite simple, i will post you here an example:
| Code: |
<SCRIPT TYPE="text/javascript">
<!--
//Disable right click script
//visit http://www.rainbow.arch.scriptmania.com/scripts/
var message="Sorry, right-click has been disabled";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</SCRIPT> |
To use the code paste that into the <head> tag in html. and you are done!
also, to disable the image toolbar in IE, you can use this <meta> tag:
| Code: |
| <META HTTP-EQUIV="imagetoolbar" CONTENT="no"> |
but, if what you want to do is block image downloading, you have to do something else, and the easiest way of doing that is using flash. Create a flash movie with only one frame and there your image. And that way you will prevent 100% image downloading. Even though they will still be able to print screen, but that is one of the best options you have.
luck! 
Hey friend i think you have not understood my question properly....Actually what i asked was the script to disable right click both on images and on page in a forum...But i think what you have said is about doing it in webpage....Anyway i appreciate you for spending some time to reply to ny question...
But now please see,i have to disable right click in a forum..And if the script you have given here is the right one for what i said...then pplease tell me where to put in this script so that disabling can be done in the forum.....
A forum doesn't change much to that fact, you'll just need to find the right file to edit. In phpBB for example, it's root/templates/template name/overall_header.tpl.
yyea thats right Emmer-Compascuum, you just need to find a file that that appears in every single page, contact the crteators of the forum, or ask in a support forum.
Thanx for replying.....I have hosted the forum in frihost itself...So i cannot ask in anyother support forum..that's why i asked here...
Ok anyway are you sure that the script is to be entered into overall_header.tpl...Anyway i am gonna have a try on it...
Wow, great !!! Hey friends what you said have worked...!!!
I did as you said and inserted the script into the file you had said and amazingly it is working now and thousands of thanks to all of you who replied....