i fix it by change 2 function in "taxonomy_menu.database.inc"
function _taxonomy_menu_get_menu_items($vid) {
$result = db_query('SELECT mlid, tid FROM {taxonomy_menu} WHERE vid = %d', $vid);
$menu_items = array();
$found_count = 0;
while ($data = db_fetch_object($result)) {
//$menu_items[$data->tid] = $data->mlid;
$menu_items[$found_count]['mlid'] = $data->mlid;
$menu_items[$found_count]['tid'] = $data->tid;
$found_count++;
}
return $menu_items;
}
function _taxonomy_menu_delete_all($vid){
$menu_terms = _taxonomy_menu_get_menu_items($vid);
if (!empty($menu_terms)) {
foreach ($menu_terms as $clear_counter) {
db_query('DELETE FROM {menu_links} WHERE mlid = %d', $clear_counter['mlid']);
}
db_query('DELETE FROM {taxonomy_menu} WHERE vid = %d', $vid);
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | tax_menu_v2.1.zip | 25.43 KB | mskicker |
| #3 | taxonomy_menu_manually_fixedv2.zip | 23.97 KB | mskicker |
| #1 | taxonomy_menu.zip | 24.5 KB | mskicker |
Comments
Comment #1
mskicker commentedi finally find main problem
my site have some taxonomy with several parents term
this modules have problem in this position
i add some changes to this modules for support multi parent term
this code is not great but WORK in my site
Comment #2
mskicker commentedComment #3
mskicker commentedi found new big bug
when we rebuild all links
all of terms convert to links with their relative but ,
if parents was not created before , relations not affected
to solve this problem
we must convert all terms at first
then add their relation to the links
i Do this
and add alphabetical sort and multi-parents support
my code is not great but WORK for me
i upload it again now
Comment #4
johnvCan you create a patch of diff file, so others can see the changes you made? Thanks!
Comment #5
mskicker commentedComment #6
mskicker commentedexcuse me
i am not web or linux programmer and i dont now how i can do it
but i think that you can use compare tools in msword
to solve relations bug i add
to _taxonomy_menu_insert_link_items_process(..) function
Comment #7
johnvCan you post an image of your Vocabulary settings page?
Comment #7.0
johnvtyping mistake
Comment #8
dstolThe Drupal 6 version is no longer supported