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

Diff of /contributions/modules/attached_node/attached_node.module

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

revision 1.11, Wed Dec 8 22:17:18 2004 UTC revision 1.12, Sun Aug 13 18:12:15 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id: attached_node.module,v 1.10 2004/11/09 00:07:25 javanaut Exp $  //$Id: attached_node.module,v 1.11 2004/12/08 22:17:18 javanaut Exp $
3  /*  /*
4  This file is attached_node module - It allows users to  This file is attached_node module - It allows users to
5  attach a node to another node.  attach a node to another node.
# Line 57  function attached_node_filter($op, $delt Line 57  function attached_node_filter($op, $delt
57   * Function used to discover what filters are supplied by this module.   * Function used to discover what filters are supplied by this module.
58   */   */
59  function attached_node_filter_settings() {  function attached_node_filter_settings() {
60    //$output .= form_checkbox(t("Enable Attached Node codes"), 'attached_node_enabled', variable_get('attached_node_enabled', 1), 1, t("When enabled, referrent node codes will be replaced by thumb linked to real node. Syntax: [node:node_id,param1=val1,param2=val2]; every param but node_id is optional."));    $form['filter_attached_node'] = array(
61    $output .= form_item(t('Instructions'), t('This filter translates special node tags into thumbnailed representations that link to other nodes.      '#type' => 'fieldset',
62      Syntax: [node:node_id,param1="val1",param2="val2"]; every param but node_id is optional.      '#title' => t("Attached Node codes"),
63      Each list below should be a comma separated list (no spaces) of what node properties users are      '#collapsible' => TRUE,
64      allowed to override for the purposes of displaying a node.  E.g. <em>title,res,border</em>'));      '#collapsed' => FALSE
65    foreach(node_list() as $type) {    );
66      $output .= form_textfield(t("Allowed parameters for %type nodes", array('%type'=>$type)), "attached_node_allowed_vars_$type", variable_get("attached_node_allowed_vars_$type", ""), 40, 256);    $form['filter_attached_node']['attached_node'] = array(
67        '#type' => 'item',
68        '#title' => t('Instructions'),
69        '#value' => t('This filter translates special node tags into thumbnailed representations that link to other nodes.
70          Syntax: [node:node_id,param1="val1",param2="val2"]; every param but node_id is optional.
71          Each list below should be a comma separated list (no spaces) of what node properties users are
72          allowed to override for the purposes of displaying a node.  E.g. <em>title,res,border</em>')
73      );
74      foreach(node_get_types() as $type => $name) {
75      $form['filter_attached_node']["attached_node_allowed_vars_$type"] = array(
76        '#type' => 'textfield',
77        '#title' => t("Allowed parameters for %type nodes", array('%type'=>$type)),
78        '#default_value' => variable_get("attached_node_allowed_vars_$type", ""),
79        '#size' => 40,
80        '#maxlength' => 256
81      );
82    }    }
83    return form_group(t("Attached Node codes"), $output);    return $form;
84  }  }
85    
86  /**  /**
# Line 187  function theme_attached_node_thumbnail(& Line 202  function theme_attached_node_thumbnail(&
202   * Puts a box around the attached_node's content   * Puts a box around the attached_node's content
203   */   */
204  function theme_attached_node_format($content) {  function theme_attached_node_format($content) {
205    return "<div class='attached_node' >" . $content . "</div>\n";    return '<div class="attached_node">' . $content . "</div>\n";
206  }  }
207    
208  /**  /**
# Line 221  function attached_node_help($section = " Line 236  function attached_node_help($section = "
236        [node:123,res="640x480"]<br>        [node:123,res="640x480"]<br>
237        [node:123,res="original"]<br>        [node:123,res="original"]<br>
238        </p><p>Currently available parameters:<table border="1">');        </p><p>Currently available parameters:<table border="1">');
239        foreach(node_list() as $type) {        foreach(node_get_types() as $type => $name) {
240          $output .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("attached_node_allowed_vars_$type", "") . "</td></tr>\n";          $output .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("attached_node_allowed_vars_$type", "") . "</td></tr>\n";
241        }        }
242        $output .= t('</table></p><p>        $output .= t('</table></p><p>
# Line 254  function attached_node_filter_tips($delt Line 269  function attached_node_filter_tips($delt
269        [node:123,res="640x480"]<br>        [node:123,res="640x480"]<br>
270        [node:123,res="original"]<br>        [node:123,res="original"]<br>
271        </p><p>Currently available parameters:<table border="1">');        </p><p>Currently available parameters:<table border="1">');
272      foreach(node_list() as $type) {      foreach(node_get_types() as $type => $name) {
273        $txt .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("attached_node_allowed_vars_$type", "") . "</td></tr>\n";        $txt .= "<tr><td>" . t("Allowed parameters for <strong>$type</strong> nodes: ") . "</td><td>" . variable_get("attached_node_allowed_vars_$type", "") . "</td></tr>\n";
274      }      }
275    
# Line 271  function attached_node_filter_tips($delt Line 286  function attached_node_filter_tips($delt
286    }    }
287  }  }
288    
   
289  ?>  ?>

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.2