That wasn't directed at you, Nate.

It is the items() method that it giving me the problem. It returns
NOTHING except '<item>'. I originally coded the rss module per the
examples (funny how everybody's _new_ example uses the callback name
'transformRSS').

This is how my code now looks without using items (it works).

<?php
foreach ($blocs as $bloc):
    echo "\n<item>";
    echo "\n<title>".$bloc['Bloc']['title']."</title>";
    echo "\n<link>http://www.example.com/blocs/view/".$bloc['Bloc']
['id']."</link>";
    echo "\n<guid>http://www.example.com/blocs/view/".$bloc['Bloc']
['id']."</guid>";
    echo "\n<description>".htmlentities ($bloc['Bloc']['text'])."</
description>";
//  echo "\n<pubDate>".$bloc['Bloc']['modified']."</pubDate>";
    echo "\n</item>";
endforeach;
?>

This second block, adapted from the example on your blogpage, doesn't
work for me. Perhaps it is a version hiccup - I'm using 1.2.0.6311 or
maybe it's one of those invisible typos:

echo $rss->items($blocs , 'transformRSS');
        function transformRSS($data) {
                return array(
                        'title' => $data['Bloc']['title'],
                        'link'  => array('action' => 'view', 
$data['Bloc']['id']),
                        'guid'  => array('action' => 'view', 
$data['Bloc']['id']),
                        'description' => $data['Bloc']['text'],
                        'pubDate' => $data['Bloc']['modified']
                );
        }

Whatever, I just wanted to query whether there was a known problem
with rss in this particular release before I raised it as a bug
report.

I would have struggled to get this far without your blogpage and also
that of Jiri Kupiainen. Thank you for that!

On Feb 1, 6:03 pm, nate <[EMAIL PROTECTED]> wrote:
> And I was answering a question with a question, as is my custom.  The
> Socratic method: dig it.
>
> Now, as I said, the lack of an <items /> tag is hardly a fatal flaw.
> What's wrong with just doing this:
>
> <items><?=echo $rss->items($posts, 'transformRSS'); ?></items>
>
> On Feb 1, 3:49 am, leo <[EMAIL PROTECTED]> wrote:
>
> > BTW, please note the question mark in the subject line. I was asking
> > not denouncing.
> > eo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to