RSS feed error message/Headlines from multiple sections

18 posts by 4 authors in: Forums > CMS Builder
Last Post: July 30, 2009   (RSS)

Thanks, Ross. I'll give this a try.
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] RSS feed error message/Headlines from multiple sections

By Dave - July 29, 2009

Hi Nigel,

Let's start with the sorting problem, try reverse the variable names in the custom sorting function we wrote for you:

function _sortByDate($recordA, $recordB) {
return strcmp($recordB['createdDate'], $recordA['createdDate']);
}


Let me know if that fixes the sort order for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] RSS feed error message/Headlines from multiple sections

Perfect! Thanks.

Any advice on the thumbnails, please?
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] RSS feed error message/Headlines from multiple sections

By Dave - July 29, 2009

Great, so the sorting is working?

>Any advice on the thumbnails, please?

Yes, if you're using these variables to display an image:
<?php echo $upload['urlPath'] ?>
<?php echo $upload['width'] ?>
<?php echo $upload['height'] ?>

You can use this to access the first thumbnail:
<?php echo $upload['thumbUrlPath'] ?>
<?php echo $upload['thumbWidth'] ?>
<?php echo $upload['thumbHeight'] ?>

And this to access thumbnails 2 through 4
<?php echo $upload['thumbUrlPath2'] ?>
<?php echo $upload['thumbWidth2'] ?>
<?php echo $upload['thumbHeight2'] ?>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] RSS feed error message/Headlines from multiple sections

Unfortunately, I'm getting an error message when I add that code: http://www.yallaf1.com/index2.php. Might this be because the Daily News section doesn't have any images, only the Galleries section does?

Also, I just noticed that the Updates list on this page seems to be omitting the most recent headline taken from the Daily News section. You can see the full list of Daily News headlines here: http://www.yallaf1.com/index.php. Any idea why the latest headline is missing, please?
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] RSS feed error message/Headlines from multiple sections

By Dave - July 30, 2009

Yes, you're only going to be able to display images or thumbnails if the section has been configured to have uploads and thumbnails.

>Any idea why the latest headline is missing, please?

I'm not sure, I'd check if the record is hidden, or has a publishDate or removeDate field. Or anything in a "where" option that might be filtering it out.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] RSS feed error message/Headlines from multiple sections

Thanks, Dave.

I figured out why the errant headline wasn't appearing at the top. The article was created a few days ago, but gets updated every day (it's tracking the medical condition of a Formula 1 driver who was injured in a crash).

Cheers,
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net