RSS images
8 posts by 2 authors in: Forums > CMS Builder
Last Post: July 21, 2012 (RSS)
By Jesus - July 19, 2012
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
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
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.
Re: [Jesus] RSS images
By Jason - July 20, 2012
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
What is the name of your upload field in your section?
imagen
Jesus
Re: [Jesus] RSS images
By Jesus - July 20, 2012
I made it with the images!!!
Now, I need to adjust the link value.
Here's what I've.
I add a text field, named: Link (filed name: link), where I copy the link I'll like to include on my slider image.
Now, on my template I'm using this:
<link><?php echo $record['_link'] ?></link>
and this gets the "article" link, not the link I'm writing on my text field.
I think this its probably because I used the same or a very similar name between link & _link
Will you please help me solve this? It seems like a less complicated thing that the one I was doing with the images.
Thanks for your help!
Jesus
Re: [Jesus] RSS images
By Jason - July 21, 2012
'_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
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