Index: term_display.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/term_display/term_display.module,v
retrieving revision 1.2.2.6
diff -U3 -r1.2.2.6 term_display.module
--- term_display.module 26 Feb 2009 20:55:58 -0000 1.2.2.6
+++ term_display.module 15 Mar 2009 17:59:18 -0000
@@ -7,19 +7,43 @@
define('TERM_DISPLAY_NONE', 'none');
define('TERM_DISPLAY_LOAD', 'load');
+
+/**
+ * Theme terms as a list.
+ */
+function theme_term_display_list($vocabulary, $terms) {
+ $links = array();
+ foreach($terms as $term) {
+ $links[] = l($term->name, taxonomy_term_path($term));
+ }
+ return theme('item_list', $links, check_plain($vocabulary->name), 'ul', array('class' => 'vocabulary-list'));
+}
+
+/**
+ * Theme terms as a comma-separated list.
+ */
+function theme_term_display_custom($vocabulary, $terms) {
+ $links = array();
+ foreach($terms as $term) {
+ $links[] = l($term->name, taxonomy_term_path($term));
+ }
+ return '
' . check_plain($vocabulary->name) . ': ' . implode(', ', $links) . '
';
+}
+
+
/**
* Implementation of hook_form_alter().
*/
function term_display_form_alter($form_id, &$form) {
if ($form_id == 'taxonomy_form_vocabulary') {
-
+
$term_display_data = term_display_data($form['vid']['#value']);
-
+
// Lighten the main fields so they're above ours.
$form['name']['#weight'] = -4;
$form['description']['#weight'] = -3;
$form['help']['#weight'] = -2;
-
+
$form['term_display'] = array(
'#type' => 'fieldset',
'#title' => t('Display options'),
@@ -143,26 +167,3 @@
break;
}
}
-
-/**
- * Theme terms as a list.
- */
-function theme_term_display_list($vocabulary, $terms) {
- foreach($terms as $term) {
- $term_links[] = l($term->name, taxonomy_term_path($term));
- }
-
- return theme('item_list', $term_links, check_plain($vocabulary->name), 'ul', array('class' => 'vocabulary-list'));
-}
-
-/**
- * Theme terms as a comma-separated list.
- */
-function theme_term_display_custom($vocabulary, $terms) {
- $links = array();
- foreach($terms as $term) {
- $links[] = l($term->name, taxonomy_term_path($term));
- }
- return '' . check_plain($vocabulary->name) .': '. implode(', ', $links) .'
';
-
-}
\ No newline at end of file