# HG changeset patch # User Dan # Date 1215413417 14400 # Node ID d2d4e40ecd29e663bea9ba62ded6affbbb79329a # Parent 6a90893622f0314621174471c8978333634f093c First draft of new CacheManager admin page. Backend is yet to be implemented. diff -r 6a90893622f0 -r d2d4e40ecd29 images/icons/applets/cachemanager.png Binary file images/icons/applets/cachemanager.png has changed diff -r 6a90893622f0 -r d2d4e40ecd29 includes/paths.php --- a/includes/paths.php Mon Jul 07 02:49:54 2008 -0400 +++ b/includes/paths.php Mon Jul 07 02:50:17 2008 -0400 @@ -92,13 +92,14 @@ $this->addAdminNode('adm_cat_general', 'adm_page_general_config', 'GeneralConfig', scriptPath . '/images/icons/applets/generalconfig.png'); $this->addAdminNode('adm_cat_general', 'adm_page_file_uploads', 'UploadConfig', scriptPath . '/images/icons/applets/uploadconfig.png'); $this->addAdminNode('adm_cat_general', 'adm_page_file_types', 'UploadAllowedMimeTypes', scriptPath . '/images/icons/applets/uploadallowedmimetypes.png'); - $this->addAdminNode('adm_cat_general', 'adm_page_plugins', 'PluginManager', scriptPath . '/images/icons/applets/pluginmanager.png'); - $this->addAdminNode('adm_cat_general', 'adm_page_db_backup', 'DBBackup', scriptPath . '/images/icons/applets/dbbackup.png'); - $this->addAdminNode('adm_cat_general', 'adm_page_lang_manager', 'LangManager', scriptPath . '/images/icons/applets/langmanager.png'); $this->addAdminNode('adm_cat_content', 'adm_page_manager', 'PageManager', scriptPath . '/images/icons/applets/pagemanager.png'); $this->addAdminNode('adm_cat_content', 'adm_page_editor', 'PageEditor', scriptPath . '/images/icons/applets/pageeditor.png'); $this->addAdminNode('adm_cat_content', 'adm_page_pg_groups', 'PageGroups', scriptPath . '/images/icons/applets/pagegroups.png'); $this->addAdminNode('adm_cat_appearance', 'adm_page_themes', 'ThemeManager', scriptPath . '/images/icons/applets/thememanager.png'); + $this->addAdminNode('adm_cat_appearance', 'adm_page_plugins', 'PluginManager', scriptPath . '/images/icons/applets/pluginmanager.png'); + $this->addAdminNode('adm_cat_appearance', 'adm_page_db_backup', 'DBBackup', scriptPath . '/images/icons/applets/dbbackup.png'); + $this->addAdminNode('adm_cat_appearance', 'adm_page_lang_manager', 'LangManager', scriptPath . '/images/icons/applets/langmanager.png'); + $this->addAdminNode('adm_cat_appearance', 'adm_page_cache_manager', 'CacheManager', scriptPath . '/images/icons/applets/cachemanager.png'); $this->addAdminNode('adm_cat_users', 'adm_page_users', 'UserManager', scriptPath . '/images/icons/applets/usermanager.png'); $this->addAdminNode('adm_cat_users', 'adm_page_user_groups', 'GroupManager', scriptPath . '/images/icons/applets/groupmanager.png'); $this->addAdminNode('adm_cat_users', 'adm_page_coppa', 'COPPA', scriptPath . '/images/icons/applets/coppa.png'); diff -r 6a90893622f0 -r d2d4e40ecd29 index.php --- a/index.php Mon Jul 07 02:49:54 2008 -0400 +++ b/index.php Mon Jul 07 02:50:17 2008 -0400 @@ -19,7 +19,7 @@ define('ENANO_INTERFACE_INDEX', ''); // For the mighty and brave. - define('ENANO_DEBUG', ''); + // define('ENANO_DEBUG', ''); // Set up gzip encoding before any output is sent diff -r 6a90893622f0 -r d2d4e40ecd29 language/english/admin.json --- a/language/english/admin.json Mon Jul 07 02:49:54 2008 -0400 +++ b/language/english/admin.json Mon Jul 07 02:50:17 2008 -0400 @@ -14,7 +14,7 @@ categories: [ 'meta', 'adm', 'acl', 'adminusers', 'acphome', 'acpgc', 'acpup', 'acpft', 'acppl', 'acppm', 'acped', 'acpdb', 'acplm', 'acppg', 'acpum', 'acpug', 'acpcp', 'acpmm', 'acpsl', - 'acpbc', 'acplo', 'acptm', 'acpur', 'sbedit', + 'acpcm', 'acpbc', 'acplo', 'acptm', 'acpur', 'sbedit', ], strings: { meta: { @@ -24,12 +24,13 @@ acpgc: 'ACP: General configuration', acpup: 'ACP: File uploads', acpft: 'ACP: Allowed file types', + acppm: 'ACP: Manage pages', + acped: 'ACP: Edit page content', + acptm: 'ACP: Theme manager', acppl: 'ACP: Manage plugins', acpdb: 'ACP: Database backup', acplm: 'ACP: Language manager', - acppm: 'ACP: Manage pages', - acped: 'ACP: Edit page content', - acptm: 'ACP: Theme manager', + acpcm: 'ACP: Cache settings', acppg: 'ACP: Page groups', acpum: 'ACP: User management', acpur: 'ACP: User rank management', @@ -46,7 +47,7 @@ cat_general: 'General', cat_content: 'Content', - cat_appearance: 'Appearance', + cat_appearance: 'System and maintenance', cat_users: 'Users', cat_security: 'Security', cat_plugins: 'Plugin configuration', @@ -54,15 +55,16 @@ page_general_config: 'General configuration', page_file_uploads: 'File uploads', page_file_types: 'Allowed file types', - page_plugins: 'Manage plugins', - page_db_backup: 'Backup database', - page_lang_manager: 'Language manager', page_manager: 'Manage pages', page_editor: 'Edit page content', page_pg_groups: 'Manage page groups', page_themes: 'Manage themes', + page_plugins: 'Manage plugins', + page_db_backup: 'Backup database', + page_lang_manager: 'Language manager', + page_cache_manager: 'Cache settings', page_users: 'Manage users', page_user_groups: 'Edit user groups', @@ -539,6 +541,17 @@ msg_save_success: 'Your changes to this theme have been saved.', msg_uninstall_success: 'The selected theme has been uninstalled.', }, + acpcm: { + heading_main: 'Performance and caching settings', + intro: 'From this page you can control what information on your site is stored in cache files. Caching speeds up Enano performance by allowing data to be retrieved from the disk instead of querying the database. Sometimes the cache isn\'t updated immediately when the database is. From this page you can control what is cached, and you can clear specific caches to force them to refresh.', + table_header: 'Cache settings', + lbl_enable_cache: 'Enable the cache (recommended)', + hint_enable_cache: 'To use the cache, the folder "cache" in the Enano root directory needs to be writable by the server. You can usually accomplish this by using your FTP client\'s CHMOD feature to set the permissions on this folder to 777. Learn more about UNIX permissions.', + btn_clear_all: 'Clear all caches', + hint_clear_all: 'To force all caches (except image thumbnails) on the site to empty, click this button. Certain caches, such as language data, must be regenerated in order to fully refresh the cache. It is recommended that you use "%this.acpcm_btn_refresh_all%" below to clear all caches and then regenerate them.', + btn_refresh_all: 'Refresh all caches', + hint_refresh_all: 'This will clear all caches (except image thumbnails) on the site to empty and then regenerate, except templates, which are cached on demand.', + }, acpdb: { err_not_supported_title: 'Not supported', err_not_supported_desc: 'This function is only supported under the MySQL database driver.', diff -r 6a90893622f0 -r d2d4e40ecd29 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Mon Jul 07 02:49:54 2008 -0400 +++ b/plugins/SpecialAdmin.php Mon Jul 07 02:50:17 2008 -0400 @@ -65,7 +65,7 @@ require(ENANO_ROOT . '/plugins/admin/LangManager.php'); require(ENANO_ROOT . '/plugins/admin/ThemeManager.php'); require(ENANO_ROOT . '/plugins/admin/PluginManager.php'); - // require(ENANO_ROOT . '/plugins/admin/CacheManager.php'); + require(ENANO_ROOT . '/plugins/admin/CacheManager.php'); // Set the theme $session->theme = 'admin'; diff -r 6a90893622f0 -r d2d4e40ecd29 plugins/admin/CacheManager.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/admin/CacheManager.php Mon Jul 07 02:50:17 2008 -0400 @@ -0,0 +1,90 @@ +auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN ) + { + $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true); + echo '

' . $lang->get('adm_err_not_auth_title') . '

'; + echo '

' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '

'; + return; + } + + echo '

    ' . $lang->get('acpcm_heading_main') . '

'; + echo '

' . $lang->get('acpcm_intro') . '

'; + + acp_start_form(); + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ get('acpcm_table_header'); ?> +
+ +
+ + get('acpcm_hint_enable_cache'); ?> + +
+ + + get('acpcm_hint_clear_all'); ?> +
+ + + get('acpcm_hint_refresh_all'); ?> +
+ + +
+
+ '; +} + +?>