/[drupal]/contributions/modules/total_control/total_control_panes_edit.inc
ViewVC logotype

Diff of /contributions/modules/total_control/total_control_panes_edit.inc

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

revision 1.1, Tue Apr 14 23:38:36 2009 UTC revision 1.2, Fri May 1 08:28:55 2009 UTC
# Line 63  function total_control_panels_edit_admin Line 63  function total_control_panels_edit_admin
63    return $form;    return $form;
64  }  }
65    
66    function total_control_panels_edit_admin_users(){
67      $form = array();
68      $user_options = array(
69        0 => t('no'),
70        1 => t('Show User Stats'));
71      $form['user'] = array(
72        '#type' => 'checkbox',
73        '#title' => t('Include User Counts'),
74        '#options' => $user_options,
75        '#default_value' => TRUE,
76        );
77      $roles = user_roles(TRUE);
78      $roles_options = array();
79      $roles_defaults = array();
80      foreach ($roles as $rid => $role){
81        if ($rid != 2){
82          $roles_options[$rid] = $role;
83          $roles_defaults[] = $rid;
84        }
85      }
86      $form['roles'] = array(
87        '#type' => 'checkboxes',
88        '#title' => t('Include User counts in Roles'),
89        '#options' => $roles_options,
90        '#default_value' => $roles_defaults,
91        );
92      return $form;
93    }
94    
95    function total_control_panels_edit_admin_content(){
96      $form = array();
97      $types = node_get_types('types');
98      $type_options = array();
99      $type_defaults = array();
100      $comment_defaults = array();
101      foreach ($types as $type => $object){
102        $type_options[$type] = $object->name;
103        $type_defaults[] = $type;
104        if ($type == 'blog' || $type == 'forum topic'){
105          $comment_defaults[] = $type;
106        }
107      }
108      $form['types'] = array(
109        '#type' => 'checkboxes',
110        '#title' => t('Include Stats on Content Types'),
111        '#options' => $type_options,
112        '#default_value' => $type_defaults,
113        );
114      $form['comments'] = array(
115        '#type' => 'checkboxes',
116        '#title' => t('Include Comment Stats for Content Types'),
117        '#options' => $type_options,
118        '#default_value' => $comment_defaults,
119        );
120      $spam_options = array(
121        0 => t('no'),
122        1 => t('Include Spam Comment count'));
123      $form['spam'] = array(
124        '#type' => 'checkbox',
125        '#title' => t('Include Spam Comment count'),
126        '#options' => $spam_options,
127        '#default_value' => TRUE,
128        );
129      return $form;
130    }
131    
132    
133  function total_control_panels_edit_admin_create(){  function total_control_panels_edit_admin_create(){
134    $form = array();    $form = array();
135    $types = node_get_types('types');    $types = node_get_types('types');

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

  ViewVC Help
Powered by ViewVC 1.1.2