![]() |
I want guests to be able to see the images and attachments... that's what we're selling. What I don't want is people using my bandwidth to post signature pics on other boards.
|
|
Quote:
|
Quote:
|
<a href="http://www.golden-springs.com/forums/attachment.php?s=&postid=1813" target="_blank">http://www.golden-springs.com/forums...s=&postid=1813</a>
|
<a href="http://www.seles-online.com/forums/attachment.php?postid=1" target="_blank">http://www.seles-online.com/forums/a...t.php?postid=1</a>
This hack works great. Thanks. |
Seems like any referer-based functionality is being broken as each day passes. My IE6 users have no referer so they get blocked too. Various firewall packages also hide the referer. :(
Seems like we're going to have to use sessions/cookies to get this to work right... ugh. |
A slight variation for those who are interested:
I have a forum set up so guests wouldn't be able to see the attachments, and attachments themselves are shown right in the thread (not with a link). So the following change in code does the following: - all guest see an specified image instead of an attachment. - whoever tries to link to your attachment image from the different site will not be able to show it. the replacement image is going to show up instead of whatever is in attachment for all unregged people. Find this in attachment.php: PHP Code:
PHP Code:
PHP Code:
I use the following image: https://vborg.vbsupport.ru/ |
Thanks for the tip DR2000 -- I'll make those changes myself now. :)
And maybe you should note that the Admin -> User Groups -> Modify -> Unregistered -> Can download attachments should be set to 'No'. BTW, 'member' is misspelled in your graphic. :p |
Quote:
|
Nice! The actual image doesn't show unless unregistered users click the attachment link. Is that how it should be?
|
Will this work with smilies too? I have the worst time with people linking to them on other boards.
|
This looks like a great hack. I am having a major problem though. as soon as I add ANYTHING to the attachment.php script, I get broken links! I tryed lust adding this line;
echo "test"; but as soon as I do, I get broken links instead of the attachments. I AM CONFUSED! Can someone help me pull my head out of my a**? |
ugh
|
This hack won't work for smilies. They are simply little gif files. You would have to use the .htaccess method for those.
Adding PHP Code:
Follow the instructions, which will replace the image with the "broken" image, and end the script (and, it supplies the correct data for the type). |
pardon my ignorance for not even looking at the code before i posted this, but does this work with the "attachments as files" hack?
|
I don't know what that hack does, exactly, but given the name (... as files), it seems that it may not. Perhaps someone who knows more about that hack will comment?
|
this description should help. click here
|
OK... im doing sumfing wrong, please help, i have ova 70 users linking one image, please help asap, costing me too much.
i added the code exactly, and i am testing it at http://www.majorfm.com/testrapdis.htm the image still shows, please explain? I have attached my attachment.php for reference. |
wen i view the page in MS Frontpage, it shows the correct image i want it replaced with, but wen uploaded, it shows the attachment! this really should be standard in VB, what a security alert and a half, this mistake cost me £155, 12 gb off excess bandwidth, so what can i do? doesnt seem to work.
Check the attachment, for what i see in frontpage. |
I see a small red "X" You may be seeing a cached image in your browser. Try "Refresh."
|
ok this is working for me..
I can't see attachment images on other websites... BUT... All mp3 files cannot be downloaded from my domain. For some reason when you click to download it downloads the .gif Does anyone know? |
thanks guru... u were right
|
If you're on a win32 server, use "rb" in place of just "r" in your call to fopen. I'm sure this will be irrelevant to 99% of everyone on the planet, but since my forum has both Linux and Windows servers, I made a version that works on both:
PHP Code:
|
Thanks for the addition. That's cool. I added a link to this post with a note in the original hack.
|
Quote:
|
Did anyone notice if you place this code in your avatar.php script, it'll prevent your avatars from being hotlinked too? Awesome!
|
O.....kay. I now have about 6 users saying they can't see the attachments or avatars absolutely anywhere. Even linked on the board. But it works fine for everyone else. I'm confused now.
|
Some of our users that use IE 6.0 have reported that problem. Are you running the latest vBulletin?
|
Quote:
|
Seems to work perfect in 2.28! Great hack! Thanks!!
|
I run 2.28 and Cannot seem to get this to work with trilOByte's Welcome panel hack. the code works so i cannot hotlink the avatar, but in the welcome panel it also shows my logo instead of the users avatar. any help would be awsome! thanks
// Cross-link hack by Guru 2/24/2002 // Check that we aren't linked somewhere else $url = parse_url($HTTP_REFERER); $checkurl = strtolower($url["host"]); if (false === strpos($checkurl, "wpgrevscene") || false === strpos($checkurl, "winnipegrevscene")) { // Remove this code if you just want to break the image // Substitute my Logo header("Content-Type: image/gif"); $filename = "/home/wpgrevsc/www/images/wpgrev.gif"; $image = fread(fopen($filename,"r"),100000); echo $image; fclose($image); // End Substitute my Logo exit; } |
Will this also work if you place it somewhere for smilies?
Where the heck would it go? |
I have no clue for the last two questions. Anyone?
|
Quote:
Code:
RewriteEngine On |
After a brief amount of thought, of course smilies can't be protected by this code. They are individual files, served up by your host.
|
FWC,
That worked perfectly! Thanks for the help! Does anyone know if there is a way to also protect an IIS server the same way, I don't use it for my vb server, but some of my web pages are hosted on Win2k. |
Quote:
I can't help you with IIS, though. Don't know of the equivalent to mod_rewrite. |
is there a way to put a link at the top and bottom of the attachment...
Image Found at Mysite.com or Visit Mysite.com as part of the attachment |
|
All times are GMT. The time now is 01:27 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|