In G1, you can right click on a picture, grab the url of the picture itself, and give that direct link to just the image to someone. I havn't had a chance to test this with G2. I am under the impression, if hte G2data directory is stored outside the website this wont be possible. (which can be a good thing for some people). However, can I still set it up so that the pictures can be directly accessed provided the url is correct?
----
Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
Posts: 974
This will still work in G2, unless you have specified permissions that prevent an anonymous user from viewing the picture. We haven't set up any hotlink prevention schemes yet, so if the permissions that you set in G2 allow anonymous users to view an item, anyone will be able to hotlink to that item.
Posts: 174
When you right click on the photo you dont get the direct url, you get the php page for that photo. How am I going to get the direct link in G2? Do I have to use the G2 database and read it that way or is there another way im not seeing?
I need the ability to have the direct path to the image. Even after permissions are set to read the albums folder.
Posts: 3236
Use that php file as the link, it will work.
Example Code:
Example in Action:
[img]http://fryfrog.com/gallery2/main.php/d/1021-2/abp.jpg[/img]
Posts: 3
When I try to get a direct link to hotlink an image to post into a forum .. I get something like this
but some vBulletin boards wont reconize that in img tag
how can I translate the url so that it includes ".jpg" so that the other forum languages will reconize it?
The path to my image on the server is:
/g2images/places/2005-04-PointVicente/CIMG2318.jpg
My Gallery
Posts: 16504
You can enable URL rewritting and get URLs like this:
http://photos.kevinnehls.com/v/Trips/OlympicNP/PortTownsend/IMG_1058.jpg.html
You can then just chop off the .html and still get to the image:
http://photos.kevinnehls.com/v/Trips/OlympicNP/PortTownsend/IMG_1058.jpg
However, I'm not sure how you'd get to the full size image here:
http://photos.kevinnehls.com/v/Trips/OlympicNP/PortTownsend/IMG_1058.jpg.html?g2_imageViewsIndex=1
Posts: 389
Yes, we do - but only for people with mod_rewrite (URL Rewrite module) though. You may also chose to watermark hotlinked images if you activate the Watermark module.
Download URLs looks like this with the URL Rewrite module:
http://photos.kevinnehls.com/d/31-3/IMG_1058.jpg
Posts: 3
Thanks guys .. took me a while to find the mod_rewrite module .. but that did the trick
Posts: 14
hi,
I have configured the url_rewirte and it working well. I have a question on premission of the .htaccess file. I have set the premission to "666", is it correct?
thanks,
Posts: 16504
666 on a file is still "world" writeable. Set it to 644 so only you can change it. When you want to make changes to your URL rewrite setup, set it to 666 first, make your changes, then set it back to 644.
The same for your config.php. It should be set to 644 and only changed to 666 when Gallery needs to write to it.
Posts: 22
I'm still battling this. I've got mod wre-write working and right clicking a photo gives me this URL which vBulletin coughs at.
http//www.gmlsxs.org/d/4360-2/DSCN1579.jpg?g2_GALLERYSID=b43246fef5f6b4b9d64cfff638c4e698
Now if I trim off the stuff at the end, my link will work. How can I generate the cleaner URL for the images without having to tell all of my users how to modify the URL when they need to post an image in our forums?
http//www.gmlsxs.org/d/4360-2/DSCN1579.jpg
Thanks!
Posts: 174
what about for IIS
Posts: 16504
ZED28, search the G2 forums. This has been discussed many times. Here is one such possible fix: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27985&highlight=quick+url
doomdead, other than IIS totally sucking for what it tries to do, I'm not sure what your question is. ;) What about IIS?
Posts: 174
Hey now, I've dipped my tow on the darkside, isnt my taste... My 03 server with IIS is very stable and does quite a bit for me.....
Can we set up mod_rewrite somehow on IIS. I would love to have shorter urls with gallery and the ability to link directly to the image.
Posts: 16504
I was only razing you ;)
I think you're referring to URL Rewrite of G2. mod_rewrite is an Apache module, getting that to run on IIS probably isn't possible. ;)
I was only able to find a few topics refering to url rewrite iis when searching. Maybe search the G2 forums and read over those threads. Though from the brief glance I took of them it doesn't appear like anyone came to any grand conclusion on how to use IIS's ISAPI rewrite for this.
Posts: 22
Thanks for the insight nivekiamm checking it out now!