\n"; } else { return '\n"; } } function acquia_slate_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) { $class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')); if (!empty($extra_class)) { $class .= ' '. $extra_class; } if ($in_active_trail) { $class .= ' active-trail'; } // Add unique identifier static $item_id = 0; $item_id += 1; $id .= ' ' . 'menu-item-custom-id-' . $item_id; // Add semi-unique class $class .= ' ' . preg_replace("/[^a-zA-Z0-9]/", "", strip_tags($link)); return '
  • '. $link . $menu ."
  • \n"; } function acquia_slate_preprocess_forum_topic_list(&$variables) { global $forum_topic_list_header; $forum_topic_list_header = array( array('data' => t('Topic'), 'field' => 'n.title'), array('data' => t('Replies'), 'field' => 'l.comment_count'), array('data' => t('Last Post')), array('data' => t('Views'), 'field' => 'l.last_comment_timestamp'), ); // Create the tablesorting header. $ts = tablesort_init($forum_topic_list_header); $header = ''; foreach ($forum_topic_list_header as $cell) { $cell = tablesort_header($cell, $forum_topic_list_header, $ts); $header .= _theme_table_cell($cell, TRUE); } $variables['header'] = $header; foreach($variables["topics"] as $topic) { $statistics = statistics_get($topic->nid); if ($statistics == null) { $total_count = 0; } else { $total_count = $statistics["totalcount"]; } // Not empty Last Post entry if (trim($topic->last_reply) == "n/a") { $topic->last_reply = $topic->created; } $topic->views_count = $total_count; } } function forum_thread_icon_path() { return "/sites/all/themes/acquia_slate/forum/images"; } function acquia_slate_preprocess_page(&$variables) { // wurde die seite über AJAX request aufgerufen? if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) { $variables['template_files'] = is_array($variables['template_files']) ? $variables['template_files'] : array(); // füge ein neues template hinzu $variables['template_files'][] = 'page-ajax'; } }