/** * Captures the forum display and passes control to forum-display.tpl.php. * The variables, will be available in forum-display.tpl.php */function phptemplate_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_per_page) { // Pass to phptemplate, including translating the parameters to an associative array. // The element names are the names that the variables // will be assigned within your template. return _phptemplate_callback('forum-display', array('forums' => $forums, 'topics' => $topics, 'parents' => $parents, 'tid' => $tid, 'sortby' => $sortby, 'forum_per_page' => $forum_per_page)); }/** * Captures the forum list and passes control to forum-list.tpl.php. * The variables, $forums, $parents and $tid will be available in forum-list.tpl.php*/function phptemplate_forum_list($forums, $parents, $tid) { return _phptemplate_callback('forum-list', array('forums' => $forums, 'parents' => $parents, 'tid' => $tid)); }/** * Captures the forum topic list and passes control to forum-topic-list.tpl.php. * The variables, $tid, $topics, $sortby and $forum_per_page will be available in forum-topic-list.tpl.php*/function phptemplate_forum_topic_list($tid, $topics, $sortby, $forum_per_page) { global $forum_topic_list_header; if ($topics) { foreach ($topics as $topic) { // folder is new if topic is new or there are new comments since last visit if ($topic->tid != $tid) { $rows[] = array( array('data' => theme('forum_icon', $topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'), array('data' => check_plain($topic->title), 'class' => 'title'), array('data' => l(t('This topic has been moved'), "forum/$topic->tid"), 'colspan' => '3') ); } else { $rows[] = array( array('data' => theme('forum_icon', $topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'), array('data' => l($topic->title, "node/$topic->nid"), 'class' => 'topic'), array('data' => $topic->num_comments . ($topic->new_replies ? '<br />'. l(format_plural($topic->new_replies, '1 new', '%count new'), "node/$topic->nid", NULL, NULL, 'new') : ''), 'class' => 'replies'), array('data' => _forum_format($topic), 'class' => 'created'), array('data' => _forum_format($topic->last_reply), 'class' => 'last-reply') ); } } } $output .= theme('table', $forum_topic_list_header, $rows); $output .= theme('pager', NULL, $forum_per_page, 0); return $output; //return _phptemplate_callback('forum-topic-list', array('tid'=>$tid, 'topics'=>$topics, 'sortby'=>$sortby, 'forum_per_page'=>$forum_per_page)); }