diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-22 15:29:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-22 15:29:30 +0000 |
commit | a3215984932bc74ebd3514544fa11a0a536360bc (patch) | |
tree | 83c60b6ea84e4707752cdad789edd3601b751d63 /modules | |
parent | c0ec9bd51674401d27c7af8372262fa1f2d589e5 (diff) | |
download | brdo-a3215984932bc74ebd3514544fa11a0a536360bc.tar.gz brdo-a3215984932bc74ebd3514544fa11a0a536360bc.tar.bz2 |
- Patch #556136 by catch, dereine: remove theme_forum_topic_navigation().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/forum/forum-topic-navigation.tpl.php | 0 | ||||
-rw-r--r-- | modules/forum/forum.css | 17 | ||||
-rw-r--r-- | modules/forum/forum.module | 56 | ||||
-rw-r--r-- | modules/system/system.api.php | 3 |
4 files changed, 0 insertions, 76 deletions
diff --git a/modules/forum/forum-topic-navigation.tpl.php b/modules/forum/forum-topic-navigation.tpl.php deleted file mode 100644 index e69de29bb..000000000 --- a/modules/forum/forum-topic-navigation.tpl.php +++ /dev/null diff --git a/modules/forum/forum.css b/modules/forum/forum.css index 1fc37f049..f8dcab544 100644 --- a/modules/forum/forum.css +++ b/modules/forum/forum.css @@ -20,20 +20,3 @@ margin-left: 20px; } -.forum-topic-navigation { - padding: 1em 0 0 3em; /* LTR */ - border-top: 1px solid #888; - border-bottom: 1px solid #888; - text-align: center; - padding: 0.5em; -} -.forum-topic-navigation .topic-previous { - text-align: right; /* LTR */ - float: left; /* LTR */ - width: 46%; -} -.forum-topic-navigation .topic-next { - text-align: left; /* LTR */ - float: right; /* LTR */ - width: 46%; -} diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 4bbef2829..c6816ac80 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -53,10 +53,6 @@ function forum_theme() { 'template' => 'forum-icon', 'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0), ), - 'forum_topic_navigation' => array( - 'template' => 'forum-topic-navigation', - 'arguments' => array('node' => NULL), - ), 'forum_submitted' => array( 'template' => 'forum-submitted', 'arguments' => array('topic' => NULL), @@ -212,12 +208,6 @@ function forum_node_view($node, $build_mode) { } drupal_set_breadcrumb($breadcrumb); - if ($build_mode == 'full') { - $node->content['forum_navigation'] = array( - '#markup' => theme('forum_topic_navigation', $node), - '#weight' => 100, - ); - } } } } @@ -994,52 +984,6 @@ function template_preprocess_forum_icon(&$variables) { } /** - * Preprocess variables to format the next/previous forum topic navigation links. - * - * $variables contains $node. - * - * @see forum-topic-navigation.tpl.php - * @see theme_forum_topic_navigation() - */ -function template_preprocess_forum_topic_navigation(&$variables) { - $output = ''; - - // Get previous and next topic. - $query = db_select('node', 'n'); - $query->join('node_comment_statistics', 'ncs', 'n.nid = ncs.nid'); - $query->join('forum', 'f', 'n.vid = f.vid AND f.tid = :tid', array(':tid' => isset($variables['node']->tid) ? $variables['node']->tid : 0)); - - $order = _forum_get_topic_order(variable_get('forum_order', 1)); - $result = $query - ->fields('n', array('nid', 'title', 'sticky')) - ->fields('ncs', array('comment_count', 'last_comment_timestamp')) - ->condition('n.status', 1) - ->addTag('node_access') - ->orderBy('n.sticky', 'DESC') - ->orderBy($order['field'], strtoupper($order['sort'])) - ->execute(); - - $stop = $variables['prev'] = $variables['next'] = 0; - - foreach ($result as $topic) { - if ($stop == 1) { - $variables['next'] = $topic->nid; - $variables['next_title'] = check_plain($topic->title); - $variables['next_url'] = url("node/$topic->nid"); - break; - } - if ($topic->nid == $variables['node']->nid) { - $stop = 1; - } - else { - $variables['prev'] = $topic->nid; - $variables['prev_title'] = check_plain($topic->title); - $variables['prev_url'] = url("node/$topic->nid"); - } - } -} - -/** * Process variables to format submission info for display in the forum list and topic list. * * $variables will contain: $topic diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 05070ae4d..8d1bda405 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -692,9 +692,6 @@ function hook_theme($existing, $type, $theme, $path) { 'forum_icon' => array( 'arguments' => array('new_posts' => NULL, 'num_posts' => 0, 'comment_mode' => 0, 'sticky' => 0), ), - 'forum_topic_navigation' => array( - 'arguments' => array('node' => NULL), - ), ); } |