see live demo!

Not signed in (Sign In)

Categories

 

buy Monoslideshow

via PayPal / credit card

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorBrianNY
    • CommentTimeAug 26th 2010
     permalink

    Hi.
    I have succeeded in echoing (outputting) the XML needed for MSS, in lieu of a hardcoded .xml file. This allows me to get the image file name (source) and its description from a randomized mysql table. The sample XML output is below. But how do I get this into the MSS function. I have read some of the posts from a year or two ago, but none of them fit my process.

    How do I feed this into MSS ?
    Below is the echoed output in IE . .
    unfortunately Chrome and FF just display the data itself (the image file name & description text, not the raw XML), as though they are interpreting the XML code

    I have deleted many <image> .. </image> to shorten this . .

    ================================================================

    <?xml version="1.0" encoding="utf-8" ?>
    - <album itemPath="album/img" thumbnailPath="album/thumb">
    - <configuration backgroundColor="#487860" randomize="true" delay="20" viewport="16,12,353,220" viewportRoundness="35">
    <transition kenBurnsMode="randomZoomOut" kenBurnsStrength="0.85" kenBurnsTime="17" time="5" type="blend" />
    - <caption backgroundColor="#487860" backgroundAlpha="0.10" backgroundType="fitCompleteText" width="350" margin="20, 228, 10, 15">
    <shadow alpha="0" sizeX="0" sizeY="0" strength="0" />
    <transition delayIn="2.5" delayOut="20" />
    <description color="#FFFFFF" font="Arial Narrow" size="14" />
    </caption>
    <controller position="bottomRight" startHidden="true" disappearDelay="2" disappearMode="fade" autoHide="true" />
    </configuration>
    - <contents>
    - <image>
    <source>i_horseshow_04.jpg</source>
    <description>Horse and rider successfully jump the hurdles at one of Saratoga Springs several horseshows.</description>
    </image>
    - <image>
    <source>mtg02.jpg</source>
    <description>Serious business at the Annual Homeowner Meeting: Board members review progress and answer all questions.</description>
    </image>
    - <image>
    <source>party01.jpg</source>
    <description>Vice President with the Social Committee: Linda Klaus, Nancy Goldberg, Marcia Penfold, Helen Petro and Deloris Myers.</description>
    </image>
    - <image>
    <source>clubhouse-fireplace-1.jpg</source>
    <description>All homeowners have 24-7 access to the clubhouse, recently remodeled with a new TV, gas fireplace, even WI-FI enabled.</description>
    </image>
    - <image>
    <source>horse01.jpg</source>
    <description>Occasionally a horse-drawn carriage enables newlyweds to enjoy the beauty that is uniquely Interlaken.</description>
    </image>
    - <image>
    <source>party05.jpg</source>
    <description>PARTY TIME! Frequent affairs are held by the Social Committee for Interlaken homeowners.</description>
    </image>
    - <image>
    <source>i_tennis_01.jpg</source>
    <description>A group of homeowners pose for a pleasant picture after they enjoyed some round-robin tennis.</description>
    </image>
    - <image>
    <source>i_tennis_coffee_01.jpg</source>
    <description>On the porch. Several homeeowners enjoy a coffee klatch after an hour or two of tennis fun.</description>
    </image>
    - <image>
    <source>putt03.jpg</source>
    <description>The community putting green offers many fun hours while adding to the Interlaken ambiance.</description>
    </image>
    </contents>
    </album>

    ===============================================

  1.  permalink

    You have two choices: Either you create an xml file, take care of the right mime type (that'll be the reason why some browsers don't accept it as xml) and use the "datafile" parameter - that's the obvious solution, but you may run into timing/caching problems (or not, worth a try anyway).
    Secondly, you can put the xml inline (described in the manual "Pass XML directly to Monoslideshow"). This would allow you to create the whole html page (including the xml) in one step, and as my guess is you're creating html pages with php all the time, this may be the right solution for you.
    The result will be identical, so there is no "better" solution.
    Christoph

    Thankful People: BrianNY
    • CommentAuthorBrianNY
    • CommentTimeAug 27th 2010 edited
     permalink

    Thanks again for your helpful advice.

    First let me tell you that I have, since writing the above post, succeeded in generating an XML file containing that text which I had been "echo'ing" out. So now that I have that XML File, I can feed it into my program and the appropriate slide show successfully is displayed, with the images as they were identified in the mysql database and then randomized in PHP.

    For one thing, MSS does not seem to recognize any other file name than monoslideshow.xml, despite what it says on p8 of the manual .. is there more to stipulate a different file name than datafile: "xyzxyz.xml" like it says there? When I name it "brian03.xml", for example, and then stipulate that name in the datafile flashvar parameter (identical to the manual's statement), MSS gives an error message that it cannot find monoslideshow.xml. I can live with that name for now, though.

    explanation: I misspelled it in my code .. I typed datafile instead of dataFile .. that works fine now, whatever XML file name I use (thanks to Jarredja)

    Thus far I have taken this in steps. I generated the xml file in a separate program, and then I ran the slideshow program. That now works fine. Now I will try to put the generation of the XML file into a PHP function that is executed within the main PHP program which displays the slideshow .. this will let me see if I run into the timing/caching issue that Christoph mentions above. If that turns out to be a problem, I am afraid that I will have to see if it is possible to echo the xml statements into the javascript code like that shown in the "Pass XML data directly.." example on p15 of the manual (Christoph's 2nd option).

    At any rate, I want everyone to know that it was relatively easy to generate the XML text into a separate .xml file from a PHP program .. it was just a matter of creating the file and writing to it (via fwrite) instead of echoing it out as I was doing in my original email above.

    Thanks for your interest and your help

    Brian in NY

    • CommentAuthorBrianNY
    • CommentTimeAug 27th 2010
     permalink

    SUCCESS !!

    I now have my sample slideshow running flawlessly .. with the slides and descriptions dictated by entries in a mysql DB table, resequenced each time the slideshow is run. This is done in a PHP (server) program.

    I acquire the slide info (filename and description) from the DB and generate the XML file in one PHP routine, which I then execute at the start of the main PHP program .. the main program uses that XML file in its monoslideshow display.

    So far I have done all this in my home WAMPSERVER development environment (winXP), and it all works fine. I have not run into a cache issue .. the set and sequence of images changes each time I execute the slideshow PHP program.

    I will be happy to help anyone with advice who is trying to do the same thing. When I upload this to the public server I will add that link for all to see.

    I thank Christoph and Jarred profusely for all their help and support.

    Brian in NY

  2.  permalink

    to use a php file ... i.e. whatever.php as the XML file ... what do I need to do to state the mime type? when I try simply renaming the .xml file to .php it gives me an I/O error

    thanx

monokai logo © 2009 Monokai, all rights reserved. Buy Monoslideshow.