';
// Start the javascript... and boy is there a lot.
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 '
';
}
}
// 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 '';
}
// 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 '';
}
// 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 '
';
// 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'], '
';
}
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 '
';
}
function template_announcement_send()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
';
}
?>