Пример #1
0
<?php

/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (!module_config::can_i('view', 'Settings')) {
    redirect_browser(_BASE_HREF);
}
$show_theme_selector = false;
$themes = module_theme::get_available_themes();
if (count($themes) > 1) {
    $show_theme_selector = true;
}
if ($show_theme_selector) {
    $settings = array(array('key' => 'theme_name', 'default' => 'default', 'type' => 'select', 'options' => $themes, 'options_array_id' => 'name', 'description' => 'Default theme to use'), array('key' => _THEME_CONFIG_PREFIX . 'theme_logo', 'default' => _BASE_HREF . 'images/logo.png', 'type' => 'text', 'description' => 'URL for header logo'), array('key' => _THEME_CONFIG_PREFIX . 'theme_favicon', 'default' => '', 'type' => 'text', 'description' => 'URL for favicon', 'help' => 'Please google for "How to make a favicon". It should be a small PNG or ICO image.'), array('key' => _THEME_CONFIG_PREFIX . 'theme_custom_css', 'default' => '', 'type' => 'textarea', 'description' => 'Custom CSS Code', 'help' => 'Add your own custom CSS code here and it will be included in all pages of the website. You may have to clear your browser cache in order to see these changes. This code is added to the "ext.php?m=theme&amp;h=css" file if you are looking at the page source code.'));
    if (module_security::is_logged_in() && module_config::c('theme_per_user', 0)) {
        $default_theme = is_dir('includes/plugin_theme/themes/metis/') ? 'metis' : 'default';
        $settings[] = array('key' => 'theme_name_' . module_security::get_loggedin_id(), 'default' => module_config::c('theme_name', $default_theme), 'options' => $themes, 'options_array_id' => 'name', 'type' => 'select', 'description' => 'Theme to use when logged into your account');
    }
    module_config::print_settings_form(array('title' => _l('Theme Settings'), 'settings' => $settings));
}
?>

<form action="" method="post">
    <input type="hidden" name="_config_settings_hook" value="save_config">