$aim_img = $contact_icons; $aim = strip_tags($contact_icons); $msn_img = ( $postrow[$i]['user_msnm'] ) ? '' . $lang['Button_Skype'] . '' : ''; $yim_img = ( $postrow[$i]['user_yim'] ) ? '' . $lang['Button_Yahoo'] . '' : ''; $garage_img = ( $postrow[$i]['garage_id'] ) ? '' . $lang['Button_Garage'] . '' : ''; } else { $profile_img = ''; $profile = ''; $profile_url = ''; $pm_img = ''; $email_img = ''; $www_img = ''; $icq_status_img = ''; $icq_img = ''; $aim_img = ''; $msn_img = ''; $yim_img = ''; $garage_img = ''; } // Non-customers are not allowed to citate. if ( (isset($dbshopname)) && ($userdata['support_level'] == SUPPORT_LEVEL_NONE) && ($userdata['session_logged_in']) ) { $temp_url = append_sid("profile.$phpEx?mode=register"); } else { $temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); } $quote_img = '' . $lang['Button_Quote'] . ''; $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts"); $search_img = '' . $lang['Button_SearchPosts'] . ''; if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] ) { $temp_url = append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $edit_img = '' . $lang['Button_Edit'] . ''; } else { $edit_img = ''; } if ( $is_auth['auth_mod'] ) { $temp_url = append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id); $ip_img = '' . $lang['Button_IP'] . ''; $ip = '' . $lang['View_IP'] . ''; $temp_url = append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $delpost_img = ''; $delpost = '' . $lang['Delete_post'] . ''; } else { $ip_img = ''; $ip = ''; if ( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id'] ) { $temp_url = append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $delpost_img = ''; $delpost = '' . $lang['Delete_post'] . ''; } else { $delpost_img = ''; $delpost = ''; } } $post_subject = ( isset($postrow[$i]['post_subject']) && $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : $topic_title; $post_subject = unicode2html($post_subject); $message = unicode2html($postrow[$i]['post_text']); $bbcode_uid = $postrow[$i]['bbcode_uid']; $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : ''; $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid']; // Substr message here if visitor not logged in and is no search engine. if( (isset($dbshopname)) && (!$userdata['session_logged_in']) && (!bot_viewing()) ) { if( ($cat_type != CAT_TYPE_WEBLOG) && ($teaser_only) ) { if( ($i >= $teaser_posts) && ($i > 1) ) { // Stop output here! $total_posts = $teaser_posts; $message = $lang['No_customer']; // Even when there should be nothing clickable, teaser posts should tease. $posting_is_teaser = true; } } } // // Note! The order used for parsing the message _is_ important, moving things around could break any // output // // // If the board has HTML off but the post has HTML // on then we process it, else leave it alone // if ( !$board_config['allow_html'] ) { if ( $user_sig != '' && $userdata['user_allowhtml'] ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); } if ( $postrow[$i]['enable_html'] ) { $message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message); } } // // Parse message and/or sig for BBCode if reqd // if ( $board_config['allow_bbcode'] && ( $postrow[$i]['poster_id'] != ANONYMOUS ) ) { if ( $user_sig != '' && $user_sig_bbcode_uid != '' ) { $user_sig = bbencode_second_pass($user_sig, $user_sig_bbcode_uid); } if ( $bbcode_uid != '' ) { $message = bbencode_second_pass($message, $bbcode_uid); } } else { if ( $user_sig != '' && $user_sig_bbcode_uid != '' ) { $user_sig = bbencode_strip($user_sig, $user_sig_bbcode_uid); } if ( $bbcode_uid != '' ) { $message = bbencode_strip($message, $bbcode_uid); } } // RKA: for default, only admin links are not nofollow. Normal user's links are only // dofollow, if they are whitelisted. if ( $user_sig != '' ) { $user_sig = make_clickable($user_sig, ($postrow[$i]['user_level'] == ADMIN)); $user_sig = url_whitelist_dofollow($user_sig); } if ( ( $postrow[$i]['poster_id'] != ANONYMOUS ) || $posting_is_teaser ) { $message = make_clickable($message, ($postrow[$i]['user_level'] == ADMIN)); $message = url_whitelist_dofollow($message); } // // Highlight active words (primarily for search) // if ($highlight_match) { $message = substr(preg_replace_callback('#(\>(((?>([^><]+|(?R)))*)\<))#s', "sub_highlight_match", '>' . $message . '<'), 1, -1); } // // Replace naughty words // if(count($orig_word)) { $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); if($user_sig != '') { $user_sig = preg_replace($orig_word, $replacement_word, $user_sig); } $message = preg_replace($orig_word, $replacement_word, $message); } if(count($ad_word)) { // Show every adword max x times for guests but not for robots if((!$userdata['session_logged_in']) && $user_viewing) { $message = preg_replace($ad_word, $ad_link, $message, ($cat_type == CAT_TYPE_CONTENT) ? 3 : 2); } else if($userdata['session_logged_in'] && !$is_auth['auth_mod']) { $message = preg_replace($ad_word, $ad_link, $message, ($cat_type == CAT_TYPE_CONTENT) ? 2 : 1); } } // Explain lex words if($user_viewing && $lex_active) { if(count($lex_word)) { $message = preg_replace($lex_word, $lex_planation, $message); } } // // Parse smilies // if ( $board_config['allow_smilies'] ) { if ( $postrow[$i]['user_allowsmile'] && $user_sig != '' ) { $user_sig = smilies_pass($user_sig); } if ( $postrow[$i]['enable_smilies'] ) { $message = smilies_pass($message); } } // // Replace newlines in user_sig // if ( $user_sig != '' ) { $user_sig = '
' . str_replace("\n", "\n
\n", $user_sig) . '
'; } // RKA If user not logged in, embedd advertising in message $ad_text_block = ''; if(!$userdata['session_logged_in'] && !empty($ad_text_block)) { $lines = explode("\n", $message); $counter = 0; $message = ''; foreach($lines as $line) { $message .= $line . "
\n"; if($counter++ == 26) { $message .= $ad_text_block . "\n"; $counter = 0; } } } else { $message = str_replace("\n", "\n
\n", $message); } // BEGIN Quiz Hack $quiz_img = ''; $quiz_txt = ''; if ( !empty($forum_topic_data['topic_quiz']) ) { if ( $postrow[$i]['post_id'] == $forum_topic_data['topic_first_post_id'] ) { if ( !isset($quiz) ) { include($phpbb_root_path . 'includes/quiz.'.$phpEx); } $message = $quiz->insert_block(QUIZ_QUESTION, $message, $topic_id); } else if ( !empty($postrow[$i]['quiz_answer']) ) { if ( !isset($quiz) ) { include($phpbb_root_path . 'includes/quiz.'.$phpEx); } $message = $quiz->insert_block(QUIZ_ANSWER, $message, $topic_id, $postrow[$i]); } if ( $is_auth['auth_mod'] ) { switch ( $forum_topic_data['topic_quiz'] ) { case '1': if ( $postrow[$i]['post_id'] != $forum_topic_data['topic_first_post_id'] ) { $temp_url = append_sid("quiz.$phpEx?mode=manual_ok&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $quiz_img = '' . $lang['Quiz_answer_manual_ok'] . ''; $quiz_txt = '' . $lang['Quiz_answer_manual_ok'] . ''; } break; case '2': if ( $postrow[$i]['post_id'] == $forum_topic_data['topic_first_post_id'] ) { $temp_url = append_sid("quiz.$phpEx?mode=disagree_answer&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $quiz_img = '' . $lang['Quiz_disagree_answer'] . ''; $quiz_txt = '' . $lang['Quiz_disagree_answer'] . ''; } break; case '3': if ( $postrow[$i]['post_id'] != $forum_topic_data['topic_first_post_id'] ) { if ( !isset($quiz) ) { include($phpbb_root_path . 'includes/quiz.'.$phpEx); } if ( empty($quiz->quiz_data) ) { $quiz->get_quiz_data($topic_id); } if ( $postrow[$i]['post_id'] < $quiz->quiz_data['quiz_bot_post_id'] ) { $temp_url = append_sid("quiz.$phpEx?mode=correct_answer&" . POST_POST_URL . "=" . $postrow[$i]['post_id']); $quiz_img = '' . $lang['Quiz_correct_answer'] . ''; $quiz_txt = '' . $lang['Quiz_correct_answer'] . ''; } } break; } } } // END Quiz Hack // // Editing information // if ( $postrow[$i]['post_edit_count'] ) { $l_edit_time_total = ( $postrow[$i]['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; $l_edited_by = '

' . sprintf($l_edit_time_total, $topic_modified, $postrow[$i]['post_edit_count']); } else { $l_edited_by = ''; } // Karma Mod applaud/smite $applaud_url = $applaud_img = ''; $smite_url = $smite_img = ''; $poster_karma = ''; if ( $poster_id != ANONYMOUS ) { $karma_post_id = $postrow[$i]['post_id']; $poster_karma = $lang['Karma'] . ": +$karma_plus / -$karma_minus"; // Every user can applaud $applaud_url = append_sid("karma.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id . '&' . POST_USERS_URL . '=' . $poster_id . '&x=applaud' . "&p=$karma_post_id&start=$start"); $applaud_img = '' . $applaud_alt . ''; // Smite can be done only to users with lower rank and if logged in if ( ($userdata['session_logged_in']) && ($is_auth['auth_mod'] || ($userdata['user_rank'] < $postrow[$i]['user_rank']) ) ) { $smite_url = append_sid("karma.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id . '&' . POST_USERS_URL . '=' . $poster_id . '&x=smite' . "&p=$karma_post_id&start=$start"); $smite_img = '' . $smite_alt . ''; } } // RKA: User support level // With all normal users, support depends on asshole or not if ( $postrow[$i]['support_level'] == SUPPORT_LEVEL_PREMIUM ) { $support_level = '' . $lang['Support_Level_Premium'] . ''; } else if ( $postrow[$i]['support_level'] == SUPPORT_LEVEL_VCDS ) { $support_level = '' . $lang['Support_Level_VCDS'] . ''; } else if ( $postrow[$i]['support_level'] == SUPPORT_LEVEL_GS911 ) { $support_level = '' . $lang['Support_Level_GS911'] . ''; } else if ( $postrow[$i]['support_level'] == SUPPORT_LEVEL_ADMIN ) { // Admin has no real support level, show no text. $support_level = ''; } else if ( $postrow[$i]['support_level'] == SUPPORT_LEVEL_MOD ) { // Moderators need no support package, also user rank 'Schrauber' with rank id 3. $support_level = '' . $lang['Support_Level_Mod'] . ''; } else { $support_level = '' . $lang['Support_Level_None'] . ''; } // Karma Mod, RKA: User who like this post if($postrow[$i]['karma_like_user_ids']) { $karma_likes = obtain_karma_list($postrow[$i]['karma_like_user_ids']); } else { $karma_likes = ''; } // // Again this will be handled by the templating // code at some point // $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; // RKA advertising for unregistered users if((!($i % 3)) && (!($userdata['session_logged_in']))) { $adblock = $adblocktext; } else { $adblock = ''; } $template->assign_block_vars('postrow', array( 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'POSTER_NAME' => $poster, 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image, 'POSTER_JOINED' => $poster_joined, 'POSTER_KARMA' => $poster_karma, 'POSTER_POSTS' => $poster_posts, 'POSTER_FROM' => $poster_from, 'POSTER_AVATAR' => $poster_avatar, 'POST_DATE' => $post_date, 'POST_DATE_TZ' => $post_date_tz, 'POST_MODIFIED' => $topic_modified, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by, 'MINI_POST_IMG' => $mini_post_img, 'APPLAUD_IMG' => $applaud_img, 'SMITE_IMG' => $smite_img, 'PROFILE_IMG' => $profile_img, 'PROFILE' => $profile, 'SEARCH_IMG' => $search_img, 'PM_IMG' => $pm_img, 'EMAIL_IMG' => $email_img, 'WWW_IMG' => $www_img, 'EDIT_IMG' => $edit_img, 'QUOTE_IMG' => $quote_img, 'IP_IMG' => $ip_img, 'IP' => $ip, 'DELETE_IMG' => $delpost_img, 'DELETE' => $delpost, 'QUIZ_IMG' => $quiz_img, 'QUIZ' => $quiz_txt, // RKA users that bought something from me get premium support (depending on the support level) 'SUPPORT_LEVEL' => $support_level, 'KARMA_LIKES' => $karma_likes, 'GARAGE_IMG' => $garage_img, 'VIEW_POSTER_CARPROFILE' => $poster_car_view_vehicle, 'AD_BLOCK' => $adblock, 'L_MINI_POST_ALT' => $mini_post_alt, 'L_APPLAUD_ALT' => $applaud_alt, 'L_SMITE_ALT' => $smite_alt, 'U_APPLAUD' => $applaud_url, 'U_SMITE' => $smite_url, 'U_POSTER_PROFILE' => $profile_url, 'U_POST_ID' => $postrow[$i]['post_id']) ); display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']); } if(isset($_GET['printertopic'])) $gen_simple_header = TRUE; else ratings_view_topic($topic_title, $topic_published, $topic_modified, $open_graph_img_url, $open_graph_img_width, $open_graph_img_height, $req_type . '://' . trim($board_config['server_name']) . trim($board_config['script_path']) . $canonical_url, $topic_description); $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>