'; if ($context['user']['is_admin']) echo '
'; echo $txt['admin_center'], '

', $txt['hello_guest'], ' ', $context['user']['name'], '! ', sprintf($txt['admin_main_welcome'], $txt['admin_center'], $txt['help'], $txt['help']), '
'; // Is there an update available? echo '
'; echo '
'; // Display the "live news" from simplemachines.org. echo '

', $txt['help'], ' ', $txt['live'], '

', $txt['lfyi'], '
'; // Show the user version information from their server. echo '
', $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 '
'; 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, $options, $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'], '
'; echo '
'; // Point the admin to common support resources. echo '

', $txt['support_resources'], '

', $txt['support_resources_p1'], '

', $txt['support_resources_p2'], '

'; // Display latest support questions from simplemachines.org. echo '

', $txt['help'], ' ', $txt['support_latest'], '

', $txt['support_latest_fetch'], '
'; // 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, $settings, $options, $scripturl, $txt; echo '

', $txt['admin_version_check'], '

', $txt['version_check_desc'], '
'; // The current version of the core SMF package. echo ' '; // Now list all the source file versions, starting with the overall version (if all match!). echo '
', $txt['admin_smffile'], ' ', $txt['dvc_your'], ' ', $txt['dvc_current'], '
', $txt['admin_smfpackage'], ' ', $context['forum_version'], ' ??
', $txt['dvc_sources'], ' ?? ??
'; // Loop through every source file displaying its version - using javascript. foreach ($context['file_versions'] as $filename => $version) echo ' '; // Default template files. echo '
', $filename, ' ', $version, ' ??
', $txt['dvc_default'], ' ?? ??
'; foreach ($context['default_template_versions'] as $filename => $version) echo ' '; // Now the language files... echo '
', $filename, ' ', $version, ' ??
', $txt['dvc_languages'], ' ?? ??
'; foreach ($context['default_language_versions'] as $language => $files) { foreach ($files as $filename => $version) echo ' '; } echo '
', $filename, '.', $language, '.php ', $version, ' ??
'; // Finally, display the version information for the currently selected theme - if it is not the default one. if (!empty($context['template_versions'])) { echo '
', $txt['dvc_templates'], ' ?? ??
'; foreach ($context['template_versions'] as $filename => $version) echo ' '; echo '
', $filename, ' ', $version, ' ??
'; } 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, $settings, $options, $scripturl, $txt, $modSettings; // First section is for adding/removing words from the censored list. echo '

', $txt['admin_censored_words'], '

', $txt['admin_censored_where'], '

'; // Show text boxes for censoring [bad ] => [good ]. foreach ($context['censored_words'] as $vulgar => $proper) echo '
=>
'; // Now provide a way to censor more words. echo '
=>

'; // This table lets you test out your filters by typing in rude words and seeing what comes out. echo '

', $txt['censor_test'], '


'; } // Maintenance is a lovely thing, isn't it? function template_not_done() { global $context, $settings, $options, $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 '
', $context['substep_title'], '
', $context['substep_continue_percent'], '%
 
'; echo '
', $context['continue_post_data'], '

'; } // Template for showing settings (Of any kind really!) function template_show_settings() { global $context, $txt, $settings, $scripturl; if (!empty($context['settings_pre_javascript'])) echo ' '; if (!empty($context['settings_insert_above'])) echo $context['settings_insert_above']; echo '
'; // Is there a custom title? if (isset($context['settings_title'])) echo '

', $context['settings_title'], '

'; // Have we got some custom code to insert? if (!empty($context['settings_message'])) echo '
', $context['settings_message'], '
'; // Now actually loop through all the variables. $is_open = false; foreach ($context['config_vars'] as $config_var) { // Is it a title or a description? if (is_array($config_var) && ($config_var['type'] == 'title' || $config_var['type'] == 'desc')) { // Not a list yet? if ($is_open) { $is_open = false; echo '
'; } // A title? if ($config_var['type'] == 'title') { echo '

', ($config_var['help'] ? '' . $txt['help'] . '' : ''), ' ', $config_var['label'], '

'; } // A description? else { echo '

', $config_var['label'], '

'; } continue; } // Not a list yet? if (!$is_open) { $is_open = true; echo '
'; } // Hang about? Are you pulling my leg - a callback?! if (is_array($config_var) && $config_var['type'] == 'callback') { if (function_exists('template_callback_' . $config_var['name'])) call_user_func('template_callback_' . $config_var['name']); continue; } if (is_array($config_var)) { // First off, is this a span like a message? if (in_array($config_var['type'], array('message', 'warning'))) { echo ' ', $config_var['label'], ' '; } // Otherwise it's an input box of some kind. else { echo ' '; // Some quick helpers... $javascript = $config_var['javascript']; $disabled = !empty($config_var['disabled']) ? ' disabled="disabled"' : ''; $subtext = !empty($config_var['subtext']) ? '
' . $config_var['subtext'] . '' : ''; // Show the [?] button. if ($config_var['help']) echo ' ', $txt['help'], '', $subtext, ($config_var['type'] == 'password' ? '
' . $txt['admin_confirm_password'] . '' : ''), ' '; else echo ' ', $subtext, ($config_var['type'] == 'password' ? '
' . $txt['admin_confirm_password'] . '' : ''), ' '; echo ' ', $config_var['preinput']; // Show a check box. if ($config_var['type'] == 'check') echo ' '; // Escape (via htmlspecialchars.) the text box. elseif ($config_var['type'] == 'password') echo '
'; // Show a selection box. elseif ($config_var['type'] == 'select') { echo ' '; } // Text area? elseif ($config_var['type'] == 'large_text') echo ' '; // Permission group? elseif ($config_var['type'] == 'permissions') theme_inline_permissions($config_var['name']); // BBC selection? elseif ($config_var['type'] == 'bbc') { echo '
', $txt['bbcTagsToUse_select'], '
    '; foreach ($context['bbc_columns'] as $bbcColumn) { foreach ($bbcColumn as $bbcTag) echo '
  • ', $bbcTag['show_help'] ? ' (?)' : '', '
  • '; } echo '
'; } // A simple message? elseif ($config_var['type'] == 'var_message') echo ' ', $config_var['var_message'], '
'; // Assume it must be a text box. else echo ' '; echo isset($config_var['postinput']) ? ' ' . $config_var['postinput'] : '', ''; } } else { // Just show a separator. if ($config_var == '') echo '
'; else echo '
' . $config_var . '
'; } } if ($is_open) echo '
'; if (empty($context['settings_save_dont_show'])) echo '
'; if ($is_open) echo '
'; // At least one token has to be used! if (isset($context['admin-ssc_token'])) echo ' '; if (isset($context['admin-dbsc_token'])) echo ' '; echo '
'; if (!empty($context['settings_post_javascript'])) echo ' '; if (!empty($context['settings_insert_below'])) echo $context['settings_insert_below']; } // Template for showing custom profile fields. function template_show_custom_profile() { global $context, $txt, $settings, $scripturl; // Standard fields. template_show_list('standard_profile_fields'); echo '
'; // Custom fields. template_show_list('custom_profile_fields'); } // Edit a profile field? function template_edit_profile_field() { global $context, $txt, $settings, $scripturl; // All the javascript for this page - quite a bit! echo ' '; echo '

', $context['page_title'], '

', $txt['custom_edit_general'], '
', $txt['custom_edit_name'], ':
', $txt['custom_edit_desc'], ':
', $txt['custom_edit_profile'], ':
', $txt['custom_edit_profile_desc'], '
', $txt['custom_edit_registration'], ':
', $txt['custom_edit_display'], ':
', $txt['custom_edit_placement'], ':
', $txt['help'], ' ', $txt['custom_edit_enclose'], ':
', $txt['custom_edit_enclose_desc'], '
', $txt['custom_edit_input'], '
', $txt['custom_edit_picktype'], ':
', $txt['custom_edit_max_length'], ':
', $txt['custom_edit_max_length_desc'], '
', $txt['custom_edit_dimension'], ':
', $txt['custom_edit_dimension_row'], ': ', $txt['custom_edit_dimension_col'], ':
', $txt['custom_edit_bbc'], '
', $txt['help'], ' ', $txt['custom_edit_options'], ':
', $txt['custom_edit_options_desc'], '
'; foreach ($context['field']['options'] as $k => $option) { echo ' ', $k == 0 ? '' : '
', ''; } echo ' [', $txt['custom_edit_options_more'], ']
', $txt['custom_edit_default'], ':
', $txt['custom_edit_advanced'], '
', $txt['help'], ' ', $txt['custom_edit_mask'], ':
', $txt['custom_edit_mask_desc'], '

', $txt['custom_edit_privacy'], ': ', $txt['custom_edit_privacy_desc'], '
', $txt['custom_edit_can_search'], ':
', $txt['custom_edit_can_search_desc'], '
', $txt['custom_edit_active'], ':
', $txt['custom_edit_active_desc'], '
'; if ($context['fid']) echo ' '; echo '

'; // Get the javascript bits right! echo ' '; } // Results page for an admin search. function template_admin_search_results() { global $context, $txt, $settings, $options, $scripturl; echo '

 ', sprintf($txt['admin_search_results_desc'], $context['search_term']), '

'; 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 '
  1. ', $result['messages'][0]['subject'], '
    ', $result['category']['name'], '  /  ', $result['board']['name'], ' /

    ', $result['messages'][0]['body'], '

  2. '; } // Otherwise it's... not! else { echo '
  3. ', $result['name'], ' [', isset($txt['admin_search_section_' . $result['type']]) ? $txt['admin_search_section_' . $result['type']] : $result['type'] , ']'; if ($result['help']) echo '

    ', $result['help'], '

    '; echo '
  4. '; } } echo '
'; } echo '

'; } // Turn on and off certain key features. function template_core_features() { global $context, $txt, $settings, $options, $scripturl; echo '
'; if ($context['is_new_install']) { echo '

', $txt['core_settings_welcome_msg'], '

', $txt['core_settings_welcome_msg_desc'], '
'; } echo '

', $txt['core_settings_title'], '

'; $alternate = true; foreach ($context['features'] as $id => $feature) { echo '
', $feature['title'], '

', ($feature['enabled'] && $feature['url'] ? '' . $feature['title'] . '' : $feature['title']), '

', $feature['desc'], '

'; $alternate = !$alternate; } echo '

'; // Turn on the pretty javascript if we can! echo ' '; } // This little beauty shows questions and answer from the captcha type feature. function template_callback_question_answer_list() { global $txt, $context; echo '
', $txt['setup_verification_question'], '
', $txt['setup_verification_answer'], '
'; foreach ($context['question_answers'] as $data) echo '
'; // Some blank ones. for ($count = 0; $count < 3; $count++) echo '
'; echo '
'; // The javascript needs to go at the end but we'll put it in this template for looks. $context['settings_post_javascript'] .= ' var placeHolder = document.getElementById(\'add_more_question_placeholder\'); document.getElementById(\'add_more_link_div\').style.display = \'\'; '; } // Repairing boards. function template_repair_boards() { global $context, $txt, $scripturl; echo '

', $context['error_search'] ? $txt['errors_list'] : $txt['errors_fixing'] , '

'; // 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 '
  • ', $error, '
  • '; echo '

', $txt['errors_fix'], '

', $txt['yes'], ' - ', $txt['no'], '

'; } else echo '

', $txt['maintain_no_errors'], '

', $txt['maintain_return'], '

'; } else { if (!empty($context['redirect_to_recount'])) { echo '

', $txt['errors_do_recount'], '

'; } else { echo '

', $txt['errors_fixed'], '

', $txt['maintain_return'], '

'; } } echo '

'; if (!empty($context['redirect_to_recount'])) { echo ' '; } } ?>