| 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 |
| 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); |
| 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 |
/** |
/** |