', $context['first_new_message'] ? '' : ''; ///START rateTopic code echo ' '; //END rateTopic code // Is this topic also a poll? if ($context['is_poll']) { echo '
', $txt['smf43'], '', $context['poll']['is_locked'] ? ' (Locked)' : '','
 
'; // Are they not allowed to vote but allowed to view the options? if ($context['poll']['show_results'] || !$context['allow_vote']) { echo '
', $txt['smf21'], ': ', $context['poll']['question']; if (!empty($context['poll']['expire_time'])) echo '  (', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')'; echo'
'; // Show each option with its corresponding percentage bar. foreach ($context['poll']['options'] as $option){ echo ' ', $context['allow_poll_view'] ? ' ' : '', ' ';} echo '
', $option['option'], '' . $option['bar'] . ' ' . $option['votes'] . ' (' . $option['percent'] . '%)

'; // If they are allowed to revote - show them a link! if ($context['allow_change_vote']) echo '[', $txt['poll_change_vote'], '] '; // If we're viewing the results... maybe we want to go back and vote? if ($context['poll']['show_results'] && $context['allow_vote']) echo '[', $txt['poll_return_vote'], '] '; // If they're allowed to lock the poll, show a link! if ($context['poll']['lock']) echo '[', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '] '; // If they're allowed to edit the poll... guess what... show a link! if ($context['poll']['edit']) echo '[', $txt['smf39'], '] ', $context['allow_poll_view'] ? ' - ' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '' : '', ''; } // They are allowed to vote! Go to it! else { echo '
'; // Show a warning if they are allowed more than one option. if ($context['poll']['allowed_warning']) echo ' ', $context['poll']['allowed_warning'], ''; echo''; // Show each option with its button - a radio likely. foreach ($context['poll']['options'] as $option) echo ' '; echo '
', $option['vote_button'], '', $option['option'], '

'; // Allowed to view the results? (without voting!) if ($context['allow_poll_view']) echo '[', $txt['smf29'], '] '; // Show a link for locking the poll as well... if ($context['poll']['lock']) echo '[', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '] '; // Want to edit it? Click right here...... if ($context['poll']['edit']) echo '[', $txt['smf39'], '] '; } echo '
',theme_windowfoot(),''; echo '
'; } echo '
'; echo '
',$context['subject'],'
 
'; /*// Does this topic have some events linked to it? if (!empty($context['linked_calendar_events'])) { echo ' ', $txt['calendar_linked_events'], ' '; } */ // Show the page index... "Pages: [1]". echo '
', $txt[139], ': ', $context['page_index'], '
'; $buttonArray = array(); if ($context['can_reply']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; if ($context['can_mark_notify']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; if ($context['user']['is_logged'] && $settings['show_mark_read']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; echo implode($context['menu_separator'], $buttonArray); if(!empty($modSettings['topbottomEnable'])){echo'' . $txt['topbottom5'] . '';} echo '
'; // These are some cache image buttons we may want. $reply_button = create_button('quote.gif', 145, 'smf240', 'align="middle"'); $modify_button = create_button('modify.gif', 66, 17, 'align="middle"'); $remove_button = create_button('delete.gif', 121, 31, 'align="middle"'); $split_button = create_button('split.gif', 'smf251', 'smf251', 'align="middle"'); // Time to display all the posts echo''; // Get all the messages... while ($message = $context['get_message']()) { echo''; echo ''; echo''; } echo'
'; if (file_exists( $_SERVER{'DOCUMENT_ROOT'} . "/userimg/" . $message['member']['id'] . ".jpg")) { echo '' . $message['member']['name'] . '';} else {echo $message['member']['name'];} echo' ',$message['time'],''; // Can they reply? Have they turned on quick reply? if ($context['can_reply'] && !empty($options['display_quick_reply'])) echo 'Reply'; // So... quick reply is off, but they *can* reply? elseif ($context['can_reply']) echo ' Reply'; // Can the user modify the contents of this post? if ($message['can_modify']) echo ' Edit'; // How about... even... remove it entirely?! if ($message['can_remove']) echo ' Del'; // What about splitting it off the rest of the topic? if ($context['can_split']) echo ' Split'; //Can they report the post? if ($context['can_report_moderator']) echo ' Report'; // Show a checkbox for quick moderation? if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove']) echo ' '; echo'
'; // Show the message anchor and a "new" anchor if this message is new. if ($message['id'] != $context['first_message']) echo ' ', $message['first_new'] ? '' : ''; // Show information about the poster of this message. echo '
'; // Show avatars, images, etc.? if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image'])){ echo ' ';} echo'
'; // Show the member's custom title, if they have one. if (isset($message['member']['title']) && $message['member']['title'] != '') echo ' ', $message['member']['title'], '
'; // Show the member's primary group (like 'Administrator') if they have one. if (isset($message['member']['group']) && $message['member']['group'] != '') echo ' ', $message['member']['group'], '
'; // Don't show these things for guests. if (!$message['member']['is_guest']) { // Show the post group if and only if they have no other group or the option is on, and they are in a post group. if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '') echo ' ', $message['member']['post_group'], '
'; echo ' ', $message['member']['group_stars'], '
'; // Is karma display enabled? Total or +/-? if ($modSettings['karmaMode'] == '1') echo '
', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
'; elseif ($modSettings['karmaMode'] == '2') echo '
', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '
'; //START rateTopic code if($message['Rate_User']){ echo ''.$context['topic_rate'][$message['Rate_User']['id_image']]['title'].'
'; } //END Rate Topic Code // Is this user allowed to modify this member's karma? if ($message['member']['karma']['allow']){ if(($message['member']['name']) == 'ANDMILLIONAIRE'){ echo'[WINNER]';} else{ echo ' ', $modSettings['karmaApplaudLabel'], '';} echo' ', $modSettings['karmaSmiteLabel'], '
';} // Show online and offline buttons? if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) echo ' ', $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? '' . $message['member']['online']['text'] . '' : $message['member']['online']['text'], $context['can_send_pm'] ? '' : '', $settings['use_image_buttons'] ? ' ' . $message['member']['online']['text'] . '' : '', '

'; // Show the member's gender icon? if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '') echo ' ', $txt[231], ': ', $message['member']['gender']['image'], '
'; // Show how many posts they have made. echo ' ', $txt[26], ': ', $message['member']['posts'], '

'; // Show their personal text? if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') echo ' ', $message['member']['blurb'], ''; } // Done with the information about the poster... on to the post itself. echo '
'; // Show the member's signature? if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) echo ''; echo '
'; // Show the post itself, finally! echo '

',$message['body'],''; echo '
', $message['can_modify'] ? ' ' : '' , ''; // Now for the attachments, signature, ip logged, etc... echo '
'; // Assuming there are attachments... if (!empty($message['attachment'])) { echo '
'; foreach ($message['attachment'] as $attachment) { if ($attachment['is_image']) { if ($attachment['thumbnail']['has_thumb']) echo '
'; else echo '
'; } echo ' * ' . $attachment['name'] . ' (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)
'; } echo '
'; } echo '
'; // Show "« Last Edit: Time by Person »" if this post was edited. if ($settings['show_modify'] && !empty($message['modified']['name'])) echo ' « ', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], ' »'; //START Rate Topic echo '
'; if((!$context['user']['is_guest']) && ($message['member']['id'] != $context['user']['id'])){ echo '
'; foreach($context['topic_rate'] as $rateId => $rateInfo) { echo ' '; } echo '
'; } echo '
'; foreach($message['Rate_Topic'] as $row){ echo $row['totals'].'x '.$context['topic_rate'][$row['id_image']]['title'].' '; } echo '


'; //END Rate Topic echo '

', $message['member']['signature'], '
'; echo ' '; // Show the IP to this user for this post - because you can moderate? if ($context['can_moderate_forum'] && !empty($message['member']['ip'])) echo ' ', $message['member']['ip'], ' (?)'; // Or, should we show it because this is you? elseif ($message['can_see_ip']) echo ' ', $message['member']['ip'], ''; // Okay, are you at least logged in? Then we can show something about why IPs are logged... elseif (!$context['user']['is_guest']) echo ' ', $txt[511], ''; // Otherwise, you see NOTHING! else echo ' ', $txt[511]; echo'
'; // Don't show these things for guests. if (!$message['member']['is_guest']) { // This shows the popular messaging icons. echo ' ', $message['member']['icq']['link'], ' ', $message['member']['msn']['link'], ' ', $message['member']['aim']['link'], ' ', $message['member']['yim']['link'], ''; // Show the profile, website, email address, and personal message buttons. if ($settings['show_profile_buttons']) { // Don't show the profile button if you're not allowed to view the profile. if ($message['member']['can_view_profile']) echo ' ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; // Don't show an icon if they haven't specified a website. if ($message['member']['website']['url'] != '') echo ' ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; // Don't show the email address if they want it hidden. if (empty($message['member']['hide_email'])) echo ' ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; // Since we know this person isn't a guest, you *can* message them. if ($context['can_send_pm']) echo ' ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; } } // Otherwise, show the guest's email. elseif (empty($message['member']['hide_email'])) echo '', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; echo'
' . $txt['topbottom4'] . ''; echo'
'; echo '
'; if (!empty($settings['display_who_viewing'])) { echo'
'; // Show just numbers...? if ($settings['display_who_viewing'] == 1) echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19]; // Or show the actual people viewing the topic? else echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')'); // Now show how many guests are here too. echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], ''; echo'
'; } if(($context['can_moderate_forum'])) echo theme_show_mod_buttons(); echo'
'; // As before, build the custom button right. if ($context['can_add_poll']) $normal_buttons['custom'] = array('text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']); elseif ($context['user']['is_logged'] && $settings['show_mark_read']) $normal_buttons['custom'] = array('text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']); echo '
', $txt[139], ': ', $context['page_index'],'
'; $buttonArray = array(); if ($context['can_reply']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[146] . '' : $txt[146]) . ''; if ($context['can_mark_notify']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt[131] . '' : $txt[131]) . ''; if ($context['user']['is_logged'] && $settings['show_mark_read']) $buttonArray[] = '' . ($settings['use_image_buttons'] ? '' . $txt['mark_unread'] . '' : $txt['mark_unread']) . ''; echo implode($context['menu_separator'], $buttonArray); if(!empty($modSettings['topbottomEnable'])){echo'' . $txt['topbottom4'] . '';} echo '
',theme_windowfoot(),''; if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post']) echo ' '; echo '
'; if ($context['show_spellchecking']) echo ' '; if (empty($settings['use_tabs'])) echo ' '; if ($context['show_spellchecking']) echo ' '; echo' '; echo '
'; if ($context['can_reply'] && !empty($options['display_quick_reply'])) { echo '
',theme_windowfoot(),'
'; } //Jumpbox echo'
' . $txt[160] . ':  
'; if ($context['show_spellchecking']) echo '
'; } function theme_show_mod_buttons() { global $context, $settings, $options, $txt, $scripturl, $modSettings; $moderationButtons = array(); if ($context['can_move']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[132] . '' : $txt[132]) . ''; if ($context['can_delete']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt[63] . '' : $txt[63]) . ''; if ($context['can_lock']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . ''; if ($context['can_sticky']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . ''; if ($context['can_merge']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['smf252'] . '' : $txt['smf252']) . ''; if ($context['can_remove_poll']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['poll_remove'] . '' : $txt['poll_remove']) . ''; if ($context['calendar_post']) $moderationButtons[] = '' . ($settings['use_image_buttons'] ? '' . $txt['calendar37'] . '' : $txt['calendar37']) . ''; if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1) $moderationButtons[] = $settings['use_image_buttons'] ? '' : '' . $txt['quickmod_delete_selected'] . ''; return implode($context['menu_separator'], $moderationButtons); } ?>