| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
//$Id: sitemenu.module,v 1.39.2.1 2009/01/26 14:53:21 kbahey Exp $ |
//$Id: sitemenu.module,v 1.39.2.2 2009/02/03 02:50:07 kbahey Exp $ |
| 4 |
|
|
| 5 |
// Copyright 2005 Khalid Baheyeldin http://2bits.com |
// Copyright 2005 Khalid Baheyeldin http://2bits.com |
| 6 |
|
|
| 448 |
for ($m = 0; $m < count($tree); $m++) { |
for ($m = 0; $m < count($tree); $m++) { |
| 449 |
$term = $tree[$m]; |
$term = $tree[$m]; |
| 450 |
|
|
| 451 |
|
echo $term->depth; |
| 452 |
if ($term->depth > $old_depth) { |
if ($term->depth > $old_depth) { |
| 453 |
$output .= "<ul class=\"menu\">\n"; |
$output .= "<ul class=\"menu\">\n"; |
| 454 |
$ul++; |
$ul++; |
| 463 |
|
|
| 464 |
switch($vocab_type) { |
switch($vocab_type) { |
| 465 |
case SITEMENU_VOCAB_TYPE_IMAGE: |
case SITEMENU_VOCAB_TYPE_IMAGE: |
| 466 |
$path = 'image/tid/'; |
$path = 'image/tid/' . $term->tid; |
| 467 |
break; |
break; |
| 468 |
case SITEMENU_VOCAB_TYPE_FORUM: |
case SITEMENU_VOCAB_TYPE_FORUM: |
| 469 |
$path = 'forum/'; |
$path = 'forum/' . $term->tid; |
| 470 |
break; |
break; |
| 471 |
default: |
default: |
| 472 |
$path = 'taxonomy/term/'; |
$path = taxonomy_term_path($term); |
| 473 |
break; |
break; |
| 474 |
} |
} |
| 475 |
|
|
| 480 |
if (variable_get('sitemenu_child_content', 0)) { |
if (variable_get('sitemenu_child_content', 0)) { |
| 481 |
$term->tid .= '/all'; |
$term->tid .= '/all'; |
| 482 |
} |
} |
| 483 |
$link = l($term->name . $count, $path . $term->tid, array ("title" => $term->description)); |
$link = l($term->name . $count, $path, array ("title" => $term->description)); |
| 484 |
} |
} |
| 485 |
else { |
else { |
| 486 |
if (isset($term->link)) { |
if (isset($term->link)) { |
| 488 |
$link = $term->link . $count; |
$link = $term->link . $count; |
| 489 |
} |
} |
| 490 |
else { |
else { |
| 491 |
$link = l($term->name . $count, $path . $term->tid ); |
$link = l($term->name . $count, $path); |
| 492 |
} |
} |
| 493 |
} |
} |
| 494 |
|
|