$forum_topics = '--'; $forum_target = $forum_data[$j]['forum_ext_newwin'] ? 'target="_external"' : ''; } else { $forum_url = append_sid("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}"); $forum_posts = $forum_data[$j]['forum_posts']; $forum_topics = $forum_data[$j]['forum_topics']; $forum_details = $last_post; } //-- mod: sf /* $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('catrow.forumrow', array( */ $template->assign_block_vars('catrow.forumrow' . ($_sf_is_sub ? '.sub.item' : ''), array('L_SEP' => $forum_id == $_sf_last_sub_id[$_sf_prev_forum_id] ? '' : ',', 'FORUM_DESC_HTML' => htmlspecialchars(preg_replace('#<[\\/\\!]*?[^<>]*?>#si', '', $forum_data[$j]['forum_desc'])), 'U_LAST_POST' => intval($forum_data[$j]['forum_posts']) ? append_sid('viewtopic.' . $phpEx . '?' . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] : append_sid('viewforum.' . $phpEx . '?' . POST_FORUM_URL . '=' . $forum_id), 'L_LAST_POST' => intval($forum_data[$j]['forum_posts']) ? $lang['View_latest_post'] : $folder_alt, 'FORUM_ID' => $forum_id, 'DISPLAY' => is_category_collapsed($cat_id) ? 'none' : '', 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'FORUM_EDIT_IMG' => $userdata['user_level'] == ADMIN && ($userdata['session_admin'] || !$board_config['admin_login']) ? ' <a href="#" onclick="window.open(\'admin/admin_forums.' . $phpEx . '?mode=editforum&in_from=index&' . POST_FORUM_URL . '=' . $forum_id . '&sid=' . $userdata['session_id'] . '\',\'popup\',\'width=600,height=800,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no\'); return false;"><img src="images/forum_edit.gif" border="0"></a>' : '', 'FORUM_FOLDER_IMG' => $folder_image, 'HYPERCELL_CLASS' => get_hypercell_class($forum_data[$j]['forum_status'], $unread_topic), 'FORUM_ICON_IMG' => $icon ? '<img src="' . $phpbb_root_path . $board_config['forum_icon_path'] . '/' . $icon . '" />' : '', 'FORUM_NAME' => $forum_data[$j]['forum_name'], 'FORUM_DESC' => $forum_data[$j]['forum_desc'], 'POSTS' => $forum_posts, 'TOPICS' => $forum_topics, 'LAST_POST' => $forum_details, 'TARGET' => $forum_target, 'MODERATORS' => $moderator_list, 'L_MODERATOR' => $l_moderators, 'L_FORUM_FOLDER_ALT' => $folder_alt, 'U_VIEWFORUM' => $forum_url)); //-- mod: sf if ($_sf_is_sub) { $template->assign_block_vars('catrow.forumrow.sub.item.first' . ($_sf_first_sub ? '' : '_ELSE'), array()); $template->assign_block_vars('catrow.forumrow.sub.item.last' . ($forum_id == $_sf_last_sub_id[$_sf_prev_forum_id] ? '' : '_ELSE'), array()); $template->assign_block_vars('catrow.forumrow.sub.item.link' . (intval($forum_data[$j]['forum_posts']) ? '' : '_ELSE'), array()); $_sf_first_sub = false; } //-- mod: sf - end } } } } // for ... categories } else { message_die(GENERAL_MESSAGE, $lang['No_forums']);
} $topic_author_color = $rcs->get_colors($searchset[$i]); $topic_author = $searchset[$i]['user_id'] != ANONYMOUS ? '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '"' . $topic_author_color . '>' : ''; $topic_author .= $searchset[$i]['user_id'] != ANONYMOUS ? $searchset[$i]['username'] : ($searchset[$i]['post_username'] != '' ? $searchset[$i]['post_username'] : $lang['Guest']); $topic_author .= $searchset[$i]['user_id'] != ANONYMOUS ? '</a>' : ''; $first_post_time = create_date2($board_config['default_dateformat'], $searchset[$i]['topic_time'], $board_config['board_timezone']); $last_post_time = create_date2($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']); $last_post_author_color = $rcs->get_colors($searchset[$i], '', false, 'group_id2', 'color2', 'level2'); $last_post_author = $searchset[$i]['id2'] == ANONYMOUS ? $searchset[$i]['post_username2'] != '' ? $searchset[$i]['post_username2'] : $lang['Guest'] : '<a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $searchset[$i]['id2']) . '"' . $last_post_author_color . '>' . $searchset[$i]['user2'] . '</a>'; $last_post_url = '<a href="' . append_sid("viewtopic.{$phpEx}?" . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; // Start Smilies Invasion Mod if ($board_config['allow_smilies']) { $searchset[$i]['forum_name'] = smilies_pass($searchset[$i]['forum_name']); $topic_title = smilies_pass($topic_title); } $template->assign_block_vars('searchresults', array('FORUM_NAME' => $searchset[$i]['forum_name'], 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'FOLDER' => $folder_image, 'NEWEST_POST_IMG' => $newest_post_img, 'TOPIC_FOLDER_IMG' => $folder_image, 'HYPERCELL_CLASS' => get_hypercell_class($searchset[$i]['topic_status'], $folder_image == $folder_new, $searchset[$i]['topic_type'], $replies), 'GOTO_PAGE' => $goto_page, 'REPLIES' => $replies, 'TOPIC_TITLE' => $topic_title, 'TOPIC_TYPE' => $topic_type, 'VIEWS' => $views, 'TOPIC_AUTHOR' => $topic_author, 'FIRST_POST_TIME' => $first_post_time, 'LAST_POST_TIME' => $last_post_time, 'LAST_POST_AUTHOR' => $last_post_author, 'LAST_POST_IMG' => $last_post_url, 'L_TOPIC_FOLDER_ALT' => $folder_alt, 'U_VIEW_FORUM' => $forum_url, 'U_VIEW_TOPIC' => $topic_url)); //-- mod : post description ---------------------------------------------------- //-- add display_sub_title('searchresults', $topic_sub_title, $board_config['sub_title_length']); //-- fin mod : post description ------------------------------------------------ } } $base_url = "search.{$phpEx}?search_id={$search_id}"; $template->assign_vars(array('PAGINATION' => generate_pagination($base_url, $total_match_count, $per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $per_page) + 1, ceil($total_match_count / $per_page)), 'L_AUTHOR' => $lang['Author'], 'L_MESSAGE' => $lang['Message'], 'L_FORUM' => $lang['Forum'], 'L_TOPICS' => $lang['Topics'], 'L_REPLIES' => $lang['Replies'], 'L_VIEWS' => $lang['Views'], 'L_POSTS' => $lang['Posts'], 'L_LASTPOST' => $lang['Last_Post'], 'L_POSTED' => $lang['Posted'], 'L_SUBJECT' => $lang['Subject'], 'L_GOTO_PAGE' => $lang['Goto_page'])); $template->pparse('body'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx; } else { message_die(GENERAL_MESSAGE, $lang['No_search_match']); } } }
$row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2']; $topic_mod = ''; if ($is_auth['auth_mod']) { $topic_mod .= '<div style="float:right; margin-right: 10px; display: inline-block;">'; $topic_mod .= '<span class="topicmod" id="tmod_' . $topic_id . '">'; $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a> '; $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&mode=move&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a> '; $topic_mod .= $topic_rowset[$i]['topic_status'] == TOPIC_UNLOCKED ? "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&mode=lock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&mode=unlock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a> '; $topic_mod .= "<a href=\"modcp.{$phpEx}?" . POST_TOPIC_URL . "={$topic_id}&mode=split&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a> '; $topic_mod .= '</span>'; $topic_mod .= '</div>'; } if ($board_config['allow_smilies']) { $topic_title = smilies_pass($topic_title); } $template->assign_block_vars('topicrow', array('ROW_COLOR' => $row_color, 'ROW_CLASS' => $row_class, 'FORUM_ID' => $forum_id, 'TOPIC_ID' => $topic_id, 'TOPIC_FOLDER_IMG' => $folder_image, 'HYPERCELL_CLASS' => get_hypercell_class($topic_rowset[$i]['topic_status'], $folder_image == $folder_new, $topic_rowset[$i]['topic_type'], $replies), 'TOPIC_AUTHOR' => $topic_author, 'GOTO_PAGE' => $goto_page, 'REPLIES' => $replies, 'NEWEST_POST_IMG' => $newest_post_img, 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), 'TOPIC_TITLE' => $topic_title, 'TOPIC_TYPE' => $topic_type, 'VIEWS' => $views, 'FIRST_POST_TIME' => $first_post_time, 'LAST_POST_TIME' => $last_post_time, 'LAST_POST_AUTHOR' => $last_post_author, 'LAST_POST_IMG' => $last_post_url, 'TOPIC_MOD' => $topic_mod, 'L_TOPIC_FOLDER_ALT' => $folder_alt, 'U_VIEW_TOPIC' => $view_topic_url)); display_sub_title('topicrow', $topic_sub_title, $board_config['sub_title_length']); if (array_key_exists($i, $dividers)) { $template->assign_block_vars('topicrow.divider', array('L_DIV_HEADERS' => $dividers[$i])); } } $topics_count -= $total_announcements; $topics_count += $total_global_announcements; $template->assign_vars(array('PAGINATION' => generate_pagination("viewforum.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}&topicdays={$topic_days}&sort={$sort_value}&order={$order_value}", $topics_count, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($topics_count / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page'])); // V: better add a switch rather than an ugly empty line at the bottom when no topics $template->assign_var('HAS_TOPICS', true); } else { // // No topics // $no_topics_msg = $forum_row['forum_status'] == FORUM_LOCKED ? $lang['Forum_locked'] : $lang['No_topics_post_one'];
//-- fin mod : quick title edition --------------------------------------------- if (count($orig_word)) { $topic_title = preg_replace($orig_word, $replacement_word, $topic_title); } $u_view_topic = "modcp.{$phpEx}?mode=split&" . POST_TOPIC_URL . "={$topic_id}&sid=" . $userdata['session_id']; $topic_replies = $row['topic_replies']; //-- mod : rank color system --------------------------------------------------- //-- add $topic_author_color = $rcs->get_colors($row); $topic_author = $row['user_id'] != ANONYMOUS ? '<a href="' . $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $row['user_id']), true) . '"' . $topic_author_color . '>' : ''; $topic_author .= $row['user_id'] != ANONYMOUS ? $row['username'] : ($row['post_username'] != '' ? $row['post_username'] : $lang['Guest']); $topic_author .= $row['user_id'] != ANONYMOUS ? '</a>' : ''; $first_post_time = create_date($board_config['default_dateformat'], $row['topic_time'], $board_config['board_timezone']); $last_post_author_color = $rcs->get_colors($row, '', false, 'group_id2', 'color2', 'level2'); $last_post_author = $row['id2'] == ANONYMOUS ? $row['post_username2'] != '' ? $row['post_username2'] : $lang['Guest'] : '<a href="' . $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $row['id2']), true) . '"' . $last_post_author_color . '>' . $row['user2'] . '</a>'; $last_post_url = '<a href="' . $get->url('viewtopic', array(POST_POST_URL => $row['topic_last_post_id']), true, $row['topic_last_post_id']) . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; $views = $row['topic_views']; //-- fin mod : rank color system ----------------------------------------------- $last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']); // Start Smilies Invasion Mod if ($board_config['allow_smilies']) { $topic_title = smilies_pass($topic_title); } // End Smilies Invasion Mod $template->assign_block_vars('topicrow', array('U_VIEW_TOPIC' => $u_view_topic, 'TOPIC_FOLDER_IMG' => $folder_img, 'HYPERCELL_CLASS' => get_hypercell_class($row['topic_status'], false, $row['topic_type']), 'TOPIC_TYPE' => $topic_type, 'TOPIC_TITLE' => $topic_title, 'REPLIES' => $topic_replies, 'TOPIC_AUTHOR' => $topic_author, 'VIEWS' => $views, 'FIRST_POST_TIME' => $first_post_time, 'LAST_POST_TIME' => $last_post_time, 'LAST_POST_AUTHOR' => $last_post_author, 'LAST_POST_IMG' => $last_post_url, 'LAST_POST_TIME' => $last_post_time, 'TOPIC_ID' => $topic_id, 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']), 'L_TOPIC_FOLDER_ALT' => $folder_alt)); } $template->assign_vars(array('PAGINATION' => generate_pagination("modcp.{$phpEx}?" . POST_FORUM_URL . "={$forum_id}&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($forum_topics / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page'])); $template->pparse('body'); break; } include $phpbb_root_path . 'includes/page_tail.' . $phpEx;