';
}
function template_control_richedit_buttons($editor_id)
{
global $context, $settings, $options, $txt, $modSettings, $scripturl;
$editor_context = &$context['controls']['richedit'][$editor_id];
echo '
';
if ($editor_context['preview_type'])
echo '
';
if ($context['show_spellchecking'])
echo '
';
if (!empty($context['drafts_save']))
{
// Show the save draft button
echo '
';
// Start an instance of the auto saver if its enabled
if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
echo '
';
}
if (!empty($context['drafts_pm_save']))
{
// The PM draft save button
echo '
';
// Load in the PM autosaver if its enabled and the user wants to use it
if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
echo '
';
}
}
// What's this, verification?!
function template_control_verification($verify_id, $display_type = 'all', $reset = false)
{
global $context, $settings, $options, $txt, $modSettings;
$verify_context = &$context['controls']['verification'][$verify_id];
// Keep track of where we are.
if (empty($verify_context['tracking']) || $reset)
$verify_context['tracking'] = 0;
// How many items are there to display in total.
$total_items = count($verify_context['questions']) + ($verify_context['show_visual'] ? 1 : 0);
// If we've gone too far, stop.
if ($verify_context['tracking'] > $total_items)
return false;
// Loop through each item to show them.
for ($i = 0; $i < $total_items; $i++)
{
// If we're after a single item only show it if we're in the right place.
if ($display_type == 'single' && $verify_context['tracking'] != $i)
continue;
if ($display_type != 'single')
echo '
';
// Do the actual stuff - image first?
if ($i == 0 && $verify_context['show_visual'])
{
if ($context['use_graphic_library'])
echo '
';
else
echo '
';
if (WIRELESS)
echo '
';
else
echo '
';
}
else
{
// Where in the question array is this question?
$qIndex = $verify_context['show_visual'] ? $i - 1 : $i;
echo '
', $verify_context['questions'][$qIndex]['q'], ':
';
}
if ($display_type != 'single')
echo '
';
// If we were displaying just one and we did it, break.
if ($display_type == 'single' && $verify_context['tracking'] == $i)
break;
}
// Assume we found something, always,
$verify_context['tracking']++;
// Tell something displaying piecemeal to keep going.
if ($display_type == 'single')
return true;
}
?>