Hi,
first of all...this one is a great gallery !!
My question is, if it is possible to disable the downloading of pictures in the gallery. And i mean not only the "Download" icon, i mean also the "Save as" option when you right click a picture. Well in fact i tried the "norightclick" method, but didn't came far, because i got a blank page after clicking onto a picture in a category. So if this is the only possibility to prevent from downloading, could someone tell me where and which code exactly i have to put in to disable that? I mean it's not the "clean" version...but for the moment...
Another question is, how can i prevent hotlinking to the pictures? Let's assume my pics are in "/galleries/cat1/pic1.jpg. If you someone will hit the url : www.yourdomain.com/galleries/cat1/pic1.jpg he also will be able to see my pic and can use it. How can i prevent that?
I read some topics which says that you can use a .htaccess file. But where exactly do i put it in? In the main folder or the "galleries/cat1/ folder?
Thx for help in advance.
And for info...i got the 2.0.1. version. Is there maybe a Mod/Plugin for both my questions?
Regards,
Lucas
Offline
by .htaccess
We can find some examples but there is a lot on Google.
I will come back on the download button later.
Offline
sonreir wrote:
Hi,
first of all...this one is a great gallery !!
My question is, if it is possible to disable the downloading of pictures in the gallery. And i mean not only the "Download" icon, i mean also the "Save as" option when you right click a picture. Well in fact i tried the "norightclick" method, but didn't came far, because i got a blank page after clicking onto a picture in a category. So if this is the only possibility to prevent from downloading, could someone tell me where and which code exactly i have to put in to disable that? I mean it's not the "clean" version...but for the moment...
Another question is, how can i prevent hotlinking to the pictures? Let's assume my pics are in "/galleries/cat1/pic1.jpg. If you someone will hit the url : www.yourdomain.com/galleries/cat1/pic1.jpg he also will be able to see my pic and can use it. How can i prevent that?
I read some topics which says that you can use a .htaccess file. But where exactly do i put it in? In the main folder or the "galleries/cat1/ folder?
Thx for help in advance.
And for info...i got the 2.0.1. version. Is there maybe a Mod/Plugin for both my questions?
Regards,
Lucas
On right click scripts are a waste of time. It only serves to annoy genuine users. If they want an image then they can just go to their cache and get it. Its a waste of time, Imo. If it renders in the browser they can get it, period ;)
Now .htaccess wise you need to do this to stop other websites using the images. Place the .htaccess in the root of your domain. This will stop them using your images across your whole website.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+)?www.yourdomain.com [NC]
RewriteCond %{REQUEST_URI} !^/images/dontsteal.gif [NC]
RewriteRule [^/]+.(gif|jpg|GIF|JPG|ico)$ http://www.yourdomain.com/images/dontsteal.gif [R,NC,L]
Remember to replace yourdomain with your actual domain.
Offline
Jive Bunny wrote:
On right click scripts are a waste of time. It only serves to annoy genuine users. If they want an image then they can just go to their cache and get it. Its a waste of time, Imo. If it renders in the browser they can get it, period ;)
Now .htaccess wise you need to do this to stop other websites using the images. Place the .htaccess in the root of your domain. This will stop them using your images across your whole website.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+)?www.yourdomain.com [NC]
RewriteCond %{REQUEST_URI} !^/images/dontsteal.gif [NC]
RewriteRule [^/]+.(gif|jpg|GIF|JPG|ico)$ http://www.yourdomain.com/images/dontsteal.gif [R,NC,L]
Remember to replace yourdomain with your actual domain.
Thx for that...works already for me. Well, i know that the solution with disabling right clicks is not the best one. The only thing i want to do is to prevent downloading pictures...that's all. And I'm open for all different possiblities.;) There are some galleries where you can do that. If you want to download via "Right click" you get an empty file for download for each picture...or a *.php script. So in fact it is not annoying and the browser doesn't tell you that it is not allowed...you just download a fake/empty file for each picture you want to download. Does anyone know how to solve this?
Regards,
Lukas
Offline
I didn't try this solution...
But it means coding <img src="...getpicture.php?id=xxx" or something thing like that
where getpicture.php should determine first the way it has been called.
Possible to do, anyway unuseful CPU consumption on server side for sure. I dislike this idea even if elegant solution it is.
Offline
The SecureImages plugin used to allow this in release 1.7.0 ; unfortunately it doesn't work with release 2.0.2 ...
Anyone to upgrade it ? ;)
Offline