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

Diff of /contributions/modules/helptip/helptip.module

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

revision 1.11, Sun Dec 17 04:35:26 2006 UTC revision 1.12, Fri Jan 5 03:28:50 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: helptip.module,v 1.10 2006/12/08 19:56:39 yogadex Exp $  // $Id: helptip.module,v 1.11 2006/12/17 04:35:26 yogadex Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 113  function helptip_block($op = 'list', $de Line 113  function helptip_block($op = 'list', $de
113      $block = array();      $block = array();
114      while ($data = db_fetch_object($result)) {      while ($data = db_fetch_object($result)) {
115        $node = node_load($data->nid);        $node = node_load($data->nid);
116        if (!$block['subject'])        if ($body = theme('helptip_body', $node)) {
117          $block['subject'] = t($settings['title'],          // there is a helptip to display
118                                array('%title' => check_plain($node->title)));          if (!$block['subject'])
119        $items[] = theme('helptip_body', $node);            $block['subject'] = t($settings['title'],
120                                    array('%title' => check_plain($node->title)));
121            $items[] = $body;
122          }
123      }      }
124      if (count($items)) {      if (count($items)) {
125        $block['content'] = theme('helptip_list', $items);        $block['content'] = theme('helptip_list', $items);
# Line 364  function helptip_settings_form() { Line 367  function helptip_settings_form() {
367   * Display the body of the help tip.  In this implementation, we show teaser.   * Display the body of the help tip.  In this implementation, we show teaser.
368   */   */
369  function theme_helptip_body($node) {  function theme_helptip_body($node) {
370    $node->teaser = check_markup($node->teaser, $node->format, FALSE);    if ($node->teaser = check_markup($node->teaser, $node->format, FALSE)) {
371    $node->body = check_markup($node->body, $node->format, FALSE);      // calculate body, too, as it controls the 'read more' link.
372    return '<div class="helptip">' . $node->teaser .      $node->body = check_markup($node->body, $node->format, FALSE);
373      theme('helptip_links', $node) . "</div>\n";      return '<div class="helptip">' . $node->teaser .
374          theme('helptip_links', $node) . "</div>\n";
375      }
376  }  }
377    
378  /**  /**

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

  ViewVC Help
Powered by ViewVC 1.1.2