Yii Framework Forum: [EXTENSION] Webfeed - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Webfeed Rate Topic: -----

#1 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 21 June 2009 - 11:02 AM

The webfeed extension lets you create RSS 1.0, RSS 2.0 and Atom 1.0 webfeeds. The classes follow the specifications as close as possible. No extensions are implemented yet (TODO). Also, it could be converted into an application module (TODO)

http://www.yiiframew...tension/webfeed

Please try it and post your comments, doubts and but reports here. Collaborations are welcomed.
0

#2 User is offline   mbi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 608
  • Joined: 08-May 09

Posted 28 June 2009 - 11:04 AM

I tried the example from the doc but:
Use of undefined constant RSS_0_91 - assumed 'RSS_0_91'
0

#3 User is offline   mbi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 608
  • Joined: 08-May 09

Posted 28 June 2009 - 11:11 AM

class constructor of RSS_0_92  is named "__construct__construct"
0

#4 User is offline   mbi 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 608
  • Joined: 08-May 09

Posted 28 June 2009 - 05:18 PM

I did't get this to work
implemented feedcreator instead
0

#5 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 30 June 2009 - 12:25 PM

Updated to 1.0b (fixed the typo in the RSS 2.0 constructor and updated the example for RSS 2.0 since the posted came from an older version) Should work now :)
0

#6 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 09 July 2009 - 04:32 AM

The same error remains. More over, there are several errors, there is no definition about RSS_1_0 for instance.
0

#7 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 09 July 2009 - 05:50 AM

Quote

I did't get this to work

implemented feedcreator instead

Yeah, feedcreator works fine to me.
0

#8 User is offline   Yeti 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 98
  • Joined: 30-May 09

Posted 01 December 2009 - 01:51 PM

@MetaYii

Hi,
I have made a few changes to EWebFeed (Zip file attached).

  • Fixed a bug with entry->summary in the Atom feed (in Atom_1_0::generateXML)
  • Implemented the RSS Advisory Board Namespace Elements http://www.rssboard....espace-elements.
  • Implemented RSS 2.0.11 (this was only a documentation change so is only sets the docs attribute - not exactly the most difficult code ever :rolleyes:
  • Feeds now return objects when things are added to them (e.g. an item to an RSS feed); this allows the application to work on the object directly rather than via an array in the feed itself.
    So the example in the documentation:
    $feed->addItem('item 1', 'http://www.microsoft.com/', 'Mocosoft');
    $feed->items[0]->pubDate = time()-86400;
    

    becomes:
    $item = $feed->addItem('item 1', 'http://www.microsoft.com/', 'Mocosoft');
    $item->pubDate = time()-86400;
    

  • I changed the way the feed is instantiated. Rather than passing EWebFeed an IFeedGenerator object, e.g.
    $feed = new EWebFeed(new RSS_2_0("Hello", "Hello world", "http://www.kernel.org/"));
    

    I get EWebFeed to instantiate the generator object based on the type asked for and pass it a parameter array, e.g.
    $feed = new EWebFeed('RSS_2_0_11', array(
    	'title' => 'EWebFeed',
    	'description' => 'A web feed',
    	'link' => 'http://example.com',
    ));
    

    This also has the benefit of allowing EWebFeed to only load the generators it needs for the given feed, rather than as currently loading everything.

I hope the above is of interest and help.
Regards,
Chris

Attached File(s)


0

#9 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 15 January 2010 - 10:41 AM

Quote

This extension does not work very well.

Tested with:

* Vanilla install of Yii (1.0.11)
* The RSS 2.0 example as per the documentation of this extension

It throws various exceptions concerning used constants, and even after fixing the use of the class constants, some errors concerning missing indices of $part(s).

I'd rather recommend using the Feed Component of the Zend framework for your RSS and Atom feed needs.

I'll post a tutorial on this topic in the cookbook soon(ish).

Best regards,

sdietz

Ah! on-off, simplement!
0

#10 User is offline   MetaYii 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 393
  • Joined: 07-October 08
  • Location:The Matrix

Posted 15 January 2010 - 10:42 AM

@sdietz: what's your php.ini's display_errors setting?
Ah! on-off, simplement!
0

#11 User is offline   robregonm 

  • Experienced Yii Developer
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 601
  • Joined: 30-July 09
  • Location:Colombia

Posted 15 February 2010 - 09:27 PM

Is Web feed extension compatible with Yii 1.1.x?
Is there some SVN version?
Ricardo Obregón
LinkedIn Profile
YiiFramework en Español - http://yiiframework.co/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx, MySQL, PostgreSQL, Yii 1.x & 2.x, CanJS and more.
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#12 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 04 March 2010 - 10:55 AM

Hi MetaYii,

sorry to say that, but the others are right.

Basically I think the extension looks very well, much better than Zend_Feed, but I needed about 2-3 hours to get it working.
If you're still developing this extension (I hope so), please check the attachment. You may diff it with your current version.

I made a few hotfixes, just to get it running ... RSS 2.0 only, btw: my dev-machine runs on E_STRICT.


Best regards,
schmunk

Attached File(s)


Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users