Re: Making RSS feeds with CakePHP

2008-02-13 Thread Dr. Tarique Sani

On Thu, Feb 14, 2008 at 6:36 AM, xmihu <[EMAIL PROTECTED]> wrote:
>
>  Thank you for your answer.
>  But my link is http://localhost/posts.rss

You are right now getting an rss for the index action of your posts
controller - right?

Now if you want the results from your posts/index to be filtered for
just one author you should alter the index action to do it - which
typically would be allowing it to accept some params - and the URL
will now look something like http://localhost/posts/index/authorname

Now if you do http://localhost/posts/index/authorname.rss you will
have the rss for that particular author

If you have not understood what I have written - then as a first step
figure out how to get all the posts of a particular author on a single
page - we will take it further from there.

T

-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-02-13 Thread xmihu

Thank you for your answer.
But my link is http://localhost/posts.rss


On Feb 13, 7:21 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:

> http://localhost/posts/view/1.rss
>
> HTH
>
> Tarique
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-02-13 Thread Dr. Tarique Sani

On Feb 13, 2008 3:21 PM, xmihu <[EMAIL PROTECTED]> wrote:
> The same as http://localhost/posts/view/1

http://localhost/posts/view/1.rss

HTH

Tarique


-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-02-13 Thread xmihu

If I want to add a parameter that how do?
Only RSS someone's posts
The same as http://localhost/posts/view/1
thanks a lot

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-28 Thread Matias Lespiau
>
> You're exactly right, thank you *very* much!


You're welcome =).

-- 
Matias Lespiau
http://www.gignus.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-28 Thread Siegfried Hirsch
Hello Zoe,

I have just used the rsshelper over the weekend and have it done exactly as
in
Nate sample:

$search.' Suche via RSS-Suchmaschine');
$this->pageTitle = $search.' gesucht via RSS-Suchmaschine.de';
echo $rss->items($data, 'transformRSS');

function transformRSS($data) {

return array(

'title' => $data['Feed']['titel'],
'link'  => $data['Feed']['xmlurl'],
'guid'  => array('action' => 'view', $data['Feed']['id']),
'description' => $data['Feed']['description'],
//'author' => $data['User']['name'],
'pubDate' => $data['Feed']['modified']

);

}
?>

Just used pageTitle to set the title of the feed. Works like expected ;)

2008/1/28, MonkeyGirl <[EMAIL PROTECTED]>:
>
>
>
> So to answer my original question, the fix is to do a foreach loop on
> the array first, transforming the content with helpers, and *then* use
> $rss->items after that.
>
>

-- 
Siegfried Hirsch

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-28 Thread MonkeyGirl

> If you are following the example given by Nate, I think your problem might
> be that you're trying to access the helpers inside the callback function,
> and they are out of the scope there.
>
> You should truncate the data before passing it to the RSS function or see
> how to pass the helper as a parameter to the function.

You're exactly right, thank you *very* much! I foolishly assumed
CakePHP was somehow hiding or not calling in the helpers (I should
never assume anything...), when the actual problem was that I was
trying to call the helpers form within the transformRSS function I'd
made.

So to answer my original question, the fix is to do a foreach loop on
the array first, transforming the content with helpers, and *then* use
$rss->items after that.

Thanks again!
Zoe.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-28 Thread Matias Lespiau
Zoe,

If you are following the example given by Nate, I think your problem might
be that you're trying to access the helpers inside the callback function,
and they are out of the scope there.

You should truncate the data before passing it to the RSS function or see
how to pass the helper as a parameter to the function.



-- 
Matias Lespiau
http://www.gignus.com/


On Jan 28, 2008 8:45 AM, MonkeyGirl <[EMAIL PROTECTED]> wrote:

>
> Thanks for the links everyone! To answer my own first question, then:
>
> > 1. How can I tell if someone's requesting the RSS version of a page or
> > the regular HTML version? At the moment, I've got this in my
> > controller:
> >
> >   if ($this->RequestHandler->__renderType == 'rss')
>
> I've replaced that with this, which seems right:
>
> if ($this->RequestHandler->isRss())
>
> But I'm still not sure how to fix this:
>
> > 2. The RSS feed doesn't know about all the helpers I specify in my
> > app_controller.php file. How can I tell it about them?
>
> I'm trying to truncate the content of each item in the RSS feeds,
> which uses the Text helper. It looks like the Rss helper is
> automatically overriding that, and I'm not sure how to include it back
> in again.
>
> I looked at all the helper related information in all the links you
> provided, but the only helper specific line I could find was about
> $rss->items, pertaining to the RSS helper itself.
>
> I'm sure I'm just missing one very simple thing at this point but if
> anyone could just directly tell me what it is, it'd really help me
> out!
>
> Thanks again,
> Zoe.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-28 Thread MonkeyGirl

Thanks for the links everyone! To answer my own first question, then:

> 1. How can I tell if someone's requesting the RSS version of a page or
> the regular HTML version? At the moment, I've got this in my
> controller:
>
>   if ($this->RequestHandler->__renderType == 'rss')

I've replaced that with this, which seems right:

if ($this->RequestHandler->isRss())

But I'm still not sure how to fix this:

> 2. The RSS feed doesn't know about all the helpers I specify in my
> app_controller.php file. How can I tell it about them?

I'm trying to truncate the content of each item in the RSS feeds,
which uses the Text helper. It looks like the Rss helper is
automatically overriding that, and I'm not sure how to include it back
in again.

I looked at all the helper related information in all the links you
provided, but the only helper specific line I could find was about
$rss->items, pertaining to the RSS helper itself.

I'm sure I'm just missing one very simple thing at this point but if
anyone could just directly tell me what it is, it'd really help me
out!

Thanks again,
Zoe.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-27 Thread R. Rajesh Jeba Anbiah

On Jan 28, 4:21 am, MonkeyGirl <[EMAIL PROTECTED]> wrote:
> I'm trying to set up some RSS feeds using CakePHP.
   

  FWIW, http://groups.google.com/group/cake-php/web/frequent-discussions

--
  
Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-27 Thread nate

Oh, it gets better: http://cake.insertdesignhere.com/posts/view/8

On Jan 27, 6:21 pm, MonkeyGirl <[EMAIL PROTECTED]> wrote:
> Hi again!
>
> I'm trying to set up some RSS feeds using CakePHP. I'm very impressed
> at how easy and automated this process is, it's great! After a lot of
> searching, this backup of someone explaining how they did it was a
> great help:
>
> http://web.archive.org/web/20070601202250/jirikupiainen.com/2007/05/3...
>
> I based my code on this, and for the most part, it just works without
> having to change much. I just have two questions though:
>
> 1. How can I tell if someone's requesting the RSS version of a page or
> the regular HTML version? At the moment, I've got this in my
> controller:
>
>   if ($this->RequestHandler->__renderType == 'rss')
>
> It seems to work, but looks like it may not be the way I'm supposed to
> do it, and I'm eager to learn the correct way to do things.
>
> 2. The RSS feed doesn't know about all the helpers I specify in my
> app_controller.php file. How can I tell it about them?
>
> Thank you very much,
> Zoe.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Making RSS feeds with CakePHP

2008-01-27 Thread Dardo Sordi Bogado

http://manual.cakephp.org/chapter/request_handler

On Jan 27, 2008 9:21 PM, MonkeyGirl <[EMAIL PROTECTED]> wrote:
>
> Hi again!
>
> I'm trying to set up some RSS feeds using CakePHP. I'm very impressed
> at how easy and automated this process is, it's great! After a lot of
> searching, this backup of someone explaining how they did it was a
> great help:
>
> http://web.archive.org/web/20070601202250/jirikupiainen.com/2007/05/30/creating-rss-feeds-with-cakephp-12/
>
> I based my code on this, and for the most part, it just works without
> having to change much. I just have two questions though:
>
> 1. How can I tell if someone's requesting the RSS version of a page or
> the regular HTML version? At the moment, I've got this in my
> controller:
>
>   if ($this->RequestHandler->__renderType == 'rss')
>
> It seems to work, but looks like it may not be the way I'm supposed to
> do it, and I'm eager to learn the correct way to do things.
>
> 2. The RSS feed doesn't know about all the helpers I specify in my
> app_controller.php file. How can I tell it about them?
>
> Thank you very much,
> Zoe.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Making RSS feeds with CakePHP

2008-01-27 Thread MonkeyGirl

Hi again!

I'm trying to set up some RSS feeds using CakePHP. I'm very impressed
at how easy and automated this process is, it's great! After a lot of
searching, this backup of someone explaining how they did it was a
great help:

http://web.archive.org/web/20070601202250/jirikupiainen.com/2007/05/30/creating-rss-feeds-with-cakephp-12/

I based my code on this, and for the most part, it just works without
having to change much. I just have two questions though:

1. How can I tell if someone's requesting the RSS version of a page or
the regular HTML version? At the moment, I've got this in my
controller:

  if ($this->RequestHandler->__renderType == 'rss')

It seems to work, but looks like it may not be the way I'm supposed to
do it, and I'm eager to learn the correct way to do things.

2. The RSS feed doesn't know about all the helpers I specify in my
app_controller.php file. How can I tell it about them?

Thank you very much,
Zoe.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---