/[drupal]/contributions/modules/simplefeed/simplefeed_token.inc
ViewVC logotype

Contents of /contributions/modules/simplefeed/simplefeed_token.inc

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Oct 2 20:52:01 2007 UTC (2 years, 1 month ago) by m3avrck
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
File MIME type: text/x-php
#169095 patch by RobRoy add token support
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_token_values().
6 */
7 function simplefeed_token_values($type, $object = NULL) {
8 if ($type == 'node') {
9 $node = $object;
10
11 $tokens = array();
12 $tokens['feed-url'] = $node->url;
13 return $tokens;
14 }
15 }
16
17 /**
18 * Implementation of hook_token_list().
19 */
20 function simplefeed_token_list($type) {
21 if ($type == 'node' || $type == 'all') {
22 $list = array(
23 'simplefeed' => array(
24 'feed-url' => t('The URL for the feed.'),
25 ),
26 );
27 return $list;
28 }
29 }

  ViewVC Help
Powered by ViewVC 1.1.2