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

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

', $txt['help'], ' ', $txt['theme_latest'], '

', $txt['theme_latest_fetch'], '

'; // Warn them if theme creation isn't possible! if (!$context['can_create_new']) echo '
', $txt['theme_install_writable'], '
'; echo '

', $txt['help'], ' ', $txt['theme_install'], '

'; // Here's a little box for installing a new theme. // @todo Should the value="theme_gz" be there?! if ($context['can_create_new']) echo '
:
'; echo '
:
'; if ($context['can_create_new']) echo '
'; echo '

'; if (empty($modSettings['disable_smf_js'])) echo ' '; echo ' '; // Gotta love IE4, and its hatefulness... if ($context['browser']['is_ie4']) echo ' '; else echo ' '; } function template_list_themes() { global $context, $settings, $options, $scripturl, $txt; echo '

', $txt['themeadmin_list_heading'], '

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

', $theme['name'], '', !empty($theme['version']) ? ' (' . $theme['version'] . ')' : '', ''; // You *cannot* delete the default theme. It's important! if ($theme['id'] != 1) echo ' ', $txt['theme_remove'], ''; 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, $settings, $options, $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, $settings, $options, $scripturl, $txt; echo '

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

', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_info'] : $txt['theme_options_defaults'], '
    '; foreach ($context['options'] as $setting) { echo '
  • '; if ($context['theme_options_reset']) echo ' '; if ($setting['type'] == 'checkbox') { echo ' '; } elseif ($setting['type'] == 'list') { echo '   '; } else echo '   '; if (isset($setting['description'])) echo '
    ', $setting['description'], ''; echo '
  • '; } echo '

'; } function template_set_settings() { global $context, $settings, $options, $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 '
'; } } echo '

'; if (!empty($context['theme_variants'])) { echo ' '; } } // This template allows for the selection of different themes ;). function template_pick() { global $context, $settings, $options, $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 successfully! function template_installed() { global $context, $settings, $options, $scripturl, $txt; // Not much to show except a link back... echo '

', $context['page_title'], '

', $context['installed_theme']['name'], ' ', $txt['theme_installed_message'], '

', $txt['back'], '


'; } function template_edit_list() { global $context, $settings, $options, $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, $settings, $options, $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, $settings, $options, $scripturl, $txt; 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, $options, $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, $settings, $options, $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 '
'; } function template_edit_file() { global $context, $settings, $options, $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 '

'; } ?>