| 1 |
<?php |
<?php |
| 2 |
// $Id: tagadelic.module,v 1.40.2.8 2009/09/14 20:21:45 ber Exp $ |
// $Id: tagadelic.module,v 1.40.2.9 2009/09/14 20:23:34 ber Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help |
* Implementation of hook_help |
| 169 |
* @param $node. A node object. |
* @param $node. A node object. |
| 170 |
*/ |
*/ |
| 171 |
function tagadelic_node_get_terms($node) { |
function tagadelic_node_get_terms($node) { |
| 172 |
|
static $vocs; |
| 173 |
if ($terms = taxonomy_node_get_terms($node, 'tid')) { |
if ($terms = taxonomy_node_get_terms($node, 'tid')) { |
| 174 |
|
if (!isset($vocs[$node->type])) { |
| 175 |
|
$vocs[$node->type] = taxonomy_get_vocabularies($node->type); |
| 176 |
|
} |
| 177 |
$tags = array(); |
$tags = array(); |
|
$vocs = taxonomy_get_vocabularies($node->type); |
|
| 178 |
foreach ($terms as $tid => $term) { |
foreach ($terms as $tid => $term) { |
| 179 |
if ($vocs[$term->vid]->tags) { |
if ($vocs[$node->type][$term->vid]->tags) { |
| 180 |
$tags[$term->vid][$tid] = $term; |
$tags[$term->vid][$tid] = $term; |
| 181 |
} |
} |
| 182 |
} |
} |