/[drupal]/contributions/modules/export_opml/export_opml.module
ViewVC logotype

Diff of /contributions/modules/export_opml/export_opml.module

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

revision 1.2, Tue Nov 29 09:13:46 2005 UTC revision 1.3, Tue Nov 29 19:32:42 2005 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: export_opml.module,v 1.1 2005/11/28 08:44:12 puregin Exp $  // $Id: $
3    
4  /**  /**
5   * @file   * @file
# Line 21  function export_opml_link($type, $node = Line 21  function export_opml_link($type, $node =
21    if ($type == 'node' && isset($node->parent)) {    if ($type == 'node' && isset($node->parent)) {
22      if (!$main) {      if (!$main) {
23        if (user_access('export books as opml')) {        if (user_access('export books as opml')) {
24          $links[] = l(t('export OPML'), 'book/export/opml/'. $node->nid, array('title' => t('Export this book page and its sub-pages as OPML.')));          $links[] = l(t('export OPML'),
25                         'book/export/opml/'. $node->nid,
26                         array('title' => t('Export this book page and its sub-pages as OPML.')));
27        }        }
28      }      }
29    }    }
# Line 39  function export_opml_link($type, $node = Line 41  function export_opml_link($type, $node =
41   * The function also calls drupal_set_header() to set a header suitable   * The function also calls drupal_set_header() to set a header suitable
42   * for returning XML content.   * for returning XML content.
43   *   *
44     * Note that the user must have both 'access content' permissions (checked
45     * when the menu item for export is invoked in book.module) and
46     * 'export books as opml' permissions to export a book.
47     *
48   * @param nid   * @param nid
49   *   - an integer representing the node id (nid) of the node to export   *   - an integer representing the node id (nid) of the node to export
50   * @param depth   * @param depth
# Line 115  function export_opml_help($section) { Line 121  function export_opml_help($section) {
121    }    }
122  }  }
123    
 /**  
  * Implementation of hook_menu().  
  */  
 function export_opml_menu($may_cache) {  
   $items = array();  
   
   if ($may_cache) {  
     $items[] = array(  
       'path' => 'book/export',  
       'callback' => 'book_export',  
       'access' => (user_access('export books as opml') && user_access('access content')),  
       'type' => MENU_CALLBACK);  
   }  
   
   return $items;  
 }  
   
   
124    
125    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2