![]() |
|
sfPropelPlanetPlugin - 0.7.1This plugin provides (very) simple feed aggregation features to your symfony 1.1 powered application. |
|
![]() |
2
users
Sign-in
to change your status |
This plugin provides (very) simple feed aggregation features to your symfony 1.1 powered application. |
| Name | Status | |
|---|---|---|
|
|
lead | moc.liamg <<ta>> tluairrepn |
Copyright (c) 2008 Nicolas Perriault
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Version | License | API | Released |
|---|---|---|---|
| 0.6.0beta | MIT license | 0.6.0beta | 21/06/2008 |
| Version | License | API | Released |
|---|---|---|---|
| 0.6.0beta | MIT license | 0.6.0beta | 21/06/2008 |
| Version | License | API | Released |
|---|---|---|---|
| 0.6.0beta | MIT license | 0.6.0beta | 21/06/2008 |
| Version | License | API | Released |
|---|---|---|---|
| 0.7.1beta | MIT license | 0.7.1beta | 31/07/2008 |
| 0.7.0beta | MIT license | 0.7.0beta | 22/06/2008 |
| 0.6.0beta | MIT license | 0.6.0beta | 21/06/2008 |
| Version | License | API | Released |
|---|---|---|---|
| 0.7.0beta | MIT license | 0.7.0beta | 22/06/2008 |
| 0.6.0beta | MIT license | 0.6.0beta | 21/06/2008 |
| Name | Channel | Version |
|---|---|---|
| sfPropelActAsSluggableBehaviorPlugin | plugins.symfony-project.org | 0.2.0-1.1.0 |
| sfWebBrowserPlugin | plugins.symfony-project.org | 1.0.0-1.1.0 |
| sfFeed2Plugin | plugins.symfony-project.org | 0.9.4-1.0.0 |
| sfPagerNavigationPlugin | plugins.symfony-project.org | 1.0.0-1.2.0 |
This plugin provides (very) simple feed aggregation features to your symfony 1.1 powered application.
<div style="border:solid 3px #ff8;padding:8px;background-color:#ffe;margin:5px 15%"> This plugin is <strong>not</strong> compatible with symfony 1.0 </div>
The plugin and its dependecies can be installed using two methods, SVN or PEAR.
You must have an existing symfony project versionned in a subversion repository.
Edit the svn:externals property of the plugins directory of your symfony
project and add these lines if they don't exist yet:
sfFeed2Plugin http://svn.symfony-project.com/plugins/sfFeed2Plugin/
sfWebBrowser http://svn.symfony-project.com/plugins/sfWebBrowserPlugin/
sfPropelActAsSluggableBehaviorPlugin http://svn.symfony-project.com/plugins/sfPropelActAsSluggableBehaviorPlugin/
sfPropelPlanetPlugin http://svn.symfony-project.com/plugins/sfPropelPlanetPlugin/trunk
Now edit the svn:externals property of the web directory of your project and
type:
sfPropelPlanetPlugin http://svn.symfony-project.com/plugins/sfPropelPlanetPlugin/trunk/web
The later step is required if you want to have some styling using the web modules.
Last but not least, run the svn update command from the root of your project.
Run the following commands within a bash prompt at the root of your symfony project:
$ php symfony plugin-install -s beta sfPropelPlanetPlugin
Dependencies will be installed automatically.
First, you must enable the Propel behaviors, tuning your config/propel.ini
file by changing the value of the propel.builder.addBehaviors property value:
propel.builder.addBehaviors = true
Then run the following commands within your project:
$ php symfony cache:clear
$ php symfony propel:build-all-load <appname>
Where <appname> is the name of one of your existing apps.
Planet configuration is mainly done in the app.yml file. A bundled app.yml
is provided to help yourself seeing what can be configured.
You can have an overview of what can be configured reading the bundled file.
The plugin is bundled with two dedicated task and web modules.
Tasks can be used with from the command line interface, and you can schedule them using the *nix CRON utility, eg.:
0 5 * * * php /path/to/your/symfony/project/symfony planet:grab-feed
This crontab entry will schedule outdated feeds fetching every morning at 5am.
Web modules provides quick'n'dirty frontend and backend rough web interfaces to display and manage your data.
planet:feed-add taskThe planet:feed-add allows you to add and grab a new feed to your planet. Here
is a sample call:
$ php symfony planet:feed-add http://feeds.feedburner.com/symfony/blog
Where the provided url is the feed url you want to add to your planet. This command will fetch its entries, and store them in your database.
To get help on available options, just type:
$ php symfony help planet:feed-add
planet:feed-grab taskThe planet:grab-entries updates outdated feed entries, I mean the ones which
the periodicity value has been exceeded.
To launch the task, just run the following command:
$ php symfony planet:feed-grab
To get help on available options, just type:
$ php symfony help planet:feed-grab
The web modules provides somewhat useful frontend and backend interfaces.
sfPlanetAdmin web moduleThe sfPlanetAdmin module provides admin features of your feeds entries. From
there you can add, edit, delete and list available feeds in your planet. To
enable the module for an application, edit its settings.yml file as following:
all:
.settings
enabled_modules: [sfPlanetAdmin](default,)
Then eventually purge your application cache and browse to /sfPlanetAdmin.
sfPlanet web moduleThe sfPlanet module provides list of feed entries as HTML or RSS output. To
enable the module for an application, edit its settings.yml file as following:
all:
.settings
enabled_modules: [sfPlanet](default,)
Then purge your application config cache with php symfony cc and browse to
/planet/1.html after having added some feeds to your planet.
Pagination is handled automatically, but configurable in the app.yml file.
Note that the plugin provided bundled symfony routes:
* sf_planet_home: The home of the planet, listing entries from all active
feeds
* sf_planet_feed_home: The list of all entries for a given feed, passing its
mandatory slug parameter
An RSS feed for the planet is also available. Just point your browser at
/planet/1.rss and enjoy. You can even paginate yout planet feed browsing
at /planet/2.rss, /planet/3.rss and so on.
By default, if you want to make a link pointing at the HTML home of your planet, just use:
<?php echo link_to('my planet', '@sf_planet_home') ?>
If you want to make a link to a particular feed, just make a link using its
slug passed as a parameter:
<?php echo link_to('symfony blog entries', '@sf_planet_feed_home?slug=symfony-blog') ?>
The same goes for RSS feeds, just use the sf_format magic value, like this:
<?php echo link_to('my planet as an RSS feed', '@sf_planet_home?sf_format=rss') ?>
Last but not least, if you want to have your planet feed link added automagically
in the <head/> tag of your rendered HTML pages, you can use the bundled
sfPlanetFeedLinkFilter filter, adding this entry to the filter.yml file of
the app where you enabled the sfPlanet web module (yes, your frontend):
rendering: ~
security: ~
# insert your own filters here
planet:
class: sfPlanetFeedLinkFilter
cache: ~
common: ~
execution: ~
This plugin is released under the terms of the MIT license.
This plugin has been released by Nicolas Perriault
