blog->settings->system->repository_theme_url === null) { $core->blog->settings->system->put( 'repository_theme_url', 'http://update.dotaddict.org/dc2/themes.xml', 'string', 'Themes XML feed location', true, true ); } # -------------------------------------------------- # -- Loading themes -- $core->themes = new dcThemes($core); $core->themes->loadModules($core->blog->themes_path, null); # -- Repository helper -- $repository = new dcRepository( $core->themes, $core->blog->settings->system->repository_theme_url ); $repository->check(); # -- Page helper -- $list = new adminThemesList( $core, $core->blog->themes_path, false ); # -- Theme screenshot -- if (!empty($_GET['shot']) && $core->themes->moduleExists($_GET['shot'])) { if (empty($_GET['src'])) { $f = $core->blog->themes_path.'/'.$_GET['shot'].'/screenshot.jpg'; } else { $f = $core->blog->themes_path.'/'.$_GET['shot'].'/'.path::clean($_GET['src']); } $f = path::real($f); if (!file_exists($f)) { $f = dirname(__FILE__).'/images/noscreenshot.png'; } http::cache(array_merge(array($f),get_included_files())); header('Content-Type: '.files::getMimeType($f)); header('Content-Length: '.filesize($f)); readfile($f); exit; } # -- Check for module configuration -- $conf_file = false; if (!empty($_REQUEST['conf']) && !empty($_REQUEST['module'])) { if (!$core->themes->moduleExists($_REQUEST['module'])) { $core->error->add(__('Unknow module ID')); } else { $module = $core->themes->getModules($_REQUEST['module']); $module = adminModulesList::parseModuleInfo($_REQUEST['module'], $module); if (!file_exists(path::real($module['root'].'/_config.php'))) { $core->error->add(__('This module has no configuration file.')); } else { $conf_file = path::real($module['root'].'/_config.php'); } } } # -- Display module configuration page -- if ($conf_file) { dcPage::open(__('Blog appearance'), # --BEHAVIOR-- themesToolsHeaders $core->callBehavior('themesToolsHeaders', $core, $module['id']), dcPage::breadcrumb( array( html::escapeHTML($core->blog->name) => '', __('Blog appearance') => 'blog_theme.php', ''.__('Theme configuration').'' => '' )) ); if (!empty($_GET['done'])){ dcPage::success(__('Theme successfully configured.')); } try { if (!$module['standalone_config']) { echo '
'; } } catch (Exception $e) { echo ''.$e->getMessage().'
'.sprintf( __('There is one theme to update available from %2$s.', 'There are %s themes to update available from %s.', count($modules)), count($modules), 'Dotaddict' ).'
'; $list ->newList('theme-update') ->setModules($modules) ->setPageTab('update') ->displayModulesList( /*cols */ array('sshot', 'name', 'desc', 'author', 'version', 'current_version', 'parent'), /* actions */ array('update') ); echo ''.__('Manage installed themes from this list.').'
'; $list ->newList('theme-activate') ->setModules($modules) ->setPageTab('themes') ->displayModulesList( /* cols */ array('sshot', 'name', 'config', 'desc', 'author', 'version', 'parent'), /* actions */ array('deactivate', 'delete') ); } echo ''.sprintf( __("Visit %s repository, the resources center for Dotclear."), 'Dotaddict' ). '
'. ''.__('You can install themes by uploading or downloading zip files.').'
'; $list->displayManualForm(); echo '