Member
Member
mowgli597   2011-04-14, 15:25
#1

I'm trying to display a selection of random thumbnails taken from my Zenphoto galleries at the bottom of each page in an existing website (I've replaced an old jAlbum installation with Zenphoto and am trying to reproduce the old site layout.)

Site structure:

root
....\main
....\aaaa
....\bbbb
....\zenphoto
testrandomimages.php

I can get the thumbnails to display fine when calling them from the top-level directory (i.e. the site root) using the page testrandomimages.php as shown above

I do this by using the connection code:

`

`
at the top of the page.

However when I move the file into a sub-directory (e.g. under the \main directory, viz.:

....\main\testrandomimages.php)

I amend the connection code to:

`

`
to allow me to access template-functions.php

This appears to work but no images are being displayed.

The output browser source code is identical in both situations:

`

[list][*]
[img]zenphoto/zp-core/i.php?a=miscellaneous-albums/Corps%20Reunions/Corps%20Reunion%202008&i=Corps+Reunion+2008+%28140%29.jpg&w=115&h=115&cw=115&ch=115&q=75&t=1&wmk=![/img]

[*]
[img]zenphoto/zp-core/i.php?a=brigades-and-squadrons/237%20Signal%20Squadron/237%20Signal%20Squadron%20Reunion%202004&i=237+Reunion+094.jpg&w=115&h=115&cw=115&ch=115&q=75&t=1&wmk=![/img]

[*]

[img]zenphoto/zp-core/i.php?a=divisions-and-regiments/3%20GHQ%20Signal%20Regiment&i=Episkopi+1956+Panorama+from+top+of+tent.jpg&w=115&h=115&cw=115&ch=115&q=75&t=1&wmk=![/img]

[*]
[img]zenphoto/zp-core/i.php?a=troops-and-other-albums/Cyrenaica%20Signal%20Troop&i=1955+Benghazi+004.jpg&w=115&h=115&cw=115&ch=115&q=75&t=1&wmk=![/img]

[/list]

`
The problem thus appears to be with the directories from which the images are being called relative to the calling page's location.

I've tried combinations of inserting root directory into URLs at various points in the code but to no avail.

Any guidance would be much appreciated.

Mike

Member
Member
sbillard   2011-04-14, 20:15
#2

The HREF paths you show above are "relative" so they will descend from the "page" which calls them. Since you moved that page into a subfolder, that will be the root of the HREF.

Try defining WEBPATH as '/zenphoto'

Member
Member
mowgli597   2011-04-14, 21:32
#3

Perfect! That did it.

Many thanks.

Mike

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