+ + + + + + + + + + + +num_rows($result)) +{ + ($hook = get_hook('vf_pre_topic_loop_start')) ? eval($hook) : null; + + $pun_page['item_count'] = 0; + + while ($cur_topic = $pun_db->fetch_assoc($result)) + { + ++$pun_page['item_count']; + + // Start from scratch + $pun_page['item_subject'] = $pun_page['item_status'] = $pun_page['item_last_post'] = $pun_page['item_alt_message'] = $pun_page['item_nav'] = array(); + $pun_page['item_indicator'] = ''; + $pun_page['item_alt_message'][] = $lang_common['Topic'].' '.($pun_page['start_from'] + $pun_page['item_count']); + + if ($pun_config['o_censoring'] == '1') + $cur_topic['subject'] = censor_words($cur_topic['subject']); + + if ($cur_topic['moved_to'] != null) + { + $pun_page['item_status'][] = 'moved'; + $pun_page['item_last_post'][] = $pun_page['item_alt_message'][] = $lang_forum['Moved']; + $pun_page['item_subject'][] = ''.htmlspecialchars($cur_topic['subject']).''; + $pun_page['item_subject'][] = ''.sprintf($lang_common['By user'], htmlspecialchars($cur_topic['poster'])).''; + $cur_topic['num_replies'] = $cur_topic['num_views'] = ' - '; + } + else + { + // Should we display the dot or not? :) + if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1' && $cur_topic['has_posted'] == $pun_user['id']) + { + $pun_page['item_indicator'] = $lang_forum['You posted indicator']; + $pun_page['item_status'][] = 'posted'; + $pun_page['item_alt_message'][] = $lang_forum['You posted']; + } + + if ($cur_topic['sticky'] == '1') + { + $pun_page['item_subject'][] = $lang_forum['Sticky']; + $pun_page['item_status'][] = 'sticky'; + } + + if ($cur_topic['closed'] == '1') + { + $pun_page['item_subject'][] = $lang_common['Closed']; + $pun_page['item_status'][] = 'closed'; + } + + $pun_page['item_subject'][] = ''.htmlspecialchars($cur_topic['subject']).''; + + $pun_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); + + if ($pun_page['item_pages'] > 1) + $pun_page['item_nav'][] = pun_paginate($pun_page['item_pages'], -1, $pun_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))); + + // Does this topic contain posts we haven't read? If so, tag it accordingly. + if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post']) && (!isset($tracked_topics['forums'][$id]) || $tracked_topics['forums'][$id] < $cur_topic['last_post'])) + { + $pun_page['item_nav'][] = ''.$lang_common['New posts'].''; + $pun_page['item_status'][] = 'new'; + } + + if (!empty($pun_page['item_nav'])) + $pun_page['item_subject'][] = '[ '.implode('  ', $pun_page['item_nav']).' ]'; + + $pun_page['item_subject'][] = ''.sprintf($lang_common['By user'], htmlspecialchars($cur_topic['poster'])).''; + $pun_page['item_last_post'][] = ''.format_time($cur_topic['last_post']).''; + $pun_page['item_last_post'][] = ''.sprintf($lang_common['By user'], htmlspecialchars($cur_topic['last_poster'])).''; + + if (empty($pun_page['item_status'])) + $pun_page['item_status'][] = 'normal'; + } + + $pun_page['item_style'] = (($pun_page['item_count'] % 2 != 0) ? 'odd' : 'even').' '.implode(' ', $pun_page['item_status']); + $pun_page['item_indicator'] = ''.implode(' - ', $pun_page['item_alt_message']).''.$pun_page['item_indicator'].''; + + ($hook = get_hook('vf_row_pre_display')) ? eval($hook) : null; + +?> + + + + + + + +'.$lang_forum['No topics'].''; + +?> + + + + + + + + +
   
+