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

Diff of /contributions/modules/sidecontent/sidecontent.module

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

revision 1.13, Tue Jul 3 22:39:39 2007 UTC revision 1.14, Sun Apr 5 01:03:13 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: sidecontent.module,v 1.11.2.3 2006/10/22 19:43:50 MegaGrunt Exp $  // $Id: sidecontent.module,v 1.13.2.2 2007/07/03 22:55:25 MegaGrunt Exp $
3    
4  /**  /**
5   * Implementation of hook_perm().   * Implementation of hook_perm().
6   */   */
7  function sidecontent_perm() {  function sidecontent_perm() {
   
8   return array('access side content', 'create side content');   return array('access side content', 'create side content');
9  }  }
10    
   
11  /**  /**
12   * Implementation of hook_block().   * Implementation of hook_block().
13   *   *
# Line 24  function sidecontent_block($op = 'list', Line 22  function sidecontent_block($op = 'list',
22      return $blocks;      return $blocks;
23    
24      case 'configure':      case 'configure':
   
   
25        $form['sidecontent_print'] = array(        $form['sidecontent_print'] = array(
26          '#type' => 'checkbox',          '#type' => 'checkbox',
27          '#title' => t('Print view include'),          '#title' => t('Print view include'),
# Line 127  function sidecontent_block($op = 'list', Line 123  function sidecontent_block($op = 'list',
123  /**  /**
124  * Implementation of hook_form_alter.  * Implementation of hook_form_alter.
125  */  */
126  function sidecontent_form_alter($form_id, &$form) {  function sidecontent_form_alter(&$form, &$form_state, $form_id) {
127    
128    // Alter the settings form.    // Alter the settings form.
129    if ($form_id == 'node_type_form') {    if ($form_id == 'node_type_form') {
# Line 169  function sidecontent_form_alter($form_id Line 165  function sidecontent_form_alter($form_id
165        $form['sidecontent']['sidecontent_title'] = array(        $form['sidecontent']['sidecontent_title'] = array(
166          '#type' => 'textfield',          '#type' => 'textfield',
167          '#title' => t('Side Content Title'),          '#title' => t('Side Content Title'),
168          '#default_value' => check_plain($node->sidecontent_title),          '#default_value' => $node->sidecontent_title,
169          '#description' => t("Leave blank to use default side content title: <em>%title</em>", array('%title' => $default_title)),          '#description' => t("Leave blank to use default side content title: <em>%title</em>", array('%title' => $default_title)),
170          '#size' => 50,          '#size' => 50,
171          '#maxlength' => 128          '#maxlength' => 128
172        );        );
173    
       $content_default = (empty($node->sidecontent)) ? '' : check_markup($node->sidecontent, $node->sidecontent_format);  
   
174        $form['sidecontent']['sidecontent'] = array(        $form['sidecontent']['sidecontent'] = array(
175          '#type' => 'textarea',          '#type' => 'textarea',
176          '#title' => t('Side Content Text'),          '#title' => t('Side Content Text'),
177          '#default_value' => $content_default,          '#default_value' => $node->sidecontent,
178          '#description' => t('Content to display in side block.'),          '#description' => t('Content to display in side block.'),
179          '#cols' => 60,          '#cols' => 60,
180          '#rows' => 20,          '#rows' => 20,

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.2