Topic: How to change the path for the images?

I've been looking for a quick and exact answer through the forums, but i had no luck

I want autoviewer to load the images from a different folder called imgs,  how can i change the path for the images ?, i already tried  ( imagePath="/imgs" ) in the XML, but that didn't work.

Thank you

Re: How to change the path for the images?

Edit your gallery.xml in a text editor and change <filename>images/anImage.jpg</filename> to <filename>imgs/anImage.jpg</filename>, use Find and Replace to automate.

Mike Richards
SimpleViewer Support Team.

Re: How to change the path for the images?

thanks for the quick reply, i did what you told me but it didn't worked

Originally i had:

<image>
   <filename>example.jpg</filename>
   <caption>Test Image</caption>
   <width>640</width>
   <height>480</height>
</image>

With your suggestion, i made it:

<image>
   <filename>imgs/example.jpg</filename>
   <caption>Test Image</caption>
   <width>640</width>
   <height>480</height>
</image>

but now i have the X's

Last edited by davidarcila (2010-01-02 03:55:55)

Re: How to change the path for the images?

I'm sorry if im having some problems, website programming is not my specialty.

Now i have another problem, i embedded autoviewer in an html page, and everything works perfect, except that now i have a grey box on top of my website.

How can i remove it?

Any help would be appreciated.
Thank You

Re: How to change the path for the images?

Please post the urls of the galleries you are having issues with.

Mike Richards
SimpleViewer Support Team.

Re: How to change the path for the images?

oh, of course, this is the website i'm testing www.davidarcila.com click on Portfolio to open autoviewer, before embedding autoviewer in the html, the website was centered, but then the gray box appeared on top. (I'm also using Shadowbox Media Viewer)

Last edited by davidarcila (2010-01-02 17:10:21)

Re: How to change the path for the images?

You have div tags in the head of your doc and both of them have the same ID, the divs are probably causing the box to appear. If you want the divs in your page you need to find the right place for them in your body and they need to have unique IDs. Below is a copy of your HTML without the divs in the head and validation errors fixed. In the future you can check out http://validator.w3.org/ to find issues with your page. Checking for errors really helps getting the page working in all browsers.

<div id="flashcontent">AutoViewer requires JavaScript and the Flash Player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>    
<script type="text/javascript">
var fo = new SWFObject("autoviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");    
</script>

<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">AutoViewer requires JavaScript and the Flash Player. 
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>    
<script type="text/javascript">
var fo = new SWFObject("autoviewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");    
</script>



here is your html without errors and the divs removed.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>David Arcila - Audiovisual Artist</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/animated_favicon.gif" type="image/gif" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" type="text/css" href="shadowbox.css" />
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({players: ["iframe"]});
</script>

<script type="text/javascript" src="swfobject.js"></script>

<style type="text/css">
<!--
body {
    background-color: #000;
}
a:visited {
    color: #000;
    text-decoration: none;
}
a:link {
    color: #000;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
    color: #000;
}
a:active {
    text-decoration: none;
    color: #000;
}
-->
</style></head>
<body  style="margin:0px;">
<!-- Save for Web Slices (low_buttons2.psd) -->

<table width="978" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
    <tr>
        <td rowspan="5">
            <img src="images/index_01.jpg" width="124" height="720" alt="" /></td>
        <td rowspan="3">
            <img src="images/index_02.jpg" width="45" height="633" alt="" /></td>
        <td colspan="5">
            <img src="images/index_03.jpg" width="640" height="194" alt="" /></td>
        <td rowspan="3">
            <img src="images/index_04.jpg" width="45" height="633" alt="" /></td>
        <td rowspan="5">
            <img src="images/index_05.jpg" width="124" height="720" alt="" /></td>
    </tr>
    <tr>
        <td colspan="5">
            <img src="images/index_06.jpg" width="640" height="360" alt="" /></td>
    </tr>
    <tr>

        <td colspan="5">
            <img src="images/index_07.jpg" width="640" height="79" alt="" /></td>
    </tr>
    <tr>
        <td colspan="2"><a href="about.html" rel="shadowbox;height=345;width=641"><img src="images/index_08.jpg" alt="" width="156" height="26" border="0" /></a></td>
        <td rowspan="2">
            <img src="images/index_09.jpg" width="45" height="87" alt="" /></td>
        <td><a href="portfolio.html" rel="shadowbox;height=769;width=1025"><img src="images/index_10.jpg" alt="" width="270" height="26" border="0" /></a></td>
        <td rowspan="2">

            <img src="images/index_11.jpg" width="25" height="87" alt="" /></td>
        <td colspan="2"><a href="contact.html" rel="shadowbox;height=220;width=538"><img src="images/index_12.jpg" alt="" width="234" height="26" border="0" /></a></td>
    </tr>
    <tr>
        <td colspan="2">
            <img src="images/index_13.jpg" width="156" height="61" alt="" /></td>
        <td>
            <img src="images/index_14.jpg" width="270" height="61" alt="" /></td>
        <td>
            <img src="images/index_15.jpg" width="189" height="61" alt="" /></td>
        <td>
            <img src="images/index_16.jpg" width="45" height="61" alt="" /></td>
    </tr>
    <tr>
        <td>
            <img src="images/spacer.gif" width="124" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="45" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="111" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="45" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="270" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="25" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="189" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="45" height="1" alt="" /></td>
        <td>
            <img src="images/spacer.gif" width="124" height="1" alt="" /></td>
    </tr>
</table>
<!-- End Save for Web Slices -->

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=5432461; 
var sc_invisible=1; 
var sc_partition=53; 
var sc_click_stat=1; 
var sc_security="6605e0f4"; 

</script>

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="blogger statistics"
href="http://www.statcounter.com/blogger/"
target="_blank"><img class="statcounter"
src="http://c.statcounter.com/5432461/0/6605e0f4/1/"
alt="blogger statistics" /></a></div></noscript>
<!-- End of StatCounter Code -->

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6429310-3");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>
</html>
Mike Richards
SimpleViewer Support Team.

Re: How to change the path for the images?

wow, Miker, thank you very much, it worked perfectly. I don't have very deep knowledge in html coding, but i will use the w3 validator from now on.

PD.: About the XML issue, i tried your suggestion, but it didn't worked

Re: How to change the path for the images?

As to the images in another folder where is your gallery.xml located? http://www.davidarcila.com/gallery.xml is giving me a 404 not found error.

Mike Richards
SimpleViewer Support Team.

Re: How to change the path for the images?

oh! I found the solution here: http://www.simpleviewer.net/forum/viewtopic.php?id=181

The solution was to add ../ before the path e.g

<filename>../imgs/example.jpg</filename>

Thanks Miker for your help and very fast assistance

Last edited by davidarcila (2010-01-02 18:16:43)

Re: How to change the path for the images?

Ok if it s called gallerydata.xml you need to add fo.addVariable("xmlURL", "gallerydata.xml"); to the portfolio.html

<script type="text/javascript">
        var fo = new FlashObject("viewer.swf", "viewer", "100%", "100%", "8", "#0F0F0F");       
        fo.addParam("scale", "noscale");
        fo.addVariable("xmlURL", "gallerydata.xml");
        fo.write("flashcontent");   
</script>

Mike Richards
SimpleViewer Support Team.

Re: How to change the path for the images?

hehe, thx big_smile I edited my previous post smile