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

Diff of /contributions/modules/cleanfeeds/cleanfeeds.module

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

revision 1.4, Mon Jan 29 15:47:50 2007 UTC revision 1.5, Sun Sep 28 01:06:31 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  //$Id: cleanfeeds.module,v 1.3 2006/09/27 18:33:33 kbahey Exp $  //$Id: cleanfeeds.module,v 1.4.2.1 2007/02/01 04:42:21 kbahey Exp $
4    
5  // Copyright 2006 Khalid Baheyeldin http://2bits.com  // Copyright 2006 Khalid Baheyeldin http://2bits.com
6    
# Line 9  define('CLEANFEEDS_NODE', 'cleanfeeds_no Line 9  define('CLEANFEEDS_NODE', 'cleanfeeds_no
9  function cleanfeeds_help($section) {  function cleanfeeds_help($section) {
10    switch ($section) {    switch ($section) {
11      case 'admin/settings/cleanfeeds':      case 'admin/settings/cleanfeeds':
12        $output = t('Cleans up HTML in feeds.');        return t('Cleans up HTML in feeds.');
       break;  
13    }    }
   return $output;  
14  }  }
15    
16  function cleanfeeds_menu($may_cache) {  function cleanfeeds_menu($may_cache) {
17    $items = array();    $items = array();
18    
19    if ($may_cache) {    $items['admin/settings/cleanfeeds'] = array(
20      $items[] = array(      'title'          => 'Cleanfeeds',
21        'path' => 'admin/settings/cleanfeeds',      'description'    => t('Settings of the Cleanfeeds module'),
22        'title' => 'Cleanfeeds',      'page callback'  => 'drupal_get_form',
23        'description' => t('Settings of the Cleanfeeds module'),      'page arguments' => array('cleanfeeds_settings'),
24        'callback' => 'drupal_get_form',      'access'         => array('administer site configuration'),
25        'callback arguments' => array('cleanfeeds_settings'),    );
       'access' => user_access('administer site configuration'),  
     );  
   }  
26    
27    return $items;    return $items;
28  }  }
# Line 35  function cleanfeeds_menu($may_cache) { Line 30  function cleanfeeds_menu($may_cache) {
30  function cleanfeeds_settings() {  function cleanfeeds_settings() {
31    $group = 'options';    $group = 'options';
32    $form[$group] = array(    $form[$group] = array(
33      '#type' => 'fieldset',      '#type'        => 'fieldset',
34      '#collapsible' => true,      '#collapsible' => true,
35      );      );
36    foreach(node_get_types() as $type => $name) {    foreach(node_get_types() as $type => $obj) {
37      $form[$group][CLEANFEEDS_NODE . $type] = array(      $form[$group][CLEANFEEDS_NODE . $type] = array(
38        '#type' => 'checkbox',        '#type'          => 'checkbox',
39        '#title' => $name,        '#title'         => $obj->name,
40        '#return_value' => 1,        '#return_value'  => 1,
41        '#default_value' => variable_get(CLEANFEEDS_NODE. $type, 0),        '#default_value' => variable_get(CLEANFEEDS_NODE. $type, 0),
42        );        );
43    }    }
# Line 59  function cleanfeeds_nodeapi(&$node, $op, Line 54  function cleanfeeds_nodeapi(&$node, $op,
54        break;        break;
55    }    }
56  }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.2