Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've added two variables to comment-wrapper template to make it possible to jump to parent and/or any forum from the node page. That's a useful tool for any forum so some developers will probably welcome these additions.
$this_forum is a formated link to the parent forum current node is part of.
$forum_jump is the same jump menu that we've added before to the forum pages and it won't work without those changes.
theme.inc
function advanced_forum_preprocess_comment_wrapper(&$variables) {
...
// add these variables for forum nodes only
if ($variables['node']->type == 'forum') {
$variables['forum_jump'] = advanced_forum_forum_jump($variables['node']->forum_tid);
$variables['this_forum'] = l($variables['node']->taxonomy[$variables['node']->forum_tid]->name, 'forum/'.$variables['node']->forum_tid);
}
...
}
advanced-forum.naked.comment-wrapper.tpl
<?php if (!empty($forum_jump) || !empty($this_forum)): ?>
<div class="forum-jump-tools"><span class="this-forum"><?php print $this_forum; ?></span>
<span class="forum-jump"><?php print $forum_jump; ?></span></div>
<?php endif; ?>