Here is a patch to allow custom (tree-like) theming of 'admin/content/taxonomy_fields' page
Index: D:\www\sites\all\modules\taxonomy_fields\taxonomy_fields.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_fields/taxonomy_fields.module,v
retrieving revision 1.1.2.1.2.7
diff -u -r1.1.2.1.2.7 taxonomy_fields.module
--- taxonomy_fields.module 3 May 2007 11:20:11 -0000 1.1.2.1.2.7
+++ taxonomy_fields.module 17 May 2007 05:42:42 -0000
@@ -159,21 +159,22 @@
* Menu callback; lists all terms and fields used by taxonomy_fields.
*/
function _taxonomy_fields_list(){
-
+
//needs call because content.module could have changed database storage
taxonomy_fields_clear_terms_cache();
//output of all existing term-field-relations
- $query=db_query("SELECT SUBSTRING(nfi.type_name,14) AS tid, tfa.ancestors, tf.universal, td.name, nfi.field_name, nfi.type_name, nfi.label, nfi.widget_type, nfi.weight, nf.type
- FROM {node_field_instance} nfi
- LEFT JOIN {taxonomy_fields} tf ON nfi.field_name=tf.field_name AND SUBSTRING(nfi.type_name,14)=tf.tid
+ $query=db_query("SELECT SUBSTRING(nfi.type_name,14) AS tid, tf.universal, tfa.ancestors, td.vid, td.name, td.weight AS t_weight, th.parent, nfi.field_name, nfi.type_name, nfi.label, nfi.widget_type, nfi.weight, nf.type
+ FROM {node_field_instance} nfi
+ LEFT JOIN {taxonomy_fields} tf ON nfi.field_name=tf.field_name AND SUBSTRING(nfi.type_name,14)=tf.tid
LEFT JOIN {taxonomy_fields_ancestors} tfa ON SUBSTRING(nfi.type_name,14)=tfa.tid
- LEFT JOIN {term_data} td ON SUBSTRING(nfi.type_name,14)=td.tid
+ LEFT JOIN {term_data} td ON SUBSTRING(nfi.type_name,14)=td.tid
+ LEFT JOIN {term_hierarchy} th ON SUBSTRING(nfi.type_name,14)=th.tid
LEFT JOIN {node_field} nf ON nf.field_name=nfi.field_name
WHERE nfi.type_name LIKE 'term_related_%%' AND ((tf.delta IS NULL OR tf.delta=0 ) OR (tf.delta=1 AND tf.delta!=0))
- ORDER BY td.name, nfi.weight");
- $output.='<h3>Fields assigned to terms:</h3>';
-
+ ORDER BY td.vid, t_weight, td.name, nfi.weight");
+ $output.='<h3>Fields assigned to terms:</h3>';
+
$field_output=array();
while($field_list=db_fetch_object($query)){
@@ -196,6 +197,9 @@
$field_output[$field_list->tid]['rows'][$field_list->field_name][]=l(t('edit'), 'admin/content/taxonomy_fields/'.ltrim(strrchr($field_list->type_name,'_'),'_').'/fields/'.$field_list->field_name);
$field_output[$field_list->tid]['rows'][$field_list->field_name][]=l(t('remove'), 'admin/content/taxonomy_fields/'.ltrim(strrchr($field_list->type_name,'_'),'_').'/fields/'.$field_list->field_name.'/remove');
$field_output[$field_list->tid]['name']=$field_list->name;
+ $field_output[$field_list->tid]['vid'] = $field_list->vid;
+ $field_output[$field_list->tid]['weight'] = $field_list->t_weight;
+ $field_output[$field_list->tid]['parent'] = $field_list->parent;
}
}
if($field_output){
The code of theme function later ;-)
Nice module, great possibilities! Thanks!
Comments
Comment #1
tema commentedTake it!
Comment #2
tema commentedA screen capture of modified 'admin/content/taxonomy_fields' page (sorry, in Russian :)
Comment #3
tema commentedMy tipo: $header variable is declared in wrong function.
For using this in template.php rename function 'theme_taxonomy_fields_list_output' to 'phptemplate_taxonomy_fields_list_output' or '[your_theme_name]_taxonomy_fields_list_output'.
Comment #4
boneless commentedcool stuff!
i'll implement it in the next version!
thanks a lot ;)
Comment #5
boneless commentedincluded in 5.x-1.5
thanks again!