', $txt['support_versions'], ':
', $txt['support_versions_forum'], ':
', $context['forum_version'], '
', $txt['support_versions_current'], ':
??
', $context['can_admin'] ? '' . $txt['version_check_more'] . '' : '', ' ';
// Display all the members who can administrate the forum.
echo '
', $txt['administrators'], ':
', implode(', ', $context['administrators']);
// If we have lots of admins... don't show them all.
if (!empty($context['more_admins_link']))
echo '
(', $context['more_admins_link'], ')';
echo '
';
foreach ($context[$context['admin_menu_name']]['sections'] as $area_id => $area)
{
echo '
';
}
// The below functions include all the scripts needed from the simplemachines.org site. The language and format are passed for internationalization.
if (empty($modSettings['disable_smf_js']))
echo '
';
// This sets the announcements and current versions themselves ;).
echo '
';
}
/**
* Show some support information and credits to those who helped make this.
*/
function template_credits()
{
global $context, $settings, $scripturl, $txt;
// Show the user version information from their server.
echo '
', $txt['support_title'], '
', $txt['support_versions'], ':
', $txt['support_versions_forum'], ':
', $context['forum_version'], '', $context['can_admin'] ? ' ' . $txt['version_check_more'] . '' : '', '
', $txt['support_versions_current'], ':
?? ';
// Display all the variables we have server information for.
foreach ($context['current_versions'] as $version)
{
echo '
', $version['title'], ':
', $version['version'], '';
// more details for this item, show them a link
if ($context['can_admin'] && isset($version['more']))
echo
' ', $txt['version_check_more'], '';
echo '
';
}
echo '
';
// Point the admin to common support resources.
echo '
', $txt['support_resources'], '
', $txt['support_resources_p1'], '
', $txt['support_resources_p2'], '
';
// The most important part - the credits :P.
echo '
', $txt['admin_credits'], '
';
foreach ($context['credits'] as $section)
{
if (isset($section['pretext']))
echo '
', $section['pretext'], '
';
echo '
';
foreach ($section['groups'] as $group)
{
if (isset($group['title']))
echo '
', $group['title'], ':
';
echo '
', implode(', ', $group['members']), '
';
}
echo '
';
if (isset($section['posttext']))
echo '
', $section['posttext'], '
';
}
echo '
';
// This makes all the support information available to the support script...
echo '
';
// This sets the latest support stuff.
echo '
';
}
/**
* Displays information about file versions installed, and compares them to current version.
*/
function template_view_versions()
{
global $context, $scripturl, $txt;
echo '
', $txt['admin_version_check'], '
', $txt['version_check_desc'], '
', $txt['admin_smffile'], '
', $txt['dvc_your'], '
', $txt['dvc_current'], '
';
// The current version of the core SMF package.
echo '
', $txt['admin_smfpackage'], '
', $context['forum_version'], '
??
';
// Now list all the source file versions, starting with the overall version (if all match!).
echo '
';
foreach ($context['default_language_versions'] as $language => $files)
{
foreach ($files as $filename => $version)
echo '
', $filename, '.', $language, '.php
', $version, '
??
';
}
echo '
';
// Display the version information for the currently selected theme - if it is not the default one.
if (!empty($context['template_versions']))
{
echo '
';
foreach ($context['tasks_versions'] as $filename => $version)
echo '
', $filename, '
', $version, '
??
';
echo '
';
}
echo '
';
/* Below is the hefty javascript for this. Upon opening the page it checks the current file versions with ones
held at simplemachines.org and works out if they are up to date. If they aren't it colors that files number
red. It also contains the function, swapOption, that toggles showing the detailed information for each of the
file categories. (sources, languages, and templates.) */
echo '
';
}
/**
* Form for stopping people using naughty words, etc.
*/
function template_edit_censored()
{
global $context, $scripturl, $txt, $modSettings;
if (!empty($context['saved_successful']))
echo '
', $txt['settings_saved'], '
';
// First section is for adding/removing words from the censored list.
echo '
';
}
/**
* This is the page shown when we've temporarily paused things such as during maintenance tasks, sending newsletters, etc.
*/
function template_not_done()
{
global $context, $txt, $scripturl;
echo '
', $txt['not_done_title'], '
', $txt['not_done_reason'];
if (!empty($context['continue_percent']))
echo '
', $context['continue_percent'], '%
';
if (!empty($context['substep_enabled']))
echo '
';
}
/**
* Template for showing settings (Of any kind really!)
*/
function template_show_settings()
{
global $context, $txt, $scripturl;
if (!empty($context['saved_successful']))
echo '
';
if (!empty($context['settings_pre_javascript']))
echo '
';
if (!empty($context['settings_insert_above']))
echo $context['settings_insert_above'];
echo '
';
if (!empty($context['settings_post_javascript']))
echo '
';
if (!empty($context['settings_insert_below']))
echo $context['settings_insert_below'];
// We may have added a board listing. If we did, we need to make it work.
addInlineJavascript('
$("legend.board_selector").closest("fieldset").hide();
$("a.board_selector").click(function(e) {
e.preventDefault();
$(this).hide().next("fieldset").show();
});
$("fieldset legend.board_selector a").click(function(e) {
e.preventDefault();
$(this).closest("fieldset").hide().prev("a").show();
});
', true);
}
/**
* Template for showing custom profile fields.
*/
function template_show_custom_profile()
{
global $context, $txt;
if (!empty($context['saved_successful']))
echo '
', $txt['settings_saved'], '
';
// Standard fields.
template_show_list('standard_profile_fields');
echo '
';
// Custom fields.
template_show_list('custom_profile_fields');
}
/**
* Template for editing a custom profile field
*/
function template_edit_profile_field()
{
global $context, $txt, $scripturl;
// All the javascript for this page - quite a bit in script.js!
echo '
';
// any errors messages to show?
if (isset($_GET['msg']))
{
loadLanguage('Errors');
if (isset($txt['custom_option_' . $_GET['msg']]))
echo '
',
$txt['custom_option_' . $_GET['msg']], '
';
}
echo '
';
// Get the javascript bits right!
echo '
';
}
/**
* Results page for an admin search.
*/
function template_admin_search_results()
{
global $context, $txt;
echo '
';
if (empty($context['search_results']))
{
echo '
', $txt['admin_search_results_none'], '
';
}
else
{
echo '
';
foreach ($context['search_results'] as $result)
{
// Is it a result from the online manual?
if ($context['search_type'] == 'online')
{
echo '
';
}
/**
* This little beauty shows questions and answer from the captcha type feature.
*/
function template_callback_question_answer_list()
{
global $txt, $context;
foreach ($context['languages'] as $lang_id => $lang)
{
$lang_id = strtr($lang_id, array('-utf8' => ''));
$lang['name'] = strtr($lang['name'], array('-utf8' => ''));
echo '
';
// Are we actually fixing them, or is this just a prompt?
if ($context['error_search'])
{
if (!empty($context['to_fix']))
{
echo '
', $txt['errors_found'], ':
';
foreach ($context['repair_errors'] as $error)
echo '
';
if (!empty($context['redirect_to_recount']))
{
echo '
';
}
}
/**
* Retrieves info from the php_info function, scrubs and preps it for display
*/
function template_php_info()
{
global $context, $txt;
echo '
', $txt['phpinfo_settings'], '
';
// for each php info area
foreach ($context['pinfo'] as $area => $php_area)
{
echo '
', $area, '
';
$localmaster = true;
// and for each setting in this category
foreach ($php_area as $key => $setting)
{
// start of a local / master setting (3 col)
if (is_array($setting))
{
if ($localmaster)
{
// heading row for the settings section of this category's settings
echo '
', $txt['phpinfo_itemsettings'], '
', $txt['phpinfo_localsettings'], '
', $txt['phpinfo_defaultsettings'], '
';
$localmaster = false;
}
echo '
', $key, '
';
foreach ($setting as $key_lm => $value)
echo '
', $value, '
';
echo '
';
}
// just a single setting (2 col)
else
{
echo '
', $key, '
', str_replace(',', ', ', $setting), '
';
}
}
echo '
';
}
echo '
';
}
/**
* Content shown above the clean cache button
*/
function template_clean_cache_button_above()
{
}
/**
* Content shown below the clean cache button?
*/
function template_clean_cache_button_below()
{
global $txt, $scripturl, $context;
echo '
', $txt['maintain_cache'], '
';
}
/**
* This shows the admin search form
*/
function template_admin_quick_search()
{
global $context, $txt, $scripturl;
if ($context['user']['is_admin'])
echo '
';
}
?>