RSS images

8 posts by 2 authors in: Forums > CMS Builder
Last Post: July 21, 2012   (RSS)

By Jesus - July 19, 2012

Hello,

I'm trying to use the RSS capabilities from CMSB in order to fill an XML file to display my image slider... and I'm getting closer.

I just need to know how can I display my image on the RSS code.

As right now, I'm using this:

<img src="<?php echo $upload['urlPath'] ?>" />

with no luck.

Here's my xml code once it runs:

<slide effectType="scale" horizontalSlices="6" verticalSlices="3" linkTarget="_self" slicePattern="spiralCenterToMarginCW" sliceDelay="80" captionSize="35">
<path><img src="
Notice: Undefined variable: upload in /chroot/my/path/in/here/slider-name.php on line 26
" /></path>
<link>javascript:alert('Set Detail Page Url for this section in: Admin > Section Editors > Viewer Urls')</link>
<caption><![CDATA[Description display here]]></caption>
</slide>


Thanks for the advice.

I think/hope this can be done.

Re: [Jesus] RSS images

By Jason - July 19, 2012

Hi,

Can you attach your PHP file so we can take a look at the code?

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] RSS images

By Jesus - July 19, 2012 - edited: July 19, 2012

Sure, here it is.

Thanks for looking.

I need to adjust the image and the link field as well, the link its a textfield where I'm inserting the http:// url and I don't want/need the ver_articulo.php file in order to have the url link to work.
Attachments:

slider-accesando.php 2K

Re: [Jesus] RSS images

By Jason - July 20, 2012

Hi Jesus,

There are a couple of problems with this script. The first is that in your getRecords() call, you tell CMS Builder not to retrieve uploads.

Try this:

// load records from 'accesando_slider'
list($accesando_sliderRecords, $accesando_sliderMetaData) = getRecords(array(
'tableName' => 'accesando_slider',
'limit' => '5',
'orderBy' => '', // use default database order
'loadUploads' => true,
'allowSearch' => false,
));


Second, you reference a variable called $upload which is never defined and given a value. What is the name of your upload field in your section?
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] RSS images

By Jesus - July 20, 2012

Hi Jason,

What is the name of your upload field in your section?


imagen

Jesus

Re: [Jesus] RSS images

By Jason - July 21, 2012

Hi Jesus,

'_link' is a link that's automatically generated by CMS Builder. If you have a textfield called link that you want to output, try this:

<link><?php echo $record['link'];?></link>

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] RSS images

By Jesus - July 21, 2012

Awesome!

This worked perfectly.

Everyday I'm more convinced this its an awesome tool, I just need to get more involved on the mod_rewrite issu I need to fix, but this its an awesome tool with a better support ;)

Jesus