Page 1 of 1
Get image URL
Posted: 25 Aug 2010, 18:55
by zonedabone
Hi! People who use my gallery want to embed the images elsewhere, so I need a way to give them the ABSOLUTE URL of the image, instead of the download link. Is this possible?
Re: Get image URL
Posted: 26 Aug 2010, 06:27
by hanlz
you mean sef url
Re: Get image URL
Posted: 26 Aug 2010, 13:06
by imperialWicket
The original image filename is available from the phoca gallery database records, but I don't think there is an option to display it in the admin area. Using the image object from the backend, the filename is available (something like: $value->filename). The filename is relative to your main phocagallery images directory, so you would need to build the URL with: BASE_URL+PHOCA_DIR+$value->filename.
Hope this helps, post more questions if this seems to be on the right track, but is unclear.
Re: Get image URL
Posted: 26 Aug 2010, 16:03
by zonedabone
Well, I'm using phoca to allow people to host images, so I need them to be able to embed them easily. WOuld switching the entire site to sef work?
Re: Get image URL
Posted: 27 Aug 2010, 18:34
by imperialWicket
Enabling SEF urls is often a good idea, but in this case, the Search Engine Friendly URL to an image is still going to load a standard page with your template, menus, modules, etc. Phoca Gallery is a component, and any requests to your web site are first handled by the template, so the all of your standard template features will display whenever an SEF url is used to access your site.
If I understand your request, what you need is the path on your server that goes directly to the image, so that someone can use the location to load their image on an external site. The only way to acquire this is to tell your users to look for it by reviewing the source of your web page, or edit the Phoca Gallery code to provide it in a more direct way to your users.