', $txt[119], ' ', $txt['themeadmin_title'], '
', $txt['themeadmin_explain'], '
', $txt['theme_guests'], ':   ', $txt['theme_select'], '
', $txt['theme_reset'], ':   ', $txt['theme_select'], '
'; // And lastly, link to simplemachines.org for latest themes and info! echo '
', $txt[119], ' ', $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 '
'; // Here's a little box for installing a new theme. // !!! Should the value="theme_gz" be there?! if ($context['can_create_new']) echo ' '; echo ' '; if ($context['can_create_new']) echo ' '; echo '
', $txt[119], ' ', $txt['theme_install'], '
:
:
'; 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 ' '; // Show each theme.... with X for delete and a link to settings. foreach ($context['themes'] as $theme) { echo ' '; } echo '
', $txt['themeadmin_list_heading'], '
', $txt['themeadmin_list_tip'], '
', $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'], '
', $txt['themeadmin_list_reset'], '
', $txt['themeadmin_list_reset_dir'], ':
', $txt['themeadmin_list_reset_url'], ':
'; } function template_reset_list() { global $context, $settings, $options, $scripturl, $txt; echo ' '; // Show each theme.... with X for delete and a link to settings. foreach ($context['themes'] as $theme) { echo ' '; } echo '
', $txt['themeadmin_reset_title'], '
', $txt['themeadmin_reset_tip'], '
', $theme['name'], '
', $txt['themeadmin_reset_defaults'], ' (', $theme['num_default_options'], ' ', $txt['themeadmin_reset_defaults_current'], ')
', $txt['themeadmin_reset_members'], '
', $txt['themeadmin_reset_remove'], ' (', $theme['num_members'], ' ', $txt['themeadmin_reset_remove_current'], ')
'; } function template_set_options() { global $context, $settings, $options, $scripturl, $txt; echo '
'; foreach ($context['options'] as $setting) { echo ' '; } echo '
', $txt['theme_options_title'], ' - ', $context['theme_settings']['name'], '
', $context['theme_options_reset'] ? $txt['themeadmin_reset_options_info'] : $txt['theme_options_defaults'], '
'; 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 '

'; } function template_set_settings() { global $context, $settings, $options, $scripturl, $txt; echo '
'; // !!! Why can't I edit the default theme popup. if ($context['theme_settings']['theme_id'] != 1) echo ' '; echo ' '; foreach ($context['settings'] as $setting) { echo ' '; } echo '
', $txt[119], ' ', $txt['theme4'], ' - ', $context['theme_settings']['name'], '
', $txt['theme_edit'], '
', $txt['theme_edit_index'], '
', $txt['theme_edit_style'], '
', $txt['theme5'], '
', $txt['actual_theme_name'], '
', $txt['actual_theme_url'], '
', $txt['actual_images_url'], '
', $txt['actual_theme_dir'], '
', $txt['theme6'], '
'; if ($setting['type'] == 'checkbox') echo ' '; elseif ($setting['type'] == 'list') { echo ' '; } else echo ' '; if (isset($setting['description'])) echo '
', $setting['description'], '
'; echo '
'; } // This template allows for the selection of different themes ;). function template_pick() { global $context, $settings, $options, $scripturl, $txt; // Just go through each theme and show its information - thumbnail, etc. foreach ($context['available_themes'] as $theme) echo '
', $theme['name'], '
', $theme['description'], '
', $theme['num_users'], ' ', ($theme['num_users'] == 1 ? $txt['theme_user'] : $txt['theme_users']), '
', $txt['theme_set'], ' | ', $txt['theme_preview'], '

'; } // 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[250], '
'; } function template_edit_list() { global $context, $settings, $options, $scripturl, $txt; echo ' '; foreach ($context['themes'] as $theme) { echo ' '; } echo '
', $txt['themeadmin_edit_title'], '
', $theme['name'], '', !empty($theme['version']) ? ' (' . $theme['version'] . ')' : '', '
'; } function template_copy_template() { global $context, $settings, $options, $scripturl, $txt; echo ' '; $alternate = false; foreach ($context['available_templates'] as $template) { echo ' '; $alternate = !$alternate; } echo '
', $txt['themeadmin_edit_filename'], '
', $txt['themeadmin_edit_copy_warning'], '
', $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 '
'; } function template_edit_browse() { global $context, $settings, $options, $scripturl, $txt; echo ' '; foreach ($context['theme_files'] as $file) { 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.... grey 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.... grey 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 ' ', $txt['themeadmin_edit_on_line'], ' ', $part['line'], ':
'; echo '
'; } function template_edit_file() { global $context, $settings, $options, $scripturl, $txt; if ($context['session_error']) echo '
', $txt['error_session_timeout'], '
'; // Just show a big box.... grey 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 '
'; } ?>