PDA

View Full Version : vbgarage used with member of the week


mbaskett
02-17-2005, 12:20 AM
Just wanted to say that I'm loving the multiple garages feature... I spent today and got it all integrated with our portal page, and also with the sidebar. We do a featured member of the week, and was able to get it to work with the vbgarage hack quite nicely...

If anybody wants me to compile all the tweaks I had to do, and post them up, I will as long as it's okay with Noppid. I only had to make 2 additions too vbgarage.php, and the rest was in standard vbulletin tables and files.....

The only thing I would like to change is the way images are displayed.... currently they pull from the filesystem (that's where we store our images), but they require the image folder to be accessible via http, which can allow direct linking to the images from outside.... I would like to be able to have it work with the images folder elsewhere, I just couldn't quite follow the GD code on how the image files were named, and how they were linked to the db records... as far as I can tell, it relies on the mysql insert order, and not a specific tag or identifier that can be linked in the db to a file (i.e. store the renamed image filename and thumb filename in a field in the db)

Anyways, just wanted to say that I've been quite successful with this hack, and am enjoying it's features immensely.

Thanks!

noppid
02-17-2005, 12:25 AM
Hack for the hack. That's cool

However ya mentioned using beta. Maybe ya better hold off till we know this is pretty much going to be the release code and no problems turn up.

Other then that, have at it.

magnus
02-21-2005, 01:12 PM
The only thing I would like to change is the way images are displayed.... currently they pull from the filesystem (that's where we store our images), but they require the image folder to be accessible via http, which can allow direct linking to the images from outside.... I would like to be able to have it work with the images folder elsewhere, I just couldn't quite follow the GD code on how the image files were named, and how they were linked to the db records... as far as I can tell, it relies on the mysql insert order, and not a specific tag or identifier that can be linked in the db to a file (i.e. store the renamed image filename and thumb filename in a field in the db)

Easy fix for this is to simply use an .htaccess rule set in the image directory to prevent hotlinking. Something like this should do the trick:


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC]


With that in place, images will only be displayed if linked from your domain only. If you want to get nasty, you can have it display an alternate image to illegal link attempts with this (just replace the above RewriteRule line with the one below):

RewriteRule \.(gif|jpe?g|png|bmp)$ /images/stophotlinking.gif [L,NC]

noppid
02-21-2005, 03:34 PM
Hi Magnus. :wave:

magnus
02-21-2005, 04:30 PM
told you I'd be lurking.. hehe. ;)