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: [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