'Views Tabs', 'page callback' => 'drupal_get_form', 'page arguments' => array('views_tabs_admin_settings'), 'access arguments' => array('administer site configuration'), 'type' => MENU_LOCAL_TASK, ); return $items; } /** * Administration settings form. */ function views_tabs_admin_settings() { $form = array(); $options = array('0' => t('none')) + drupal_map_assoc(array(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 200)); $form['views_tabs_truncate_length'] = array( '#type' => 'select', '#title' => t('Maximum length of tab titles'), '#default_value' => variable_get('views_tabs_truncate_length', 0), '#options' => $options, '#description' => t('Views presented on tabs use content titles for the tab titles. You can limit the length of these tab titles by selecting a maximum length here. Titles will be cut (truncated) to the nearest word. Choose "none" to display full titles.'), ); return system_settings_form($form); } /** * Display the nodes of a view on tabs. */ function theme_views_tabs_display($view, $nodes, $type, $teasers = FALSE, $links = TRUE) { // $fields = _views_get_fields(); $tabset = array( '#type' => 'tabset', ); foreach ($nodes as $node) { switch ($view->type) { case 'tabs_fields': $item = ''; foreach ($view->field as $field) { if ($fields[$field['id']]['visible'] !== FALSE) { if ($field['label']) { $item .= "