1 Replies - 388 Views - Last Post: 18 July 2012 - 10:30 AM

#1 Bluezap  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 315
  • Joined: 19-January 12

Image gallery help

Posted 18 July 2012 - 08:42 AM

Hey i created a gallery using the autoviewer template by simpleview Simpleviewer
Basically for an image to appear on he gallery i have to keep on editing the gallery.xml file linking to the picture that i uploaded to the images directory. Is there any way of modifying this so that the images that i upload to the images directory will automatically show up on the gallery.
<?xml version="1.0" encoding="UTF-8"?>
<gallery frameColor="0xFFFFFF" frameWidth="15" imagePadding="20" displayTime="6" enableRightClickOpen="true">
<image>
   <url>images/wide.jpg</url>
   <caption><![CDATA[<font size="50">Example Gallery</font><br>An example large format <u><a href="http://www.airtightinteractive.com/projects/autoviewer">AutoViewer</a></u> gallery.]]></caption>
   <width>700</width>
   <height>465</height>
</image>
<image>
   <url>images/tall.jpg</url>
   <caption>Pellentesque turpis leo, dignissim ac, vestibulum quis, hendrerit quis, enim.</caption>
   <width>465</width>
   <height>700</height>
</image>
<image>
   <url>images/wide.jpg</url>
   <caption><![CDATA[Captions can be HTML formatted. Supported tags are <b>bold</b>, <u>underline</u>, <i>italics</i>, <u><a href="http://www.google.com" target="_blank">hyperlinks</a></u>, linebreaks<br> and <font color="#ffff00" size="60">font tags</font>.]]></caption>
   <width>700</width>
   <height>465</height>
</image>
<image>
   <url>images/tall.jpg</url>
   <caption>Images can be tall...</caption>
   <width>465</width>
   <height>700</height>
</image>
<image>
   <url>images/wide.jpg</url>
   <caption>...or wide.</caption>
   <width>700</width>
   <height>465</height>
</image>
<image>
   <url>images/tall.jpg</url>
   <caption>Gallery resizes to fit browser window.</caption>
   <width>465</width>
   <height>700</height>
</image>
<image>
   <url>images/wide.jpg</url>
   <caption><![CDATA[Supports non-english characters<br><br>サイトのコンテンツを活用して広告収入を得ることが可能です。サイト訪問者に、内容に関連]]></caption>
   <width>700</width>
   <height>465</height>
</image>
</gallery>


I dont really need any file names or captions to appear i need only the image to appear in the gallery when uploaded to the images directory

This post has been edited by Bluezap: 18 July 2012 - 08:43 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Image gallery help

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4333
  • View blog
  • Posts: 12,128
  • Joined: 18-April 07

Re: Image gallery help

Posted 18 July 2012 - 10:30 AM

From what I can see here in the AutoViewer it has a place where you specify the XML file to load as an HTML option. You could try putting an URL path into it pointing to a server-side script that builds the XML file. I can't guarantee that would work but since it mentions that you can have an absolute URL then it may.

// PHP script would return xml response containing dynamically built 
// list of images in image directory
fo.addVariable("xmlURL", "http://www.example.com/gallerydata.php");



If that won't work then your only other option is to have a simple script that can generate the gallerydata.xml file and that way you can run it every time you add new images and it will build the new XML file for you.

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1