Topic: Most likely an easy question... anyone care to answer?

oh im pretty new to designing websites and all and i am trying to add this cool image gallery (simple viewer) to my site. i am having some troubles with the gallery.xml though... it seems that everytime i change the <filename> line it will either show up as a picture OR a thumbnail. whatever i do i cant get both the thumbnail to link to the image, so that when clicked it shows up larger.

here is what i have for the code (probably wrong)....


<?xml version="1.0" encoding="UTF-8"?>
<simpleviewergallery maxImageWidth="480" maxImageHeight="480" textColor="0xFFFFFF" frameColor="0xFFFFFF" frameWidth="20" stagePadding="40" navPadding="40"

thumbnailColumns="3" thumbnailRows="3" navPosition="left" vAlign="center" hAlign="center" title="SimpleViewer Gallery" enableRightClickOpen="true"

backgroundImagePath="" imagePath="" thumbPath="">
<image>
    <filename>cool_water.jpg</filename>
    <caption></caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption></caption>   
</image>
<image>
    <filename>greenbeverage23.jpg</filename>
    <caption></caption>   
</image>
<image>
    <thumb>greenbeverage23thumb.jpg</thumb>
    <caption>Caption 4</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 5</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 6</caption>
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 7</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 8</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 9</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 10</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 11</caption>   
</image>
<image>
    <filename>cool_waterthumb.jpg</filename>
    <caption>Caption 12</caption>   
</image>

</simpleviewergallery>

Re: Most likely an easy question... anyone care to answer?

For each thumbnail/image combination, create only one <filename>...</filename> entry (and no <thumb>...</thumb> entry) in 'gallery.xml'.

<filename>test.jpg</filename> will look for a file called 'test.jpg' in the 'thumbPath' to use as a thumbnail and will also look for a file called 'test.jpg' in the 'imagePath' to use as the image, regardless of whether the 'thumbPath' and 'imagePath' are the same or not.

Therefore, you can keep imagePath and thumbPath the same and have just one image to be used as both the thumbnail and the image or have separate folders for thumbnails and images but, in this scenario, both the thumbnail and the image must have exactly the same filename.

Steven Speirs
SimpleViewer Support Team.

Re: Most likely an easy question... anyone care to answer?

You can also use buildgallery.php to make the gallery.xml, thumbnails and captions for you automatically.

Regards
Phil
http://www.phillipnorman.com