Topic: Can I use another .ext other then .xml for the gallery?

I'm writing the gallery pages in Coldfusion and so want the images to to be dynamic. The problem is that when I rename the gallery file to a .cfm extension it refuses to read. Is there a way to accomplish this?

Re: Can I use another .ext other then .xml for the gallery?

I can write an XML file dynamically, however this is going to be used by any number of people at the same time, and they all will be seeing different images based on memberID and if an image has been approved yet.

The module I am repairing used an earlier version of simpleViewer but I don't have all the files to decompile and then recompile, (the ther developer had them hard coded to a different area then I am using).

The file is a standard xml, properly formated, but in order for it to be useful and dynamic I need be able to change the filenames and that requires a .cfm extension.

Re: Can I use another .ext other then .xml for the gallery?

Have you tried setting the galleryURL var to flashvars.galleryURL = "gallery.cfm";?

Mike Richards
SimpleViewer Support Team.

Re: Can I use another .ext other then .xml for the gallery?

You can set the 'galleryURL' to any filename + extension (e.g. PHP, CFM etc).

Felix Turner
SimpleViewer Support Team.

Re: Can I use another .ext other then .xml for the gallery?

Thats very close to what I did.

I actually used flashvars.galleryURL = "gallery.cfm"; and I get the message 'gallery XML not found'. However, if I take that exact file and rename it to gallery.xml, it reads with no problems and displays the image.

Re: Can I use another .ext other then .xml for the gallery?

is the file you are generating utf-8?

Mike Richards
SimpleViewer Support Team.

Re: Can I use another .ext other then .xml for the gallery?

yes... a typical filename with path is

http://beta.swinglifestyle.com/slspictu … Aslssb.jpg

as I said... if I just name the gallery file gallery.xml, it works with no issue.

Re: Can I use another .ext other then .xml for the gallery?

I actually used flashvars.galleryURL = "gallery.cfm"; and I get the message 'gallery XML not found'.

That's odd. SimpleViewer does not care what the filename is, as long as the file content is UTF-8 XML. I just tried it locally here and it works fine. Possibly your webserver handles cfms differently somehow?

Felix Turner
SimpleViewer Support Team.

Re: Can I use another .ext other then .xml for the gallery?

here is the actual .cfm or .xml file...

<?xml version="1.0" encoding="UTF-8"?>
<simpleviewergallery
    galleryStyle="CLASSIC"
    thumbPosition="NONE"
    textColor="FFFFFF"
    frameColor="FFFFFF"
    frameWidth="20"
    showOpenButton="FALSE"
    showFullscreenButton="FALSE"   
    maxImageWidth="600"
    maxImageHeight="600"
    useFlickr="false"
    flickrUserName=""
    flickrTags=""
    languageCode="AUTO"
    languageList=""    >
<image imageURL="http://beta.swinglifestyle.com/slspictures/DrMarkus/27291485.4771505ADF98-BDA8-8265-7854B6333B7758AAslssb.jpg" thumbURL="" linkURL="" linkTarget="" >
<caption></caption>   
</image>
</simpleviewergallery>

as I said, the exact same file when it ends in .xml shows the image, and in .cfm it says it can not parse gallery XML

Re: Can I use another .ext other then .xml for the gallery?

ok... I believe I resolved the issue.

My object creation line was

swfobject.embedSWF("/slsviewer/simpleviewer.swf", "flashContent", "600", "600", "9.0.124", FALSE, flashvars, params);

I did some looking around and could not find the use for the FALSE param, so I removed it and renamed the file to .cfm. Lo and behold, it works.

Thanks for all the effort.
Marcus

Re: Can I use another .ext other then .xml for the gallery?

I'm back...

Seems the false param in the swfobject.embedSWF is to refresh the mem or something, and so it never even bothers to look at the flashvars.galleryURL = "publicgallery.cfm";.

The script still will not read the galleryURL if it is a .cfm, but the exact same file as a .xml is read without a problem.

oh, and even though I own the pro version, the download branding is still at the bottom.

Last edited by DrMarcus (2009-12-09 16:04:29)

Re: Can I use another .ext other then .xml for the gallery?

Just wondering if this still applies with version 2.1.1 ?  When I look at the code the gallery viewer is displayed with JQuery:

    <script type="text/javascript">
    jQuery(document).ready(function () {
        SV.simpleviewer.load('sv-container', '100%', '100%', '222222', true );
    });
    </script>

I would like to know how to change the filename of gallery.xml ? I want to add a random number at the end of the xml name so I don't have to worry about caching problems.

Thanks

Re: Can I use another .ext other then .xml for the gallery?

The gallery's XML file can be named via a flashvar using code such as:

<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery.xml";
jQuery(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>

See this section for details: http://simpleviewer.net/simpleviewer/su … tml#params

Steven Speirs
SimpleViewer Support Team.