aboutsummaryrefslogtreecommitdiff
path: root/dynamic_taxonomy.module
diff options
context:
space:
mode:
authorSilvio <s1lv10@uol.com.br>2009-09-28 23:57:23 -0300
committerSilvio <s1lv10@uol.com.br>2009-09-28 23:57:23 -0300
commit7dba2312a71b38d6bfce8397764086d47425ab62 (patch)
tree306bc427414b8ac6058ab8267afae29c343d4bb2 /dynamic_taxonomy.module
parent0cc41dd2c40452f2a3e6ec0003c54ffd86de7a14 (diff)
downloadfinder_menu-7dba2312a71b38d6bfce8397764086d47425ab62.tar.gz
finder_menu-7dba2312a71b38d6bfce8397764086d47425ab62.tar.bz2
Starting to change module to 'Finder Menu'
Diffstat (limited to 'dynamic_taxonomy.module')
-rw-r--r--dynamic_taxonomy.module55
1 files changed, 0 insertions, 55 deletions
diff --git a/dynamic_taxonomy.module b/dynamic_taxonomy.module
deleted file mode 100644
index a78d33f..0000000
--- a/dynamic_taxonomy.module
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-// $Id$
-
-/**
- * Implementation of hook_block();
- */
-function dynamic_taxonomy_block($op = 'list', $delta = 0, $edit = array()) {
- switch ($op) {
- case 'list':
- $blocks[0]['info'] = t('Dynamic Taxonomy');
- $blocks[0]['cache'] = BLOCK_NO_CACHE;
- return $blocks;
-
- case 'configure':
- $form['dynamic_taxonomy_vid'] = array(
- '#type' => 'radios',
- '#title' => t('Select the vocabulary to list'),
- '#default_value' => variable_get('dynamic_taxonomy_vid', 1),
- '#options' => dynamic_taxonomy_get_vocabularies(),
- );
- return $form;
-
- case 'save':
- variable_set('dynamic_taxonomy_vid', (int) $edit['dynamic_taxonomy_vid']);
- break;
-
- case 'view':
- $vid = variable_get('dynamic_taxonomy_vid', 1);
- $tree = dynamic_taxonomy_get_terms($vid);
- $block['content'] = theme('item_list', $tree);
- return $block;
- }
-}
-
-/**
- * Get all vocabularies;
- */
-function dynamic_taxonomy_get_vocabularies() {
- $result = db_query('SELECT vid, name from {vocabulary}');
- while ($item = db_fetch_object($result)) {
- $items[$item->vid] = $item->name;
- }
- return $items;
-}
-
-function dynamic_taxonomy_get_terms($vid = null) {
- if ($vid != null) {
- $tree = taxonomy_get_tree($vid);
- foreach ($tree as $term) {
- $items[$term->tid] = $term->name;
- }
- return $items;
- }
- return null;
-}