RSS feed error message/Headlines from multiple sections

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

By NigelGordijk - July 23, 2009

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

By NigelGordijk - July 29, 2009 - edited: July 29, 2009

Hi, Ross.

Managed to get most of this working, but with one problem.

http://www.yallaf1.com/index2.php

As you can see, the items are listed with the oldest one at the top and the most recent at the bottom. Please can you tell me how I do this the other way round? The Updates are taken from these two sections - http://www.yallaf1.com/news-latest.php and http://www.yallaf1.com/galleries_video.php - where they are appearing in the correct order.

Also, I've set up the admin for both of these sections - Daily News and Galleries - so that it creates one large image, a medium thumbnail, and a small thumbnail ("Create thumbnail 2"). I'd like the small thumbnail to appear next to the relevant headline, but I can only set this up so that the medium thumbnail shows up. Please can you advise on how I can choose which of the three image sizes appear?

Thanks!
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

By NigelGordijk - July 29, 2009

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

By NigelGordijk - July 29, 2009

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

By NigelGordijk - July 30, 2009

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