daniish
Posts: 42
Joined: Sat Jan 27, 2007 3:30 pm

Can controlbar cycle thru all images from the same folder?

Hello,

I am using a Highslide to open images on my site (www.globexposure.net/index.php). At present the only image can be seen by clicking on the Norwich (SE England) pushpin marker, followed by the green arrow and then the round icon.

How do I get the navigation arrows to cycle through all images that are in the same folder (in this case /travel_pics/72/) as the displayed image?


Many thanks for your help
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Highslide runs on the client and can't read directly from a folder on the server, but you can use the PHP code seen at http://highslide.com/forum/viewtopic.php?t=118 to print Highslide markup.
daniish
Posts: 42
Joined: Sat Jan 27, 2007 3:30 pm

I've managed to use PHP to populate a Javascript array with the images i need - but please can you tell me how i can pass this array and its contents to Highslide?


Many thanks
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Instead of popuplating a JS array with the filenames from the server, you should use PHP to generate HTML like in the example I showed you. It creates accessible thumbnails and links to the large image.
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

Instead of populating a JS array with the filenames from the server, you should use PHP to generate HTML like in the example I showed you. It creates accessible thumbnails and links to the large image.
daniish
Posts: 42
Joined: Sat Jan 27, 2007 3:30 pm

The problem is that i don't want the thumbnails to be visible. Instead i will just use select images on my blog - and when these are clicked i want to be able to cycle thru the images in a particular folder using the previous/next buttons inherent in Highslide.

With this in mind, can you tell me if i am on the right track ?

...and please can you tell me the default name of the JS array ?
(i need to alter it so that it points to my custom array, holding the image filenames from my server)
Last edited by daniish on Mon Oct 13, 2008 7:19 pm, edited 1 time in total.
torstein.honsi
Site Admin
Posts: 9215
Joined: Thu Nov 09, 2006 11:22 am
Location: Vik i Sogn, Norway

If you want Highslide to pull the data from a JS array, you'll have to write the code for it, so it's better that you use the normal HTML markup. Highslide has no default image array, the default is HTML anchors opening images one by one.

To make the thumbnails invisible, just put them inside an invisible div like this:

Code: Select all

<div style="display:none">
	<a href="image1.jpg" onclick="return hs.expand(this)"></a>
	<a href="image2.jpg" onclick="return hs.expand(this)"></a>
</div>
See http://highslide.com/example-mini-gallery.html for ideas. If you combine this example with the PHP code I gave you, I think you'll get exactly what you have in mind.

Return to “Highslide JS Usage”