/[drupal]/contributions/modules/ffpc/ffpc.views.inc
ViewVC logotype

Contents of /contributions/modules/ffpc/ffpc.views.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Sat Oct 4 17:53:24 2008 UTC (13 months, 3 weeks ago) by mfer
Branch: MAIN
CVS Tags: DRUPAL-6--0-7, DRUPAL-6--0-6, HEAD
Changes since 1.4: +15 -23 lines
File MIME type: text/x-php
This is an overhaul of the ffpc module.
- Removed the ffpc display type. Instead defaulting to the core feed type.
- Moved the sytle plugin class to be an extends of the core rss plugin syste. The core plugin style provides everything we need except the ability to add aditional elements to the feed itself (such as the iTunes specific tags). The new object adds this extra functionality.
- Moved the row plugin to be an extends of the default node row rss plugin provided by core and then extending that to add the aditional files and iTunes/podcast specific tags to the items.

Moving to this setup provides a number of benefits.
- Less complexity now that the ffpc display has been removed.
- Uses move of core so core fixes should benefit this module and core settings (e.g., using the teaser or full node text for the description) are now available.
1 <?php
2
3 /*
4 * Much of the output here is based on the Apple Podcast standard. Details
5 * can be found here:
6 * http://www.apple.com/itunes/store/podcaststechspecs.html
7 *
8 * Note: We need a custom style plugin because the default RSS plugin does
9 * not permit additional elements to be added to the feed.
10 */
11
12 function ffpc_views_plugins() {
13 return array(
14 'module' => 'ffpc',
15 'style' => array(
16 'podcast' => array(
17 'title' => t('Podcast Feed'),
18 'help' => t('Generates Podcast Feed from a view.'),
19 'handler' => 'ffpc_plugin_style_podcast',
20 'theme' => 'ffpc_view_podcast_feed',
21 'uses row plugin' => TRUE,
22 'uses options' => TRUE,
23 'type' => 'feed',
24 'parent' => 'rss',
25 ),
26 ),
27 'row' => array(
28 'podcast' => array(
29 'title' => t('Podcast Episode'),
30 'help' => t('Display the node as a Podcast Episode.'),
31 'handler' => 'ffpc_plugin_row_podcast',
32 'uses fields' => TRUE,
33 'type' => 'feed',
34 'parent' => 'node_rss',
35 'uses options' => TRUE,
36 ),
37 ),
38 );
39 }

  ViewVC Help
Powered by ViewVC 1.1.2