The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
I've hacked my attachment.php script to prevent users from posting an attachment on my board, and then using the HTML to display it somewhere else. This prevents people from posting a pic on your board, then using your bandwidth to place that pic elsewhere. It is a tiny code change.
I've substituted my own logo, (LOL), but you can replace that with anything, or just use the "exit;" line to eliminate the pic entirely. In attachment.php, right after: PHP Code:
PHP Code:
NOTE: Changed to use the full path in "$filename = ..." to get this to work on some servers. ANOTHER: See this post in this thread for a modification that works on Win32 servers: https://vborg.vbsupport.ru/showthrea...895#post297895 AGAIN: If you modify avatar.php similarly, you can prevent people from cross-linking your avatars: https://vborg.vbsupport.ru/showthrea...893#post303893 UPDATE: The parse_url line is slightly different to use the new PHP syntax. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Excellent hack, most useful! Keep up the good work/hacks
|
|
#3
|
||||
|
||||
|
so, just making sure, this hack will, if someone goes to say http://www.stealsomeonesbandwidthbyp...heirserver.com and links to a pic on http://www.yoursite.com it will replace the pic with one of your choice such as "image hosted by coderforums.net"?
|
|
#4
|
|||
|
|||
|
Yep. That's it exactly.
|
|
#5
|
||||
|
||||
|
Can you add more than one domain? For example do I need to add forum.racesimcentral.com AND www.racesimcentral.com, or just put racesimcentral.com?
if (! strstr($checkurl, "racesimcentral.com")) { Right? |
|
#6
|
||||
|
||||
|
Never mind I checked and found racesimcentral.com is enough.
|
|
#7
|
|||
|
|||
|
You can substitute "yourdomain" for just a part of your domain name. If you have ".com" and ".net" mapped to the same forum, then you could use just the base portion of you domain name. For example: yourdomain.com and yourdomain.net would be protected by just putting yourdomain in the check line.
|
|
#8
|
||||
|
||||
|
wow thanks
|
|
#9
|
||||
|
||||
|
mm this is a great hack! I am going to install now and shall tell you how it works out
|
|
#10
|
||||
|
||||
|
works great as far as I can tell!
Just testing ![]() |
![]() |
|
|