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 06-13-2007 10:00 PM

Anti-Leech Attachments - prevent hotlinking and bandwidth theft!
 
1 Attachment(s)
Title : Anti-Leech Attachments

Version : 1.1

Coder : Jason Williams

Purpose : Prevent your forum attachments from being directly linked to - prevent bandwidth abuse.

Why : Bandwidth can be expensive, plus I was frustrated with one of my members linking to three video clips on my forum from his own site, effectively abusing the bandwidth I pay for, so I set about a system that stops hotlinking, but at the same time, as a courtesy, providing a dynamic link to the post containing the attachment.

How : This could be replicated very easily using .htaccess but the one thing that it can't do is give you the link to the attachment itself. This mod displays a message informing the user that hotlinking is not allowed, then giving them the link to the post to view the attachment directly.

Known Issues : The security can be defeated by using the drop down style menu on the Anti Leech page - this has only been confirmed as an issue on Firefox. I have unsucessfully tried to find a way of removing the drop down on that page only.

Confirmed working with vBSEO 3.2.0.

Important : This has been tested on 3.6.2 and 3.8, I can presume it will be compatible with 3.7.x because it works on 3.8 - as always BACKUP FIRST!

Demo : http://www.steadiforum.com/attachmen...9&d=1180779148

Installation :

1. Import Product - product-antileech.xml
2. Save bandwidth!

File uploads : 0
Files to Import : 1
New Templates : 1
New Phrases : 2
Uses Hooks : 1
Uses Queries : 1

History :
v1.0 - Original release

v1.1 - Added enable/disable option, tested on VB 3.8

Done - if you like please click install! (and click Nominate for MOTM!)

steadicamop 06-13-2007 10:43 PM

Reserved for future use

rjmjr69 06-13-2007 11:17 PM

Sweet I'll test it out

Are there any settings or anything to adjust?

Barakat 06-13-2007 11:23 PM

i love your hacks man ...

installed

rjmjr69 06-13-2007 11:28 PM

http://www.isosdcftp.com/forums/atta...3&d=1181780809


I dont know if its working thats a link to an attachment at my site


http://www.isosdcftp.com/forums/show...?p=388#post388

steadicamop 06-13-2007 11:55 PM

Quote:

Originally Posted by rjmjr69 (Post 1268016)

This is something I forgot to mention - the attachments on my site are guest viewable - yours require login - so unless they're a member who's already logged in using cookies, it won't make any difference.

The best way to test if it's working is copy the attachment.php link and test it in a new browser window - this is how I tested it on mine.

Barakat 06-14-2007 12:06 AM

its works good but if you click on the "Click here to visit the post with the attachment"

its not functioned as well with the right link ...

showthread.php?p=%1$s

steadicamop 06-14-2007 12:17 AM

Quote:

Originally Posted by Barakat (Post 1268049)
its works good but if you click on the "Click here to visit the post with the attachment"

its not functioned as well with the right link ...

showthread.php?p=%1$s

Ok, I've reuploaded the product xml - if you download the new version and overwrite the old one, the template should now have the necessary code to parse the url.

Sorry for the hassle,

Jason

Barakat 06-14-2007 12:25 AM

yes thanks .... works good now .....

rjmjr69 06-14-2007 12:29 AM

Works like a charm if I do as you say. I opened it in IE and got the message thanks this works great now


All times are GMT. The time now is 11:20 PM.

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.01121 seconds
  • Memory Usage 1,738KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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