vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Attachment and avatar hotlinking protection (1.0.1) (https://vborg.vbsupport.ru/showthread.php?t=47306)

Sia Bani 03-10-2003 05:56 AM

Hi again. I have another question...does anyone know how to make an advertisement of my site by replacing the image that is being hotlinked? Basically, instead of the x or the actual image they're trying to hotlink, how could I make an ad of my site come up? Anyone come up with this already?

dennx 05-21-2003 06:26 AM

Does this hack work in vB 2.3??

phenom 05-24-2003 08:58 PM

I installed this on 2.3.0 and it... sorta... works

The images don't seem to be able to be hotlinking, but instead of getting the message from the new template, I get this:

Code:

Parse error: parse error, unexpected T_STRING in /home/pcbaseb/public_html/forums/attachment.php on line 39

fury 05-24-2003 09:02 PM

dennx: It should

phenom: Show me your line 39, if you don't mind

gmarik 05-25-2003 08:06 AM

A great idea, just like Nuke has.

ImportPassion 06-03-2003 03:21 AM

Ok, i changed this around a bit cause i didn't work for me. Some ppl couldn't see the images in the forum.
PHP Code:

if (!$GLOBALS[HTTP_REFERER]) {
    
$HTTPREFERER "http://www.7thgencivic.com/";
} else {
    
$HTTPREFERER $GLOBALS[HTTP_REFERER];
}

$c_url parse_url($HTTPREFERER);

if (!
substr_count($c_url[host], "www.7thgencivic.com") || !substr_count($c_url[host], "7thgencivic.com")) {
  
$redirectquery $DB_site->query_first("SELECT postid,threadid FROM post WHERE attachmentid='".$attachmentid."'");
  
$url $bburl "/showthread.php?s=".$session[sessionhash]."&threadid=".$redirectquery[threadid]."#post".$redirectquery[postid];
  
$redirecttype "post";
  eval(
"standardredirect(\"".gettemplate("redirect_wrongreferrer")."\",\"\$url\");");



Gutspiller 07-05-2003 12:54 AM

Anybody using this hack gotten reports that it screws up if you have Windows NT or are behind a proxy? I have tried multiple hacks to protect avatars and attachments, but I have a few users they say the see the replacement image even when they are on the site viewing the image. :(

Any ideas? I think a .htaccess might work for me, but I don't know what I'm suppose to put in it.

Andrus 07-07-2003 12:33 PM

My question is this... One of my sites is a new site, and some are still entering the site through the IP right? So would you not want to have both the IP and the domain name listed, and if so could you simply seperate Domain, and IP with a comma in the code?


All times are GMT. The time now is 01:06 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.01276 seconds
  • Memory Usage 1,735KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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