';
echo '
';
// 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'], '
';
}
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 '
';
}
function template_set_options()
{
global $context, $scripturl, $txt;
echo '
';
}
function template_set_settings()
{
global $context, $settings, $scripturl, $txt;
echo '
';
if (!empty($context['theme_variants']))
{
echo '
';
}
}
// This template allows for the selection of different themes ;).
function template_pick()
{
global $context, $scripturl, $txt;
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 '
';
}
// 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 '
';
}
// 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 '
';
}
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 '