XML issue
10 posts by 2 authors in: Forums > CMS Builder
Last Post: August 10, 2010 (RSS)
By s2smedia - August 10, 2010
here is my xml.php code:
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<?php
// load viewer library
$libraryPath = 'admin/lib/viewer_functions.php';
$dirsToCheck = array('XXXX');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($homepage_slidesRecords, $homepage_slidesMetaData) = getRecords(array(
'tableName' => 'homepage_slides',
));
?>
<data>
<!-- banner config setting -->
<setting>
<version>1.0</version>
<!-- banner size -->
<size>499,231</size>
<!-- autoplay or not when init ( 1 or 0 ) -->
<autoplay>1</autoplay>
<!-- slide time (second) -->
<slidetime>5</slidetime>
<!-- tween motion setting -->
<tweentime>1.2</tweentime>
<tweentype>easeInOutBack</tweentype>
<!-- h or v or r (horizontal or vertical or random), mask motion direction-->
<direction>r</direction>
<!-- text tween motion setting -->
<texttweentime>0.8</texttweentime>
<texttweentype>easeInOutBack</texttweentype>
</setting>
<!-- banner data source -->
<?php foreach ($homepage_slidesRecords as $record): ?>
<?php foreach ($record['image_upload'] as $upload): ?>
<banner>
<image imageurl="<?php echo $upload['urlPath'] ?>" link="<?php echo $record['link'] ?>"></image>
<text><![CDATA[<font color="#FFFFFF"><a href="<?php echo $record['link'] ?>"><u><?php echo $record['headline'] ?></u></a></font>]]></text>
</banner>
<?php endforeach ?>
<?php endforeach ?>
</data>
Here a link to view the xml.php file and see what it displays:
http://www.vandrewalbanomilam.com/test/xml/data.xml.php
Re: [s2smedia] XML issue
By Donna - August 10, 2010
It looks like it's displaying correctly (try viewing the source to see the actual output, it won't format correctly in a browser.) Can you send an example of what the output should be?
--
support@interactivetools.com
Re: [Donna] XML issue
By s2smedia - August 10, 2010
http://www.vandrewalbanomilam.com/test/xml/data.xml
Heres php version:
http://www.vandrewalbanomilam.com/test/xml/data.xml.php
Re: [s2smedia] XML issue
By Donna - August 10, 2010
The two files are actually identical (although your .xml example has an extra entry.) The view in the web browser is misleading -- it's just guessing how you want it displayed, but overall is pretty irrelevent. Whatever you have parsing that XML file (because XML is pretty useless without being parsed) should have no problem with the .php version. :)
If you view the source of the .php version, you'll see that aside for some different spacing, the two files are identical, and that's all the XML parser cares about -- it doesn't matter how it displays in a browser.
--
support@interactivetools.com
Re: [Donna] XML issue
By s2smedia - August 10, 2010
http://www.vandrewalbanomilam.com/test/index2.php
the number counter should say "1/2" since I have 2 records
then it just gets stuck after the 1st one shows
Re: [s2smedia] XML issue
By Donna - August 10, 2010
--
support@interactivetools.com
Re: [Donna] XML issue
By s2smedia - August 10, 2010
this is pulling in content via just .xml
http://www.vandrewalbanomilam.com/test/index2.html
this is pulling in content via .php.xml
http://www.vandrewalbanomilam.com/test/index2.php
i just triple checked in cms and there are 2 records
Re: [s2smedia] XML issue
By Donna - August 10, 2010
Well, your PHP XML file definitely only has one listing showing, so the issue is related to that (the XML file itself is fine.) Can you fill out a support request form? You'll find that here:
http://www.interactivetools.com/support/email_support_form.php
--
support@interactivetools.com
Re: [Donna] XML issue
By s2smedia - August 10, 2010
I changed the php code to the following:
<data>
<!-- banner config setting -->
<setting>
<version>1.0</version>
<!-- banner size -->
<size>499,231</size>
<!-- autoplay or not when init ( 1 or 0 ) -->
<autoplay>1</autoplay>
<!-- slide time (second) -->
<slidetime>5</slidetime>
<!-- tween motion setting -->
<tweentime>1.2</tweentime>
<tweentype>easeInOutBack</tweentype>
<!-- h or v or r (horizontal or vertical or random), mask motion direction-->
<direction>r</direction>
<!-- text tween motion setting -->
<texttweentime>0.8</texttweentime>
<texttweentype>easeInOutBack</texttweentype>
</setting>
<!-- banner data source -->
<?php foreach ($homepage_slidesRecords as $record): ?>
<banner>
<?php foreach ($record['image_upload'] as $upload): ?>
<image imageurl="<?php echo $upload['urlPath'] ?>" link="<?php echo $record['link'] ?>"></image>
<?php endforeach ?>
<text><![CDATA[<font color="#FFFFFF"><a href="<?php echo $record['link'] ?>"><u><?php echo $record['headline'] ?></u></a></font>]]></text>
</banner>
<?php endforeach ?>
</data>
now its showing theres 2 records.. but its not loading any images.. http://www.vandrewalbanomilam.com/test/index2.php
Re: [s2smedia] XML issue
By Donna - August 10, 2010
<banner>
<text><![CDATA[<font color="#FFFFFF"><a href="action.html"><u>JOIN THE FIGHT FOR REAL REFORM!</u></a></font>]]></text>
</banner>
The second entry does have an image showing.
Were you able to fill out a support request?
--
support@interactivetools.com