How to link to album image from a web page with relative link

I have an index file in my root directory and would like to use a relative path to link to the custom thumbnail of an image in a Zenphoto album. Zenphoto is installed in \galleries folder.

I am using a test server and really want to use relative path since absolute links won't be correct when moved to live server.

This works with absolute path:

`

Spoonleaf Sundew
`
What code would I use to get a relative path? (/nif/galleries/... won't work)

Thank you.

Comments

  • acrylian Administrator, Developer
    If the live site is not in a subfolder called "nif" of course it does not work. You need the same structure local and live to have this work.
  • I wasn't clear enough. On the testing server itself, if I change the above link to:

    `
    Spoonleaf Sundew
    `
    it reports an incorrect path.
  • acrylian Administrator, Developer
    `/nif/galleries/flora/carnivorous/sundews/Spoonleaf-Sundew-glands.jpg` is not a link to anything regarding Zenphoto. It would be a full image link if you renamed the standard "albums" folder to "flora" thought. If you didn't do that it leads to nothing.
  • Please look at the "zenphoto as a plugin" article on the WEBsite. If you wish to link to a Zenphoto object (as opposed to the raw image) you will need t have Zenphoto active and use the Zenphoto image link.

    Your only other option is to link to the zenphoto index.php file and pass query parameters to indicate the album and image. This is what you would see for a Zenphoto link if you were not using mod_rewrite.
  • sbillard,

    Could you please give an example of your second option of linking to index.php and passing album and image that way?

    Sorry but I have to see an example for that one.
  • turn off the mod_rewrite option on your site. browse to the image you want to link. Copy the browser's address bar.
Sign In or Register to comment.