vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Disable Right-Click in threads! (https://vborg.vbsupport.ru/showthread.php?t=103498)

Replicators 12-22-2005 02:20 AM

Disable Right-Click in threads!
 
I would like to see a hack to disable right-clicking,but only in posts. I found a hack for phpbb that does it which i will give the code now...

Code:

<!-- Start add - No copy MOD -->

<script language="javascript"> <!--
var previous_key ;

function clickIE4(){
if (event.button==2){
alert('No Right Click Is Allowed');
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert('No Right Click Is Allowed');
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
function handleKeyDown()
{
        if (previous_key==17 )
        {
                switch (window.event.keyCode)
                {
                        case 45 :
                        case 46:
                        case 67:
                        case 88:
                                alert('Copy Is Not Allowed');
                                event.keyCode=0;
                                previous_key=window.event.keyCode;
                                event.returnValue=false;
                                break;
                }
        } else if (previous_key==16)
        {
                switch (window.event.keyCode)
                {
                        case 45 :
                        case 46:
                                alert('Copy Is Not Allowed'+window.event.keyCode);
                                event.keyCode=0;
                                previous_key=window.event.keyCode;
                                event.returnValue=false;
                                break;
                }
        }
        previous_key=window.event.keyCode;
}
function handleKeyUp()
{
        previous_key=0;
}

if ( 1 )
{
document.oncontextmenu=new Function("alert('No Right Click Is Allowed');return false")
document.onkeyup = handleKeyUp;
document.onkeydown = handleKeyDown;
}
//-->
</script>
<!-- End add - No copy MOD -->

Could someone put this into a hack for vb? Only for posts though,like in showthread.php.

Hellcat 12-22-2005 03:31 AM

Hmm.... should work if go to AdminCP -> Style Manager -> Edit Templates.
Find and open the template "SHOWTHREAD" and paste the above code right at the beginning.

That should add this "mod" into every threadview.

Not tested, but should work.

newfun 12-22-2005 03:34 AM

easy just them in header in common templates

TyleR 12-22-2005 03:34 AM

it could actually be added to the header template, just by wrapping it in

Code:

<if condition="THIS_SCRIPT == 'showthread'">Place code here...</if>

Zia 12-22-2005 02:10 PM

umm idea isn't bad at all...but how to disable right ckick on images including avtar,posted image ....

Suggestion pls...
Thanks

Lea Verou 12-24-2005 01:07 AM

Quote:

Originally Posted by Zia
umm idea isn't bad at all...but how to disable right ckick on images including avtar,posted image ....

Suggestion pls...
Thanks

That's useless as they can always drag the image to a folder and have it or look at the source code for it's URL ;)
It only makes people mad at you :p

Andreas 12-24-2005 01:11 AM

Right-click blockers never work and are just annoying.

Zia 12-24-2005 03:17 PM

Thankx..

baronvonwalz 12-24-2005 03:39 PM

The best way around it is:

CTRL + C

Replicators 12-25-2005 02:37 AM

That's why i want a hack to be made to download a Attachment like a url instead. If that can be done it will be extremely hard for people to get the actual link to the file, but nobody is interested in making a hack like that i guess. Like a certain .url file in which customer's can simply edit and put their real links in there and upload as a attachment,when people download it,they don't download it but get redirected to the files instead. Of course my only concern would be people using Download Managers as their default downloading software,then they would be able to see the download links. I just want it to be as hard as possible is all for them.

Hellcat 12-25-2005 09:39 PM

Quote:

Originally Posted by Replicators
That's why i want a hack to be made to download a Attachment like a url instead. If that can be done it will be extremely hard for people to get the actual link to the file, but nobody is interested in making a hack like that i guess. Like a certain .url file in which customer's can simply edit and put their real links in there and upload as a attachment,when people download it,they don't download it but get redirected to the files instead. Of course my only concern would be people using Download Managers as their default downloading software,then they would be able to see the download links. I just want it to be as hard as possible is all for them.

Why do you want to hide the actual download URL?
You want to prevent remotelinking to your site? That could be done by some sort of anti-leech script :)

Replicators 12-26-2005 03:51 AM

If your referring to editing the .htaccess to do that it wouldn't work if the files you want to prevent from being remotely linked off of are not on the same server the forums are on. If your referring to a vb hack then i am all ears!

But i think the use of attachment would be good,as they wouldn't be able to get the real link by saving the page and looking through the code to find the link. The download attachment as URL would work great i think.

Hellcat 12-26-2005 05:12 PM

No, I'm not talking about the .htaccess, rather a real (PHP) script that acts like some kind of proxy for the download.

The download request is sent to the script (let it be "download.php" with an ID of the reqiested file, the script then checks if everything is in order and sends the contents of the requested file to the browser.

This way you have absolute control over your downloads (you also can do some traffic checking) and the real location of the files is never revealed, the actual files can even be outside of the public accessible folder of the webserver :D

Replicators 12-27-2005 12:38 AM

but it would use up the webserver's bandwidth and the server your downloading from as well correct?

The reason i want it done with attachments instead of bb_codes is because of this

Forumi Shqiptar 04-01-2006 07:22 AM

how can i disable right click in certain forums any one has any ideas?


All times are GMT. The time now is 05:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01095 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete