'; // 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 '
'; $use_bg2 = true; foreach ($context[$context['admin_menu_name']]['sections'] as $area_id => $area) { echo '
', $area['title'], ''; foreach ($area['areas'] as $item_id => $item) { // No point showing the 'home' page here, we're already on it! if ($area_id == 'forum' && $item_id == 'index') continue; $url = isset($item['url']) ? $item['url'] : $scripturl . '?action=admin;area=' . $item_id . (!empty($context[$context['admin_menu_name']]['extra_parameters']) ? $context[$context['admin_menu_name']]['extra_parameters'] : ''); echo '
', $item['label'], '
'; } echo '
'; $use_bg2 = !$use_bg2; } 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'], '
'; // 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, $scripturl, $txt, $modSettings; if (!empty($context['saved_successful'])) echo '
', $txt['settings_saved'], '
'; // 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, $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['saved_successful'])) echo '
', $txt['settings_saved'], '
'; elseif (!empty($context['saved_failed'])) echo '
', sprintf($txt['settings_not_saved'], $context['saved_failed']), '
'; 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 a message to display? 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' : ''; $subtext = !empty($config_var['subtext']) ? '
' . $config_var['subtext'] . '' : ''; // Various HTML5 input types that are basically enhanced textboxes $text_types = array('color', 'date', 'datetime', 'datetime-local', 'email', 'month', 'time'); // 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 ' '; } // List of boards? This requires getBoardList() having been run and the results in $context['board_list']. elseif ($config_var['type'] == 'boards') { $board_list = true; $first = true; echo ' [ ', $txt['select_boards_from_list'], ' ]
', $txt['select_boards_from_list'], ''; foreach ($context['board_list'] as $id_cat => $cat) { if (!$first) echo '
'; echo ' ', $cat['name'], '
    '; foreach ($cat['boards'] as $id_board => $brd) echo '
  • '; echo '
'; $first = false; } 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 { // Figure out the exact type - use "number" for "float" and "int". $type = in_array($config_var['type'], $text_types) ? $config_var['type'] : ($config_var['type'] == 'int' || $config_var['type'] == 'float' ? 'number' : 'text'); // Extra options for float/int values - how much to decrease/increase by, the min value and the max value // The step - only set if incrementing by something other than 1 for int or 0.1 for float $step = isset($config_var['step']) ? ' step="' . $config_var['step'] . '"' : ($config_var['type'] == 'float' ? ' step="0.1"' : ''); // Minimum allowed value for this setting. Most settings are 0 $min = isset($config_var['min']) ? ' min="' . $config_var['min'] . '"' : ($config_var['type'] == 'int' || $config_var['type'] == 'float' ? ' min="0"' : ''); $max = isset($config_var['max']) ? ' max="' . $config_var['max'] . '"' : ''; 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 ' '; if (isset($context['admin-mp_token'])) echo ' '; 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, $scripturl; 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'); } // Edit a profile field? function template_edit_profile_field() { global $context, $txt, $settings, $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 '

', $context['page_title'], '

', $txt['custom_edit_general'], '

', $txt['custom_edit_profile_desc'], '
', $txt['help'], '
', $txt['custom_edit_enclose_desc'], '
', $txt['custom_edit_input'], '

', $txt['custom_edit_max_length_desc'], '
', $txt['custom_edit_dimension_row'], ': ', $txt['custom_edit_dimension_col'], ':
', $txt['help'], '
', $txt['custom_edit_options_desc'], '
'; foreach ($context['field']['options'] as $k => $option) { echo ' ', $k == 0 ? '' : '
', ''; } echo ' [', $txt['custom_edit_options_more'], ']
', $txt['custom_edit_advanced'], '
', $txt['help'], '
', $txt['custom_edit_mask_desc'], '

', $txt['custom_edit_privacy_desc'], '

', $txt['custom_edit_can_search_desc'], '

', $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, $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['title'], '

    ', $result['snippet'], '

  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 '
'; } // 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 '
', $lang['name'], '
', $txt['setup_verification_question'], '
', $txt['setup_verification_answer'], '
'; if (!empty($context['qa_by_lang'][$lang_id])) foreach ($context['qa_by_lang'][$lang_id] as $q_id) { $question = $context['question_answers'][$q_id]; echo '
'; foreach ($question['answers'] as $answer) echo ' '; echo '
'; } echo '
[ ', $txt['setup_verification_add_more'], ' ]
'; } } // 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 ' '; } } // 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 ' '; $alternate = true; $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 categorys settings echo ' '; $localmaster = false; } echo ' '; foreach ($setting as $key_lm => $value) { echo ' '; } echo ' '; } // just a single setting (2 col) else { echo ' '; } $alternate = !$alternate; } echo '
', $area, '
', $txt['phpinfo_itemsettings'], ' ', $txt['phpinfo_localsettings'], ' ', $txt['phpinfo_defaultsettings'], '
', $key, '', $value, '
', $key, ' ', $setting, '

'; } echo '
'; } function template_clean_cache_button_above() { } function template_clean_cache_button_below() { global $txt, $scripturl, $context; echo '

', $txt['maintain_cache'], '

', $txt['maintain_cache_info'], '

'; } function template_admin_quick_search() { global $context, $txt, $scripturl; if ($context['user']['is_admin']) echo '
'; } ?>