vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Anti-Leech Attachments - prevent hotlinking and bandwidth theft! (https://vborg.vbsupport.ru/showthread.php?t=149666)

steadicamop 05-13-2009 09:47 PM

Sorry guys, been out of the loop for quite a while now, will take a look at this and see if anything needs updating, I have tested it on my current install and it works fine.

Jason (Steadicamop)

steadicamop 05-13-2009 09:54 PM

[Update]

Tested on vb 3.8.0 - click to test -- http://www.steadiforum.com/attachmen...2&d=1222457106

Could you confirm which version of vb you are attempting to run this on? I will re-investigate the admincp issue, there should be the option there.

Thanks,

Jason

Snookieboy 05-19-2009 01:43 PM

Works perfectly on my forum - VB 3.8.2 with VBSEO :)

Only problem that still remains is with people with no referer entry (ie they have antivirus programs like Norton which remove the referer tag for no apprant reason). A fix that would also allow people with no referer to download to would be brilliant.

Example attachment: http://digiex.net/attachments/guides...otosendfix.zip

Sp32 06-04-2009 12:34 AM

Installed, much appreciated

ShackMaster 08-10-2009 12:38 AM

Installed on my 3.8.3 board, but does not work and there is no option in vB Options either. I tried replacing the plugin code as an earlier poster suggested, but it still does not work.

pablete 08-10-2009 11:58 AM

thanks. there is a mod like this but to do this with the images displayed in a forum? is that if someone copies the address of an image to put in another forum, this will not show any image and leave another pic in place? thanks

grafbyte 09-18-2009 12:44 AM

hi

im install dir in the 3.8.4 and i cant not see the settings :(
PHP Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="antileech" active="1">
    <title>Anti Leech Attachments</title>
    <description>Prevent hot linking your 

attachments!</description>
    <version>1.1</version>
    <url>https://vborg.vbsupport.ru/showthread.php?t=149666</url>
    

<versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=antileech]]></versioncheckurl>
    

<dependencies>
    </dependencies>
    <codes>
    </codes>
    <templates>
        <template name="antileech" 

templatetype="template" date="172182599" username="Jason" version="1.00b"><![CDATA[$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[antileech]</title>
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" 

align="center">
<tr>
    <td class="tcat">$vboptions[bbtitle] - $vbphrase[antileech]</td>
</tr>
                <td class="panelsurround" align="center"><br /><br />
            <div class="panel" style="width:70%">
        <br /><phrase 1="{$id['postid']}">$vbphrase[antileechmessage]</phrase><br /><br />
</div><br /><br /></td>
</tr>
</table>
$footer
</body>
</html>]]></template>
    </templates>
    <plugins>
        <plugin active="1" executionorder="5">
            

<title>anti-leech</title>
            <hookname>attachment_start</hookname>
            <phpcode><![CDATA[if 

($vbulletin->options['al_disable'])
{
    $ref = str_replace('http://www.','',$_SERVER['SERVER_NAME']);
    if(!strstr($_SERVER['HTTP_REFERER'],$ref)) {
        $id = $vbulletin->db->fetch_array($vbulletin->db->query_read("SELECT postid FROM ".TABLE_PREFIX."attachment WHERE 

attachmentid = ".mysql_escape_string($_REQUEST['attachmentid'])));
            eval('$navbar = "' . fetch_template('navbar') . '";');
        eval('print_output("' . fetch_template('antileech') . '");');
        exit;
    }  
}]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
        <phrasetype name="GLOBAL" 

fieldname="global">
            <phrase name="antileech" date="1172182599" username="Jason" 

version="1.0"><![CDATA[Anti Leech Protected]]></phrase>
            <phrase name="antileechmessage" 

date="1172182522" username="Jason" version="1.0"><![CDATA[Sorry, only direct links from threads are allowed to view 

attachments.  As a courtesy, the link to the post containing the attachment is provided below.<br /><br /> <a 

href=showthread.php?p={1}>Click here to visit the post with the attachment.</a> <br /><br /> Leeching from the forum is not 

permitted, to save bandwidth abuse only direct clicks from the thread the attachment is with will work. All attachments are 

viewable by guests (you are not required to register).]]></phrase>
        </phrasetype>
        <phrasetype 

name="vBulletin Settings" fieldname="vbsettings">
            <phrase name="setting_al_disable_desc" 

date="1231584976" username="Jason" version="1.00b"><![CDATA[Enable Anti-Leech Attachments?  Allows non-hotlinking of 

attachments, the only way they can be viewed is from clicking the attachment link on the post.]]></phrase>
            

<phrase name="setting_al_disable_title" date="1231584976" username="Jason" version="1.00b"><![CDATA[Enable Anti-Leech 

Attachments]]></phrase>
            <phrase name="settinggroup_leech_settings" date="1231576342" username="Jason" 

version="1.00b"><![CDATA[Anti-Leech Settings]]></phrase>
        </phrasetype>
    </phrases>
    <options>
    

</options>
    <helptopics>
    </helptopics>
    <cronentries>
    </cronentries>
    <faqentries>
    </faqentries>
</product>


TheChaosFactor 09-30-2009 09:43 AM

Quote:

Originally Posted by pablete (Post 1864524)
thanks. there is a mod like this but to do this with the images displayed in a forum? is that if someone copies the address of an image to put in another forum, this will not show any image and leave another pic in place? thanks

I just copied the address and posted that pic in my forum using image tags with no problem, which is what I thought this was supposed to prevent?

Not sure I understand the use of this, at all?

kalisekj 09-30-2009 04:36 PM

Installed but its not working :( I am still able to hot link to my attachments :(

TheChaosFactor 10-04-2009 02:14 PM

Quote:

Originally Posted by kalisekj (Post 1892913)
Installed but its not working :( I am still able to hot link to my attachments :(

I tested it using the demo pic and hotlinked it from there, so I don't think it's just you.


All times are GMT. The time now is 09:33 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.01191 seconds
  • Memory Usage 1,755KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete