/[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.8, Sun Oct 24 20:33:16 2004 UTC revision 1.9, Sun Oct 24 21:14:26 2004 UTC
# Line 48  function attached_node_filter($op, $delt Line 48  function attached_node_filter($op, $delt
48   * Function used to discover what filters are supplied by this module.   * Function used to discover what filters are supplied by this module.
49   */   */
50  function attached_node_filter_settings() {  function attached_node_filter_settings() {
51    $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."));    //$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."));
52    $output .= form_item(t("Instructions"), t("Each list should be comma separated (no spaces).  E.g. <em>align,border,vspace</em>"));    $output .= form_item(t('Instructions'), t('This filter translates special node tags into thumbnailed representations that link to other nodes.
53        Syntax: [node:node_id,param1="val1",param2="val2"]; every param but node_id is optional.
54        Each list below should be a comma separated list (no spaces) of what node properties users are
55        allowed to override for the purposes of displaying a node.  E.g. <em>title,res,border</em>'));
56    foreach(node_list() as $type) {    foreach(node_list() as $type) {
57      $output .= form_textfield(t("Allowed parameters for $type nodes"), "attached_node_allowed_vars_$type", variable_get("attached_node_allowed_vars_$type", ""), 40, 256);      $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);
58    }    }
59    return form_group(t("Attached Node codes"), $output);    return form_group(t("Attached Node codes"), $output);
60  }  }
# Line 64  function attached_node_filter_settings() Line 67  function attached_node_filter_settings()
67   *  Replace meta tag with themed thumbnail view of the referrent node.   *  Replace meta tag with themed thumbnail view of the referrent node.
68   */   */
69  function attached_node_filter_process($text, $show_error_msgs=1) {  function attached_node_filter_process($text, $show_error_msgs=1) {
70    if (variable_get("attached_node_enabled", 0)) {    if (variable_get("attached_node_enabled", 1)) {
71      // *** [node:NID,a="b",c="d",width="40",etc="foo"] ***      // *** [node:NID,a="b",c="d",width="40",etc="foo"] ***
72      // first we find every tag      // first we find every tag
73      $meta_tag_regexp = '/\[node:(\d+)(.*)\]/i';      $meta_tag_regexp = '/\[node:(\d+)(.*)\]/i';

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.2