';
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 '
';
// Copied from the default.
echo '
';
}
// From a dir.
echo '
';
echo '
';
echo '
';
}
/**
* This lists all themes
*/
function template_list_themes()
{
global $context, $scripturl, $txt;
// Show a nice confirmation message.
if (isset($_GET['done']))
echo '
', $txt['theme_confirmed_' . $_GET['done']], '
';
echo '
', $txt['themeadmin_list_heading'], '
', $txt['themeadmin_list_tip'], '
';
}
/**
* This lets you reset themes
*/
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.
foreach ($context['themes'] as $theme)
{
echo '
';
}
/**
* This displays the form for setting theme options
*/
function template_set_options()
{
global $context, $scripturl, $txt;
echo '
';
}
/**
* The page for setting and managing theme settings.
*/
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 '
';
}
/**
* The page allowing you to copy a template from one theme to another.
*/
function template_copy_template()
{
global $context, $scripturl, $txt;
echo '
', $txt['themeadmin_edit_filename'], '
', $txt['themeadmin_edit_copy_warning'], '
';
foreach ($context['available_templates'] as $template)
{
echo '
';
}
/**
* This lets you browse a list of files in a theme so you can choose which one to edit.
*/
function template_edit_browse()
{
global $context, $txt;
if (!empty($context['browse_title']))
echo '
', $context['browse_title'], '
';
echo '
', $txt['themeadmin_edit_filename'], '
', $txt['themeadmin_edit_modified'], '
', $txt['themeadmin_edit_size'], '
';
foreach ($context['theme_files'] as $file)
{
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 '
';
}
/**
* This allows you to edit a file
*/
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 '