From e6d7e71175e388b7d5e356eebb9ff350c941026e Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sat, 28 May 2011 01:47:59 +1000 Subject: [PATCH] renamed "homepage" directory to "themes" --- inc/config.php | 6 +++--- inc/functions.php | 8 ++++---- mod.php | 14 +++++++------- templates/{homepage => themes}/basic/info.php | 0 templates/{homepage => themes}/basic/theme.php | 0 templates/{homepage => themes}/basic/thumb.png | Bin templates/{homepage => themes}/frameset/info.php | 0 templates/{homepage => themes}/frameset/theme.php | 0 templates/{homepage => themes}/frameset/thumb.png | Bin templates/{homepage => themes}/recent/info.php | 0 templates/{homepage => themes}/recent/recent.css | 0 templates/{homepage => themes}/recent/theme.php | 0 templates/{homepage => themes}/recent/thumb.png | Bin 13 files changed, 14 insertions(+), 14 deletions(-) rename templates/{homepage => themes}/basic/info.php (100%) rename templates/{homepage => themes}/basic/theme.php (100%) rename templates/{homepage => themes}/basic/thumb.png (100%) rename templates/{homepage => themes}/frameset/info.php (100%) rename templates/{homepage => themes}/frameset/theme.php (100%) rename templates/{homepage => themes}/frameset/thumb.png (100%) rename templates/{homepage => themes}/recent/info.php (100%) rename templates/{homepage => themes}/recent/recent.css (100%) rename templates/{homepage => themes}/recent/theme.php (100%) rename templates/{homepage => themes}/recent/thumb.png (100%) diff --git a/inc/config.php b/inc/config.php index c603a95d..d65e867e 100644 --- a/inc/config.php +++ b/inc/config.php @@ -246,10 +246,10 @@ //$config['dir']['static'] = $config['root'] . 'static/'; // Where to store the .html templates. This folder and templates must exist or fatal errors will be thrown. $config['dir']['template'] = getcwd() . '/templates'; - // For the homepage generation files (themes, etc.) - $config['dir']['homepage'] = getcwd() . '/templates/homepage'; + // For the themes (homepages, etc.) + $config['dir']['themes'] = getcwd() . '/templates/themes'; // Same as above, but a URI (accessable by web interface, not locally) - $config['dir']['homepage_uri'] = 'templates/homepage'; + $config['dir']['themes_uri'] = 'templates/themes'; // Homepage directory $config['dir']['home'] = ''; diff --git a/inc/functions.php b/inc/functions.php index 831a9981..2efa6178 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -143,11 +143,11 @@ function loadThemeConfig($_theme) { global $config; - if(!file_exists($config['dir']['homepage'] . '/' . $_theme . '/info.php')) + if(!file_exists($config['dir']['themes'] . '/' . $_theme . '/info.php')) return false; // Load theme information into $theme - include $config['dir']['homepage'] . '/' . $_theme . '/info.php'; + include $config['dir']['themes'] . '/' . $_theme . '/info.php'; return $theme; } @@ -162,8 +162,8 @@ $theme = loadThemeConfig($_theme); - if(file_exists($config['dir']['homepage'] . '/' . $_theme . '/theme.php')) { - require_once $config['dir']['homepage'] . '/' . $_theme . '/theme.php'; + if(file_exists($config['dir']['themes'] . '/' . $_theme . '/theme.php')) { + require_once $config['dir']['themes'] . '/' . $_theme . '/theme.php'; $theme['build_function']($action, themeSettings()); } diff --git a/mod.php b/mod.php index b6f01ec6..5f655bcb 100644 --- a/mod.php +++ b/mod.php @@ -317,17 +317,17 @@ echo Element('page.html', Array( 'config'=>$config, 'title'=>'No theme', - 'body'=>'

Successfully stopped using any themes. You\'ll have to create a homepage manually if you want one.

', + 'body'=>'

Successfully stopped using all themes.

', 'mod'=>true ) ); } elseif(preg_match('/^\/themes(\/(\w+))?$/', $query, $match)) { if($mod['type'] < $config['mod']['themes']) error($config['error']['noaccess']); - if(!is_dir($config['dir']['homepage'])) - error('Homepage directory doesn\'t exist!'); - if(!$dir = opendir($config['dir']['homepage'])) - error('Cannot open homepage directory; check permissions.'); + if(!is_dir($config['dir']['themes'])) + error('Themes directory doesn\'t exist!'); + if(!$dir = opendir($config['dir']['themes'])) + error('Cannot open themes directory; check permissions.'); if(isset($match[2])) { $_theme = &$match[2]; @@ -406,7 +406,7 @@ // Scan directory for themes $themes = Array(); while($file = readdir($dir)) { - if($file[0] != '.' && is_dir($config['dir']['homepage'] . '/' . $file)) { + if($file[0] != '.' && is_dir($config['dir']['themes'] . '/' . $file)) { $themes[] = $file; } } @@ -436,7 +436,7 @@ '' . '' . 'Thumbnail' . - '' . + '' . '' . '' . 'Actions' . diff --git a/templates/homepage/basic/info.php b/templates/themes/basic/info.php similarity index 100% rename from templates/homepage/basic/info.php rename to templates/themes/basic/info.php diff --git a/templates/homepage/basic/theme.php b/templates/themes/basic/theme.php similarity index 100% rename from templates/homepage/basic/theme.php rename to templates/themes/basic/theme.php diff --git a/templates/homepage/basic/thumb.png b/templates/themes/basic/thumb.png similarity index 100% rename from templates/homepage/basic/thumb.png rename to templates/themes/basic/thumb.png diff --git a/templates/homepage/frameset/info.php b/templates/themes/frameset/info.php similarity index 100% rename from templates/homepage/frameset/info.php rename to templates/themes/frameset/info.php diff --git a/templates/homepage/frameset/theme.php b/templates/themes/frameset/theme.php similarity index 100% rename from templates/homepage/frameset/theme.php rename to templates/themes/frameset/theme.php diff --git a/templates/homepage/frameset/thumb.png b/templates/themes/frameset/thumb.png similarity index 100% rename from templates/homepage/frameset/thumb.png rename to templates/themes/frameset/thumb.png diff --git a/templates/homepage/recent/info.php b/templates/themes/recent/info.php similarity index 100% rename from templates/homepage/recent/info.php rename to templates/themes/recent/info.php diff --git a/templates/homepage/recent/recent.css b/templates/themes/recent/recent.css similarity index 100% rename from templates/homepage/recent/recent.css rename to templates/themes/recent/recent.css diff --git a/templates/homepage/recent/theme.php b/templates/themes/recent/theme.php similarity index 100% rename from templates/homepage/recent/theme.php rename to templates/themes/recent/theme.php diff --git a/templates/homepage/recent/thumb.png b/templates/themes/recent/thumb.png similarity index 100% rename from templates/homepage/recent/thumb.png rename to templates/themes/recent/thumb.png