Multi Line External Captions in SSP

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

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

Hi all,

I’m trying to create multi line external captions for a slide show in SSP and have two challenges.

Using SSP’s instructions I can get a single line caption to display by entering the text into the CMSB image upload info1 field and inserting caption="<?php echo $upload['info1'] ?>" into my xml.php file code.

To format the caption text SSP's examples uses HTML elements encoded with character entities to create line breaks and text formatting. Like &lt;b&gt;bold text&lt;/b&gt; for bolding, and &lt;br&gt; for a line break.

When I insert these in the info1 field text, instead of bolding the text, the result is <b>bold text</b> instead of boled text and a <br> instead of creating a line break.

I’d really prefer to use multiple upload info fields with different formatting and line breaks but can’t seem to get more than one info field (with no formatting) to display.

When I try to use multiple info fields in the xml.php file, SSP crashes.

Has anyone succeeded in doing this before?

Best,

Jerry Kornbluth
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 - 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