'; // Theme install info. echo '

', $txt['help'], ' ', $txt['themeadmin_title'], '

', $txt['themeadmin_explain'], '
'; echo '

', $txt['settings'], '

:
'; foreach ($context['themes'] as $theme) echo '
'; echo '
', $txt['theme_select'], '
:
', $txt['theme_select'], '
'; // Link to simplemachines.org for latest themes and info! echo '

', $txt['theme_adding_title'], '

', $txt['theme_adding'], '
'; // All the install options. echo '

', $txt['theme_install'], '

'; if ($context['can_create_new']) { // From a file. echo '

', $txt['theme_install_file'], '

'; // Copied from the default. echo '

', $txt['theme_install_new'], '

'; } // From a dir. echo '

', $txt['theme_install_dir'], '

'; echo '
'; echo ' '; echo ' '; } function template_list_themes() { global $context, $scripturl, $txt; global $modSettings; // Show a nice confirmation message. if (isset($_GET['done'])) echo '
', $txt['theme_confirmed_'. $_GET['done']] ,'
'; echo '
'; echo '

', $txt['themeadmin_list_heading'], '

', $txt['themeadmin_list_tip'], '

', $txt['theme_settings'], '


'; // Show each theme.... with X for delete, an enable/disable link and a link to their own settings page. foreach ($context['themes'] as $theme) { echo '

', (!empty($theme['enable']) || $theme['id'] == 1 ? ''. $theme['name'] .'' : $theme['name'] ),'', (!empty($theme['version']) ? ' (' . $theme['version'] . ')' : ''), ' '; // You *cannot* disable/enable/delete the default theme. It's important! if ($theme['id'] != 1) { echo ' '; // Enable/Disable. echo ' ', $txt['theme_'. (!empty($theme['enable']) ? 'disable' : 'enable')] ,''; // Deleting. echo ' '; echo ' '; } echo '

', $txt['themeadmin_list_theme_dir'], ':
', $theme['theme_dir'], $theme['valid_path'] ? '' : ' ' . $txt['themeadmin_list_invalid'], '
', $txt['themeadmin_list_theme_url'], ':
', $theme['theme_url'], '
', $txt['themeadmin_list_images_url'], ':
', $theme['images_url'], '
'; } echo '

', $txt['themeadmin_list_reset'], '

:
:
'; } function template_reset_list() { global $context, $scripturl, $txt; echo '

', $txt['themeadmin_reset_title'], '

', $txt['themeadmin_reset_tip'], '
'; // Show each theme.... with X for delete and a link to settings. $alternate = false; foreach ($context['themes'] as $theme) { $alternate = !$alternate; echo '

', $theme['name'], '

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

', $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], '

', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_info'] : $txt['theme_options_defaults'], '
'; echo '
'; foreach ($context['options'] as $setting) { echo '
'; // Show the change option box ? if ($context['theme_options_reset']) echo '  '; // display checkbox options if ($setting['type'] == 'checkbox') { echo ' '; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
'; } // how about selection lists, we all love them elseif ($setting['type'] == 'list') { echo ' '; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
 '; } // a textbox it is then else { echo ' '; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
'; if (isset($setting['type']) && $setting['type'] == 'number') { $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; echo ' '; } // end of this defintion echo '
'; } // close the option page up echo '
'; } function template_set_settings() { global $context, $settings, $scripturl, $txt; echo '

', $txt['help'], ' ', $txt['theme_settings'], ' - ', $context['theme_settings']['name'], '


'; // @todo Why can't I edit the default theme popup. if ($context['theme_settings']['theme_id'] != 1) echo '

', $txt['theme_edit'], '

'; echo '

', $txt['theme_url_config'], '

'; // Do we allow theme variants? if (!empty($context['theme_variants'])) { echo '

', $txt['theme_variants'], '

:
:
'; } echo '

', $txt['theme_options'], '

'; foreach ($context['settings'] as $setting) { // Is this a separator? if (empty($setting)) { echo '

'; } // A checkbox? elseif ($setting['type'] == 'checkbox') { echo '
:'; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
'; } // A list with options? elseif ($setting['type'] == 'list') { echo '
:'; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
'; } // A regular input box, then? else { echo '
:'; if (isset($setting['description'])) echo '
', $setting['description'], ''; echo '
'; if (isset($setting['type']) && $setting['type'] == 'number') { $min = isset($setting['min']) ? ' min="' . $setting['min'] . '"' : ' min="0"'; $max = isset($setting['max']) ? ' max="' . $setting['max'] . '"' : ''; $step = isset($setting['step']) ? ' step="' . $setting['step'] . '"' : ''; echo '
'; } } echo '
'; if (!empty($context['theme_variants'])) { echo ' '; } } // This template allows for the selection of different themes ;). function template_pick() { global $context, $scripturl, $txt; echo '
'; // Just go through each theme and show its information - thumbnail, etc. foreach ($context['available_themes'] as $theme) { echo '

', $theme['description'], '

'; if (!empty($theme['variants'])) { echo ' : '; } echo '

', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), '


'; if (!empty($theme['variants'])) { echo ' '; } } echo '
'; } // Okay, that theme was installed/updated successfully! function template_installed() { global $context, $scripturl, $txt; // The aftermath. echo '

', $context['page_title'], '

'; // Oops! there was an error :( if (!empty($context['error_message'])) echo '

', $context['error_message'] ,'

'; // Not much to show except a link back... else echo '

', $context['installed_theme']['name'], ' ', $txt['theme_'. (isset($context['installed_theme']['updated']) ? 'updated' : 'installed') .'_message'], '

', $txt['back'], '

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

', $txt['themeadmin_edit_title'], '


'; $alternate = false; foreach ($context['themes'] as $theme) { $alternate = !$alternate; echo '

', $theme['name'], '', !empty($theme['version']) ? ' (' . $theme['version'] . ')' : '', '

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

', $txt['themeadmin_edit_filename'], '

', $txt['themeadmin_edit_copy_warning'], '
    '; $alternate = false; foreach ($context['available_templates'] as $template) { $alternate = !$alternate; echo '
  • ', $template['filename'], $template['already_exists'] ? ' (' . $txt['themeadmin_edit_exists'] . ')' : '', ' '; if ($template['can_copy']) echo '', $txt['themeadmin_edit_do_copy'], ''; else echo $txt['themeadmin_edit_no_copy']; echo '
  • '; } echo '
'; } function template_edit_browse() { global $context, $scripturl, $txt; echo '
'; if (!empty($context['browse_title'])) echo '

', $context['browse_title'], '

'; echo ' '; $alternate = false; foreach ($context['theme_files'] as $file) { $alternate = !$alternate; echo ' '; } echo '
', $txt['themeadmin_edit_filename'], ' ', $txt['themeadmin_edit_modified'], ' ', $txt['themeadmin_edit_size'], '
'; if ($file['is_editable']) echo '', $file['filename'], ''; elseif ($file['is_directory']) echo '', $file['filename'], ''; else echo $file['filename']; echo ' ', !empty($file['last_modified']) ? $file['last_modified'] : '', ' ', $file['size'], '
'; } // Wanna edit the stylesheet? function template_edit_style() { global $context, $settings, $scripturl, $txt; if ($context['session_error']) echo '
', $txt['error_session_timeout'], '
'; // From now on no one can complain that editing css is difficult. If you disagree, go to www.w3schools.com. echo '
'; // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) echo '

', $txt['theme_edit'], ' - ', $context['edit_filename'], '

'; if (!$context['allow_save']) echo ' ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
'; echo '
'; } // This edits the template... function template_edit_template() { global $context, $scripturl, $txt; if ($context['session_error']) echo '
', $txt['error_session_timeout'], '
'; if (isset($context['parse_error'])) echo '
', $txt['themeadmin_edit_error'], '
', $context['parse_error'], '
'; // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) echo '

', $txt['theme_edit'], ' - ', $context['edit_filename'], '

'; if (!$context['allow_save']) echo ' ', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
'; foreach ($context['file_parts'] as $part) echo ' :
'; echo '
'; // Hopefully it exists. if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) echo ' '; echo '
'; } function template_edit_file() { global $context, $scripturl, $txt; if ($context['session_error']) echo '
', $txt['error_session_timeout'], '
'; //Is this file writeable? if (!$context['allow_save']) echo '
', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '
'; // Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.) echo '

', $txt['theme_edit'], ' - ', $context['edit_filename'], '


'; // Hopefully it exists. if (isset($context['admin-te-' . md5($context['theme_id'] . '-' . $context['edit_filename']) . '_token'])) echo ' '; echo '
'; } ?>