Multi Line External Captions in SSP

6 posts by 3 authors in: Forums > CMS Builder
Last Post: June 1, 2009   (RSS)

Re: [gkornbluth] Multi Line External Captions in SSP

By ross - May 29, 2009

Hi there

Thanks for posting!

I don't quite understand what you are aiming for here. Could you show me an example? Both a link to a page and attaching a copy of the template would be best case scenario :).

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Multi Line External Captions in SSP

By gkornbluth - May 29, 2009 - edited: May 29, 2009

Thanks Ross,

Here's the xml.php code

<?php header('Content-type: application/xml; charset=utf-8'); ?><?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<?php

require_once "/hsphere/local/home/apbcweb/artistsofpalmbeachcounty.org/cmsAdmin/lib/viewer_functions.php";

list($artavox_slidesRecords, $artavox_slidesMetaData) = getRecords(array(
'tableName' => 'artavox_slides',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$artavox_slidesRecord = @$artavox_slidesRecords[0]; // get first record

?>


<gallery>
<album title="Artavox Slide Show" description="Test of Artivox Slide Show" lgpath="/cmsAdmin/uploads/" tnpath="/cmsAdmin/uploads/thumb2/">
<?php foreach ($artavox_slidesRecord['images'] as $upload): ?>
<img src="<?php echo $upload['filename'] ?>" caption="<?php echo $upload['info1'] ?>" />
<?php endforeach ?>
</album>
</gallery>


And here's the viewer page code:



<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="500" id="artavox" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="artavoxslideshow.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="FlashVars" value="xmlfile=artavoximages.xml.php?<?php echo $artavox_slidesRecord['num'] ?>" />
<embed flashvars="xmlfile=artavoximages.xml.php?<?php echo $artavox_slidesRecord['num'] ?>" src="artavoxslideshow.swf" quality="best" wmode="transparent" width="550" height="500" name="artavox" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


the link to the page is:

http://www.artistsofpalmbeachcounty.org/artivox.php

I can't seem to use formatting in the info1 field or use multiple info fields without SSP crashing or, as in the first slide, displaying the html code for italics instead if making the text appear as italic text.

I've expanded the explanation in my first post in this thread. What other information would you find helpful?

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Multi Line External Captions in SSP

By ross - June 1, 2009

Hi Jerry

I think what I am trying to figure out here is if the problem is just that you are getting the tags being displayed instead of parsed (displaying them instead of using them).

Or were you looking to find a different way of doing all this?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Multi Line External Captions in SSP

By gkornbluth - June 1, 2009

Thanks Ross,

You're right. The main issue is that I'm getting the tags displayed instead of parsed

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Multi Line External Captions in SSP

By Dave - June 1, 2009

A couple suggestions here:

- The best approach is to reduce the problem to make it as simple as possible. See if you can get it working with a plain text xml file. It's way faster to "test" things that way. Once that's working get CMS to reproduce that text file (with database content).

- Next, make sure your XML is valid, that may be causing the crashes. You can't have quotes inside quotes in tags. Here's some code to replace quotes:

... caption="<?php echo htmlspecialchars($upload['info1']) ?>" />

You can read about that function here:
http://ca.php.net/htmlspecialchars

Let me know if either of those suggestions helps!
Dave Edis - Senior Developer
interactivetools.com