Get image URL

Phoca Gallery - image gallery extension
zonedabone
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 25 Aug 2010, 18:52

Get image URL

Post 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?
hanlz
Phoca Member
Phoca Member
Posts: 32
Joined: 19 Apr 2010, 09:47
Contact:

Re: Get image URL

Post by hanlz »

you mean sef url
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Get image URL

Post 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.
zonedabone
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 25 Aug 2010, 18:52

Re: Get image URL

Post 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?
imperialWicket
Phoca Enthusiast
Phoca Enthusiast
Posts: 78
Joined: 28 Feb 2010, 15:39

Re: Get image URL

Post 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.
Post Reply