Member
Member
NaturalEnquirer   06-07-2011, 07:51
#1

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:

[Image: http://localhost/nif/galleries/zp-core/i...g&w=&h=400]
What code would I use to get a relative path? (/nif/galleries/... won't work)

Thank you.

Administrator
Administrator
acrylian   06-07-2011, 08:43
#2

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.

Member
Member
NaturalEnquirer   06-07-2011, 15:40
#3

I wasn't clear enough. On the testing server itself, if I change the above link to:

[img]/nif/galleries/zp-core/i.php?a=flora/carnivorous/sundews&i=Spoonleaf-Sundew-glands.jpg&w=&h=400[/img]
it reports an incorrect path.

Administrator
Administrator
acrylian   06-07-2011, 16:18
#4

/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.

Member
Member
sbillard   06-07-2011, 16:23
#5

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.

Member
Member
NaturalEnquirer   06-07-2011, 21:06
#6

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.

Member
Member
sbillard   06-07-2011, 21:37
#7

turn off the mod_rewrite option on your site. browse to the image you want to link. Copy the browser's address bar.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.