', theme_linktree(), ''; echo '
'; // Loop through every main area - giving a nice section heading. foreach ($context['pm_areas'] as $section) { echo ' '; } echo '
', $section['title'], '
'; // Each sub area. foreach ($section['areas'] as $i => $area) { if (empty($area)) echo '
'; // Special case for the capacity bar. elseif (!empty($area['limit_bar'])) { // !!! Hardcoded colors = bad. echo '

', $txt['pm_capacity'], '
90 ? ' style="color: red;"' : ''), '>', $context['limit_bar']['text'], '

'; } else { if ($i == $context['pm_area']) echo ' ', $area['link'], (empty($area['unread_messages']) ? '' : ' (' . $area['unread_messages'] . ')'), '
'; else echo ' ', $area['link'], (empty($area['unread_messages']) ? '' : ' (' . $area['unread_messages'] . ')'), '
'; } } echo '

'; } // Just the end of the index bar, nothing special. function template_pm_below() { global $context, $settings, $options; echo '
'; } function template_folder() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '
'; if (!$context['show_delete']) echo ' '; $next_alternate = false; while ($message = $context['get_pmessage']()) { echo ' '; $next_alternate = $message['alternate']; } echo '
  ', $txt[317], $context['sort_by'] == 'date' ? ' ' : '', ' ', $txt[319], $context['sort_by'] == 'subject' ? ' ' : '', ' ', ($context['from_or_to'] == 'from' ? $txt[318] : $txt[324]), $context['sort_by'] == 'name' ? ' ' : '', '
', $txt[151], '
', $message['is_replied_to'] ? '' . $txt['pm_replied'] . '' : '' . $txt['pm_read'] . '', ' ', $message['time'], ' ', $message['subject'], ' ', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '
', $txt[139], ': ', $context['page_index'], '
 '; if ($context['show_delete']) { if (!empty($context['currently_using_labels']) && $context['folder'] != 'outbox') { echo ' '; } echo ' '; } echo ' '; echo '

'; if ($context['get_pmessage'](true)) { echo '
 ', $txt[29], ' ', $txt[118], '
'; // Cache some handy buttons. $quote_button = create_button('quote.gif', 145, 'smf240', 'align="middle"'); $reply_button = create_button('im_reply.gif', 146, 146, 'align="middle"'); $reply_all_button = create_button('im_reply_all.gif', 'reply_to_all', 'reply_to_all', 'align="middle"'); $forward_button = create_button('quote.gif', 145, 145, 'align="middle"'); $delete_button = create_button('delete.gif', 154, 31, 'align="middle"'); while ($message = $context['get_pmessage']()) { $windowcss = $message['alternate'] == 0 ? 'windowbg' : 'windowbg2'; echo ' '; } echo '
'; // Add an extra line at the bottom if we have labels enabled. if ($context['folder'] != 'outbox' && !empty($context['currently_using_labels'])) { echo ' '; } echo '
', $message['member']['link'], '
'; if (isset($message['member']['title']) && $message['member']['title'] != '') echo ' ', $message['member']['title'], '
'; if (isset($message['member']['group']) && $message['member']['group'] != '') echo ' ', $message['member']['group'], '
'; 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'], '
'; // Is this user allowed to modify this member's karma? if ($message['member']['karma']['allow']) echo ' ', $modSettings['karmaApplaudLabel'], ' ', $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 avatars, images, etc.? if (!empty($settings['show_user_images']) && empty($options['show_no_avatars'])) echo ' ', $message['member']['avatar']['image'], '
'; // Show their personal text? if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '') echo ' ', $message['member']['blurb'], '

'; echo ' ', $message['member']['icq']['link'], ' ', $message['member']['msn']['link'], ' ', $message['member']['yim']['link'], ' ', $message['member']['aim']['link'], '
'; // Show the profile, website, email address, and personal message buttons. if ($settings['show_profile_buttons']) { echo ' ', ($settings['use_image_buttons'] ? '' . $txt[27] . '' : $txt[27]), ''; if ($message['member']['website']['url'] != '') echo ' ', ($settings['use_image_buttons'] ? '' . $txt[515] . '' : $txt[515]), ''; if (empty($message['member']['hide_email'])) echo ' ', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; if (!$context['user']['is_guest'] && $context['can_send_pm']) echo ' ', $settings['use_image_buttons'] ? '' . $message['member']['online']['label'] . '' : $message['member']['online']['label'], ''; } } elseif (empty($message['member']['hide_email'])) echo '

', ($settings['use_image_buttons'] ? '' . $txt[69] . '' : $txt[69]), ''; echo '
', $message['subject'], ''; // Show who the message was sent to. echo '
« ', $txt['sent_to'], ': '; // People it was sent directly to.... if (!empty($message['recipients']['to'])) echo implode(', ', $message['recipients']['to']); // Otherwise, we're just going to say "some people"... elseif ($context['folder'] != 'outbox') echo '(', $txt['pm_undisclosed_recipients'], ')'; echo ' ', $txt[30], ': ', $message['time'], ' »
'; // If we're in the outbox, show who it was sent to besides the "To:" people. if (!empty($message['recipients']['bcc'])) echo '
« ', $txt[1502], ': ', implode(', ', $message['recipients']['bcc']), ' »
'; if (!empty($message['is_replied_to'])) echo '
« ', $txt['pm_is_replied_to'], ' »
'; echo '
'; // Show reply buttons if you have the permission to send PMs. if ($context['can_send_pm']) { // You can't really reply if the member is gone. if (!$message['member']['is_guest']) { // Were than more than one recipient you can reply to? (Only in the "button style", or text) if ($message['number_recipients'] > 1 && (!empty($settings['use_buttons']) || !$settings['use_image_buttons'])) echo ' ', $reply_all_button, '', $context['menu_separator']; echo ' ', $quote_button, '', $context['menu_separator'], ' ', $reply_button, ' ', $context['menu_separator']; } // This is for "forwarding" - even if the member is gone. else echo ' ', $forward_button, '', $context['menu_separator']; } echo ' ', $delete_button, '

', $message['body'], '
', (!empty($modSettings['enableReportPM']) && $context['folder'] != 'outbox' ? '' : ''); // Show the member's signature? if (!empty($message['member']['signature']) && empty($options['show_no_signatures'])) echo '
', $message['member']['signature'], '
'; echo '
'; // Add the label drop down box. if (!empty($context['currently_using_labels'])) { echo ' '; } echo '
', $txt[139], ': ', $context['page_index'], '
'; } echo '
'; } function template_search() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '
'; if (!empty($context['search_errors'])) { echo ' '; } echo '
', $txt['pm_search_title'], '
', implode('
', $context['search_errors']['messages']), '
'; if ($context['simple_search']) { echo ' ', $txt['pm_search_text'], ':
 
', $txt['pm_search_advanced'], ' '; } else { echo ' '; // Do we have some labels setup? If so offer to search by them! if ($context['currently_using_labels']) { echo ' '; } echo '
', $txt['pm_search_text'], ': ', $txt['pm_search_user'], ':
', $txt['pm_search_options'], ': ', $txt['pm_search_post_age'], ':

', $txt['pm_search_between'], '  ', $txt['pm_search_between_and'], '  ', $txt['pm_search_between_days'], '.
', $txt['pm_search_order'], ':
', $txt['pm_search_choose_label'], '
'; $alternate = true; foreach ($context['search_labels'] as $label) { if ($alternate) echo ' '; echo ' '; if (!$alternate) echo ' '; $alternate = !$alternate; } // If we haven't ended cleanly fix it... if ($alternate % 2 == 0) echo ' '; echo '



'; } echo '
'; } function template_search_results() { global $context, $settings, $options, $scripturl, $modSettings, $txt; // This splits broadly into two types of template... complete results first. if (!empty($context['search_params']['show_complete'])) { echo '
', $txt['pm_search_results'], '
', $txt[139], ': ', $context['page_index'], '

'; } else { echo ' '; } $alternate = true; // Print each message out... foreach ($context['personal_messages'] as $message) { // We showing it all? if (!empty($context['search_params']['show_complete'])) { // !!! This still needs to be made pretty. echo '
', $txt['pm_search_results'], '
', $txt[139], ': ', $context['page_index'], '
', $txt[317], ' ', $txt[319], ' ', $txt[318], '
', $message['counter'], '  ', $message['subject'], '
', $txt[176], ': ', $message['time'], '
', $txt[318], ': ', $message['member']['link'], ', ', $txt[324], ': '; // Show the recipients. // !!! This doesn't deal with the outbox searching quite right for bcc. if (!empty($message['recipients']['to'])) echo implode(', ', $message['recipients']['to']); // Otherwise, we're just going to say "some people"... elseif ($context['folder'] != 'outbox') echo '(', $txt['pm_undisclosed_recipients'], ')'; echo '
', $message['body'], '
'; if ($context['can_send_pm']) { $quote_button = create_button('quote.gif', 145, 145, 'align="middle"'); $reply_button = create_button('im_reply.gif', 146, 146, 'align="middle"'); // You can only reply if they are not a guest... if (!$message['member']['is_guest']) echo ' ', $quote_button , '', $context['menu_separator'], ' ', $reply_button , ' ', $context['menu_separator']; // This is for "forwarding" - even if the member is gone. else echo ' ', $quote_button , '', $context['menu_separator']; } echo '

'; } // Otherwise just a simple list! else { // !!! No context at all of the search? echo ' ', $message['time'], ' ', $message['link'], ' ', $message['member']['link'], ' '; } $alternate = !$alternate; } // Finish off the page... if (!empty($context['search_params']['show_complete'])) { // No results? if (empty($context['personal_messages'])) echo '
', $txt['pm_search_none_found'], '

'; echo '
', $txt[139], ': ', $context['page_index'], '
'; } else { if (empty($context['personal_messages'])) echo ' ', $txt['pm_search_none_found'], ' '; echo ' ', $txt[139], ': ', $context['page_index'], ' '; } } function template_send() { global $context, $settings, $options, $scripturl, $modSettings, $txt; if ($context['show_spellchecking']) echo ' '; // Show which messages were sent successfully and which failed. if (!empty($context['send_log'])) { echo '
', $txt['pm_send_report'], '
'; foreach ($context['send_log']['sent'] as $log_entry) echo '', $log_entry, '
'; foreach ($context['send_log']['failed'] as $log_entry) echo '', $log_entry, '
'; echo '

'; } // Show the preview of the personal message. if (isset($context['preview_message'])) echo '
', $context['preview_subject'], '
', $context['preview_message'], '

'; // Main message editing box. echo '
', $txt[321], ' ', $txt[321], '
'; // If there were errors for sending the PM, show them. if (!empty($context['post_error']['messages'])) { echo ' '; } // To and bcc. Include a button to search for members. echo ' '; // Subject of personal message. echo ' '; if ($context['visual_verification']) { echo ' '; } // Show BBC buttons, smileys and textbox. theme_postbox($context['message']); // Send, Preview, spellcheck buttons. echo '
', $txt['error_while_submitting'], '
', implode('
', $context['post_error']['messages']), '
', $txt[150], ':   ', $txt['find_members'], ' ', $txt['find_members'], '
', $txt[1502], ':   ', $txt['find_members'], ' ', $txt[748], '
', $txt[70], ':
', $txt['pm_visual_verification_label'], ': '; if ($context['use_graphic_library']) echo ' ', $txt['pm_visual_verification_desc'], '
'; else echo ' ', $txt['pm_visual_verification_desc'], ' ', $txt['pm_visual_verification_desc'], ' ', $txt['pm_visual_verification_desc'], ' ', $txt['pm_visual_verification_desc'], ' ', $txt['pm_visual_verification_desc'], '
'; echo ' ', $txt['pm_visual_verification_listen'], '

', $txt['pm_visual_verification_desc'], '
'; if ($context['show_spellchecking']) echo ' '; echo '
'; // Some hidden information is needed in order to make the spell checking work. if ($context['show_spellchecking']) echo '
'; // Show the message you're replying to. if ($context['reply']) echo '

', $txt[319], ': ', $context['quoted_message']['subject'], '
', $txt[318], ': ', $context['quoted_message']['member']['name'], ' ', $txt[30], ': ', $context['quoted_message']['time'], '
', $context['quoted_message']['body'], '
'; echo ' '; } // This template asks the user whether they wish to empty out their folder/messages. function template_ask_delete() { global $context, $settings, $options, $scripturl, $modSettings, $txt; echo '
', ($context['delete_all'] ? $txt[411] : $txt[412]), '
', $txt[413], '

', $txt[163], ' - ', $txt[164], '
'; } // This template asks the user what messages they want to prune. function template_prune() { global $context, $settings, $options, $scripturl, $txt; echo '
', $txt['pm_prune'], '
', $txt['pm_prune_desc1'], ' ', $txt['pm_prune_desc2'], '
'; } // Here we allow the user to setup labels, remove labels and change rules for labels (i.e, do quite a bit) function template_labels() { global $context, $settings, $options, $scripturl, $txt; echo '
'; if (empty($context['labels'])) echo ' '; else { $alternate = true; foreach ($context['labels'] as $label) { if ($label['id'] != -1) { echo ' '; $alternate = !$alternate; } } echo ' '; } echo '
', $txt['pm_manage_labels'], '
', $txt['pm_labels_desc'], '
', $txt['pm_label_name'], '
', $txt['pm_labels_no_exist'], '
', $txt['pm_label_add_new'], '
', $txt['pm_label_name'], ':
'; } // Template for reporting a personal message. function template_report_message() { global $context, $settings, $options, $txt, $scripturl; echo '
'; // If there is more than one admin on the forum, allow the user to choose the one they want to direct to. // !!! Why? if ($context['admin_count'] > 1) { echo ' '; } echo '
', $txt['pm_report_title'], '
', $txt['pm_report_desc'], '
', $txt['pm_report_admins'], ':
', $txt['pm_report_reason'], ':
'; } // Little template just to say "Yep, it's been submitted" function template_report_message_complete() { global $context, $settings, $options, $txt, $scripturl; echo '
', $txt['pm_report_title'], '
', $txt['pm_report_done'], '

', $txt['pm_report_return'], '
'; } ?>