'; // Start the javascript... and boy is there a lot. echo '
', theme_linktree(), '
'; // If the user wants to see how their message looks - the preview table is where it's at! echo ' '; if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) echo ' '; // Start the main table. echo '
', $context['page_title'], '
', isset($context['current_topic']) ? ' ' : '', ' '; // If an error occurred, explain what happened. echo ' '; // If it's locked, show a message to warn the replyer. echo ' '; // Guests have to put in their name and email... if (isset($context['name']) && isset($context['email'])) { echo ' '; if (empty($modSettings['guest_post_no_email'])) echo ' '; } // Are you posting a calendar event? if ($context['make_event']) { echo ' '; // If events can span more than one day then allow the user to select how long it should last. if (!empty($modSettings['cal_allowspan'])) { echo ' '; } // If this is a new event let the user specify which board they want the linked post to be put into. if ($context['event']['new'] && $context['is_new_post']) { echo ' '; } } // Now show the subject box for this post. echo ' '; // If this is a poll then display all the poll options! if ($context['make_poll']) { echo ' '; } // The below function prints the BBC, smileys and the message itself out. theme_postbox($context['message']); // If this message has been edited in the past - display when it was. if (isset($context['last_modified'])) echo ' '; // If the admin has enabled the hiding of the additional options - show a link and image for it. if (!empty($settings['additional_options_collapsable'])) echo ' '; // Display the check boxes for all the standard options - if they are available to the user! echo ' '; // If this post already has attachments on it - give information about them. if (!empty($context['current_attachments'])) { echo ' '; } // Is the user allowed to post any additional ones? If so give them the boxes to do it! if ($context['can_post_attachment']) { echo ' '; } // Finally, the submit buttons. echo '
', $txt['error_while_submitting'], '
', empty($context['post_error']['messages']) ? '' : implode('
', $context['post_error']['messages']), '
', $txt['smf287'], '
', $txt[68], ':
', $txt[69], ':
', $txt['calendar12'], '
', $txt['calendar10'], '    ', $txt['calendar9'], '    ', $txt['calendar11'], ' 
', $txt['calendar54'], '
', $txt['calendar13'], '
', $txt[70], ':
', $txt[71], ':
', $txt['smf21'], ':
'; // Loop through all the choices and print them out. foreach ($context['choices'] as $choice) { echo ' : '; if (!$choice['is_last']) echo '
'; } echo ' (', $txt['poll_add_option'], ')
', $txt['poll_options'], ': ', $txt['poll_options5'], '
', $txt['poll_options1a'], ' ', $txt['poll_options1b'], '
', $txt['poll_options2'], '
', $txt['poll_options3'], '
', $txt['poll_options4'], '

', $txt[211], ': ', $context['last_modified'], '
+ ', $txt['post_additionalopt'], '
', ' ', $context['can_announce'] && $context['is_first_post'] ? ' ' : '', '
', $context['can_notify'] ? '' : '', ' ', $context['can_lock'] ? '' : '', '
', $context['can_sticky'] ? '' : '', '
', $context['can_move'] ? '' : '', '
', $txt['smf119b'], ': ', $txt['smf130'], ':
'; foreach ($context['current_attachments'] as $attachment) echo ' ', $attachment['name'], '
'; echo '
', $txt['smf119'], ': '; // Show more boxes only if they aren't approaching their limit. if ($context['num_allowed_attachments'] > 1) echo ' (', $txt['more_attachments'], ')
'; else echo '
'; // Show some useful information such as allowed extensions, maximum size and amount of attachments allowed. if (!empty($modSettings['attachmentCheckExtensions'])) echo ' ', $txt['smf120'], ': ', $context['allowed_extensions'], '
'; echo ' ', $txt['smf121'], ': ', $modSettings['attachmentSizeLimit'], ' ' . $txt['smf211'], !empty($modSettings['attachmentNumPerPostLimit']) ? ', ' . $txt['maxAttachPerPost'] . ': ' . $modSettings['attachmentNumPerPostLimit'] : '', '

', $txt['smf16'], '

'; // Option to delete an event if user is editing one. if ($context['make_event'] && !$context['event']['new']) echo ' '; // Spell check button if the option is enabled. if ($context['show_spellchecking']) echo ' '; echo '
'; // Assuming this isn't a new topic pass across the number of replies when the topic was created. if (isset($context['num_replies'])) echo ' '; echo '
'; // Now some javascript to hide the additional options on load... if (!empty($settings['additional_options_collapsable']) && !$context['show_additional_options']) echo ' '; // A hidden form to post data to the spell checking window. if ($context['show_spellchecking']) echo '
'; // If the user is replying to a topic show the previous posts. if (isset($context['previous_posts']) && count($context['previous_posts']) > 0) { echo '

', $txt[468], '
'; foreach ($context['previous_posts'] as $post) echo ' '; echo '
', $txt[280], ': ', $post['time'], $post['is_new'] ? ' ' . $txt['preview_new'] . '' : '', '
', $txt[279], ': ', $post['poster'], '
', $post['message'], '
'; } } // This function displays all the stuff you'd expect to see with a message box, the box, BBC buttons and of course smileys. function template_postbox(&$message) { global $context, $settings, $options, $txt, $modSettings; // Assuming BBC code is enabled then print the buttons and some javascript to handle it. if ($context['show_bbc']) { echo ' '; // The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you! $context['bbc_tags'] = array(); $context['bbc_tags'][] = array( 'bold' => array('code' => 'b', 'before' => '[b]', 'after' => '[/b]', 'description' => $txt[253]), 'italicize' => array('code' => 'i', 'before' => '[i]', 'after' => '[/i]', 'description' => $txt[254]), 'underline' => array('code' => 'u', 'before' => '[u]', 'after' => '[/u]', 'description' => $txt[255]), 'strike' => array('code' => 's', 'before' => '[s]', 'after' => '[/s]', 'description' => $txt[441]), array(), 'glow' => array('code' => 'glow', 'before' => '[glow=red,2,300]', 'after' => '[/glow]', 'description' => $txt[442]), 'shadow' => array('code' => 'shadow', 'before' => '[shadow=red,left]', 'after' => '[/shadow]', 'description' => $txt[443]), 'move' => array('code' => 'move', 'before' => '[move]', 'after' => '[/move]', 'description' => $txt[439]), array(), 'pre' => array('code' => 'pre', 'before' => '[pre]', 'after' => '[/pre]', 'description' => $txt[444]), 'left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt[445]), 'center' => array('code' => 'center', 'before' => '[center]', 'after' => '[/center]', 'description' => $txt[256]), 'right' => array('code' => 'right', 'before' => '[right]', 'after' => '[/right]', 'description' => $txt[446]), array(), 'hr' => array('code' => 'hr', 'before' => '[hr]', 'description' => $txt[531]), array(), 'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]), 'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]), ); $context['bbc_tags'][] = array( 'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]), 'img' => array('code' => 'img', 'before' => '[img]', 'after' => '[/img]', 'description' => $txt[435]), 'url' => array('code' => 'url', 'before' => '[url]', 'after' => '[/url]', 'description' => $txt[257]), 'email' => array('code' => 'email', 'before' => '[email]', 'after' => '[/email]', 'description' => $txt[258]), 'ftp' => array('code' => 'ftp', 'before' => '[ftp]', 'after' => '[/ftp]', 'description' => $txt[434]), array(), 'table' => array('code' => 'table', 'before' => '[table]', 'after' => '[/table]', 'description' => $txt[436]), 'tr' => array('code' => 'td', 'before' => '[tr]', 'after' => '[/tr]', 'description' => $txt[449]), 'td' => array('code' => 'td', 'before' => '[td]', 'after' => '[/td]', 'description' => $txt[437]), array(), 'sup' => array('code' => 'sup', 'before' => '[sup]', 'after' => '[/sup]', 'description' => $txt[447]), 'sub' => array('code' => 'sub', 'before' => '[sub]', 'after' => '[/sub]', 'description' => $txt[448]), 'tele' => array('code' => 'tt', 'before' => '[tt]', 'after' => '[/tt]', 'description' => $txt[440]), array(), 'code' => array('code' => 'code', 'before' => '[code]', 'after' => '[/code]', 'description' => $txt[259]), 'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt[260]), array(), 'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]), ); $found_button = false; // Here loop through the array, printing the images/rows/separators! foreach ($context['bbc_tags'][0] as $image => $tag) { // Is there a "before" part for this bbc button? If not, it can't be a button!! if (isset($tag['before'])) { // Is this tag disabled? if (!empty($context['disabled_tags'][$tag['code']])) continue; $found_button = true; // If there's no after, we're just replacing the entire selection in the post box. if (!isset($tag['after'])) echo ''; // On the other hand, if there is one we are surrounding the selection ;). else echo ''; // Okay... we have the link. Now for the image and the closing ! echo '', $tag['description'], ''; } // I guess it's a divider... elseif ($found_button) { echo '|'; $found_button = false; } } // Print a drop down list for all the colors we allow! if (!isset($context['disabled_tags']['color'])) echo ' '; echo '
'; $found_button = false; // Print the buttom row of buttons! foreach ($context['bbc_tags'][1] as $image => $tag) { if (isset($tag['before'])) { // Is this tag disabled? if (!empty($context['disabled_tags'][$tag['code']])) continue; $found_button = true; // If there's no after, we're just replacing the entire selection in the post box. if (!isset($tag['after'])) echo ''; // On the other hand, if there is one we are surrounding the selection ;). else echo ''; // Okay... we have the link. Now for the image and the closing ! echo '', $tag['description'], ''; } // I guess it's a divider... elseif ($found_button) { echo '|'; $found_button = false; } } echo ' '; } // Now start printing all of the smileys. if (!empty($context['smileys']['postform'])) { echo ' '; // Show each row of smileys ;). foreach ($context['smileys']['postform'] as $smiley_row) { foreach ($smiley_row['smileys'] as $smiley) echo ' ', $smiley['description'], ''; // If this isn't the last row, show a break. if (empty($smiley_row['last'])) echo '
'; } // If the smileys popup is to be shown... show it! if (!empty($context['smileys']['popup'])) echo ' [', $txt['more_smileys'], ']'; echo ' '; } // If there are additional smileys then ensure we provide the javascript for them. if (!empty($context['smileys']['popup'])) { echo ' '; } // Finally the most important bit - the actual text box to write in! echo ' '; } // The template for the spellchecker. function template_spellcheck() { global $context, $settings, $options, $txt; // The style information that makes the spellchecker look... like the forum hopefully! echo ' ', $txt['spell_check'], '
 
', $txt['spellcheck_change_to'], '
', $txt['spellcheck_suggest'], '
'; } function template_quotefast() { global $context, $settings, $options, $txt; echo ' ', $txt['retrieving_quote'], ' ', $txt['retrieving_quote'], ' '; } function template_announce() { global $context, $settings, $options, $txt, $scripturl; echo '
', $txt['announce_title'], '
', $txt['announce_desc'], '
', $txt['announce_this_topic'], ' ', $context['topic_subject'], '
'; foreach ($context['groups'] as $group) echo ' (', $group['member_count'], ')
'; echo '
'; } function template_announcement_send() { global $context, $settings, $options, $txt, $scripturl; echo '
', $txt['announce_sending'], ' ', $context['topic_subject'], '
', $context['percentage_done'], '% ', $txt['announce_done'], '
'; } ?>