|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Zend_Feed RSS pubDate fieldHello,
I'm trying to generate an RSS feed via Zend_Feed. The problem is that every single entry gets the the current pubDate value, although before calling Zend_Feed::importArray() the dates are correct. The code is: $feed = array( 'charset' => 'utf-8', 'description' => $this->name . ' – megjegyzések', 'language' => 'hu', 'link' => 'http://' . $_SERVER['SERVER_NAME'] . $this->url(array('view' => 'rss'), 'Comments_Application_Views'), 'title' => $this->name . ' « Megjegyzések « Letöltelek', ); foreach ($this->comments as $comment) { $feed['entries'][] = array( 'description' => $comment['body'], 'guid' => 'http://' . $_SERVER['SERVER_NAME'] . $this->url(array('id' => $this->id), 'Applications_Index') . '#comment' . $comment['id'], 'link' => 'http://' . $_SERVER['SERVER_NAME'] . $this->url(array('id' => $this->id), 'Applications_Index') . '#comment' . $comment['id'], 'published' => date('r', $comment['date']), 'title' => $comment['username'], ); } Zend_Feed::importArray($feed, 'rss')->send(); What should I do different? Thanks, Ádám |
|
|
Re: Zend_Feed RSS pubDate fieldJust a guess, but try changing "published" to "pubDate" in your array.
Joó Ádám wrote: > Hello, > > I'm trying to generate an RSS feed via Zend_Feed. The problem is that > every single entry gets the the current pubDate value, although before > calling Zend_Feed::importArray() the dates are correct. > The code is: > > $feed = array( > 'charset' => 'utf-8', > 'description' => $this->name . ' – megjegyzések', > 'language' => 'hu', > 'link' => 'http://' . $_SERVER['SERVER_NAME'] . > $this->url(array('view' => 'rss'), 'Comments_Application_Views'), > 'title' => $this->name . ' « Megjegyzések « Letöltelek', > ); > > foreach ($this->comments as $comment) { > $feed['entries'][] = array( > 'description' => $comment['body'], > 'guid' => 'http://' . $_SERVER['SERVER_NAME'] . > $this->url(array('id' => $this->id), 'Applications_Index') . > '#comment' . $comment['id'], > 'link' => 'http://' . $_SERVER['SERVER_NAME'] . > $this->url(array('id' => $this->id), 'Applications_Index') . > '#comment' . $comment['id'], > 'published' => date('r', $comment['date']), > 'title' => $comment['username'], > ); > } > > Zend_Feed::importArray($feed, 'rss')->send(); > > What should I do different? > > > Thanks, > Ádám > |
| Free Forum Powered by Nabble | Forum Help |