Only in taxonomy_dhtml: menuExpandable3.css Only in taxonomy_dhtml: menuExpandable3.js Only in taxonomy_dhtmlnew/: menuExpandable4.css Only in taxonomy_dhtmlnew/: menuExpandable4.js Common subdirectories: taxonomy_dhtml/po and taxonomy_dhtmlnew/po Only in taxonomy_dhtmlnew/: taxonomy_dhtml.info diff -u taxonomy_dhtml/taxonomy_dhtml.module taxonomy_dhtmlnew/taxonomy_dhtml.module --- taxonomy_dhtml/taxonomy_dhtml.module 2006-04-09 08:28:46.000000000 -0700 +++ taxonomy_dhtmlnew/taxonomy_dhtml.module 2007-02-11 21:09:02.000000000 -0800 @@ -30,7 +30,8 @@ $url .= "/$op"; } $link = l(t($term->name), $url, array("title" => t($term->description))); - $out .= _taxonomy_depth($term->depth, " ")."- $link"; +// $out .= _taxonomy_depth($term->depth, " ")."- $link"; + $out .= str_repeat(" ", $term->depth) . "- $link"; $count = taxonomy_term_count_nodes($term->tid); if ($count) { $out .= " ($count)"; @@ -42,9 +43,9 @@ // accepts an optional param for restricting nodes to a particular type function taxonomy_dhtml_overview($type = 0) { - $n=0; $vocabularies = taxonomy_dhtml_get_vocabularies($type); + foreach ($vocabularies as $vocabulary) { if ($cache = cache_get("taxonomy_dhtml:tree_nodes_$type". $vocabulary->vid)) { $tree_nodes = unserialize($cache->data); @@ -52,6 +53,7 @@ else { $tree = taxonomy_get_tree($vocabulary->vid); + // localize and append the node count to each term name for ($m=0; $mname = t($tree[$m]->name); @@ -61,9 +63,9 @@ } $tree_nodes = taxonomy_dhtml_inject_nodes($tree, $type); - cache_set("taxonomy_dhtml:tree_nodes_$type". $vocabulary->vid, serialize($tree_nodes), CACHE_TEMPORARY); + cache_set("taxonomy_dhtml:tree_nodes_$type". $vocabulary->vid, "cache", serialize($tree_nodes), CACHE_TEMPORARY); } - $boxes[$n]["content"] = theme("taxonomy_dhtml_render_outline", $tree_nodes); + $boxes[$n]["content"] = theme("taxonomy_dhtml_render_outline", $tree_nodes); $boxes[$n]["subject"] = $vocabulary->name; $n++; } @@ -85,16 +87,26 @@ function taxonomy_dhtml_menu($may_cache) { if ($may_cache) { - $items[] = array('path' => 'taxonomy_dhtml', 'title' => t("categories"), + $items[] = array('path' => 'taxonomy_dhtml', 'title' => t("Categories"), 'callback' => 'taxonomy_dhtml_page', 'access' => user_access('access content'), 'weight' => 5, 'type' => MENU_NORMAL_ITEM); + $items[] = array( + 'path' => 'admin/settings/taxonomy_dhtml', + 'title' => t('Taxonomy DHTML'), + 'description' => t('Set the settings FIXTHIS.'), + 'callback' => 'drupal_get_form', + 'callback arguments' => 'taxonomy_dhtml_settings', + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, // optional + ); return $items; } else { - theme_add_style(drupal_get_path('module', 'taxonomy_dhtml') . '/menuExpandable3.css', 'screen'); - drupal_add_js(drupal_get_path('module', 'taxonomy_dhtml') . '/menuExpandable3.js'); + drupal_add_css(drupal_get_path('module', 'taxonomy_dhtml') . '/menuExpandable4.css', 'screen'); + drupal_add_js(drupal_get_path('module', 'taxonomy_dhtml') . '/menuExpandable4.js'); $modpath = drupal_get_path('module', 'taxonomy_dhtml'); + drupal_add_js("$(document).ready(function() { initializeMenu('" . $modpath . "') } );", 'inline'); } } @@ -135,7 +147,7 @@ $type_q = ($type ? "n.type = '$type'" : 1); $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, n.type, u.uid, u.name FROM {term_node} r LEFT JOIN {node} n ON r.nid = n.nid LEFT JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND $type_q AND r.tid = '$term->tid' ORDER BY n.changed DESC"), 0, variable_get("taxonomy_dhtml_overview_count", 50)); while ($node = db_fetch_object($result)) { - if (module_exist('comment')) { + if (module_exists('comment')) { $detail = t("Author: %name, comments: %num", array ("%name" => strip_tags(theme('username', $node)), "%num" => comment_num_all($node->nid))); } $link = l($node->title, "node/$node->nid", array ("title" => $detail, "class" => "dhtml_node")); @@ -154,16 +166,10 @@ $old_depth = -1; $output = ""; - for ($m = 0; $m < count($tree); $m++) { $term = $tree[$m]; if ($term->depth > $old_depth) { - $output .= "