summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-05-28 01:47:59 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-05-28 01:47:59 +1000
commite6d7e71175e388b7d5e356eebb9ff350c941026e (patch)
tree4fca57043d97fe0707b8851678fa57d48a2372d3
parenteef49937941769c2ba3b9abb7319d1f24ef6e6d7 (diff)
renamed "homepage" directory to "themes"
-rw-r--r--inc/config.php6
-rw-r--r--inc/functions.php8
-rw-r--r--mod.php14
-rw-r--r--templates/themes/basic/info.php (renamed from templates/homepage/basic/info.php)0
-rw-r--r--templates/themes/basic/theme.php (renamed from templates/homepage/basic/theme.php)0
-rw-r--r--templates/themes/basic/thumb.png (renamed from templates/homepage/basic/thumb.png)bin9298 -> 9298 bytes
-rw-r--r--templates/themes/frameset/info.php (renamed from templates/homepage/frameset/info.php)0
-rw-r--r--templates/themes/frameset/theme.php (renamed from templates/homepage/frameset/theme.php)0
-rw-r--r--templates/themes/frameset/thumb.png (renamed from templates/homepage/frameset/thumb.png)bin7571 -> 7571 bytes
-rw-r--r--templates/themes/recent/info.php (renamed from templates/homepage/recent/info.php)0
-rw-r--r--templates/themes/recent/recent.css (renamed from templates/homepage/recent/recent.css)0
-rw-r--r--templates/themes/recent/theme.php (renamed from templates/homepage/recent/theme.php)0
-rw-r--r--templates/themes/recent/thumb.png (renamed from templates/homepage/recent/thumb.png)bin24532 -> 24532 bytes
13 files changed, 14 insertions, 14 deletions
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'=>'<p style="text-align:center">Successfully stopped using any themes. You\'ll have to create a homepage manually if you want one.</p>',
+ 'body'=>'<p style="text-align:center">Successfully stopped using all themes.</p>',
'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 @@
'</tr>' .
'<tr>' .
'<th class="minimal">Thumbnail</th>' .
- '<td><img style="float:none;margin:4px" src="' . $config['dir']['homepage_uri'] . '/' . $_theme . '/thumb.png" /></td>' .
+ '<td><img style="float:none;margin:4px" src="' . $config['dir']['themes_uri'] . '/' . $_theme . '/thumb.png" /></td>' .
'</tr>' .
'<tr>' .
'<th class="minimal">Actions</th>' .
diff --git a/templates/homepage/basic/info.php b/templates/themes/basic/info.php
index bd856655..bd856655 100644
--- a/templates/homepage/basic/info.php
+++ b/templates/themes/basic/info.php
diff --git a/templates/homepage/basic/theme.php b/templates/themes/basic/theme.php
index 5b086852..5b086852 100644
--- a/templates/homepage/basic/theme.php
+++ b/templates/themes/basic/theme.php
diff --git a/templates/homepage/basic/thumb.png b/templates/themes/basic/thumb.png
index 05dcd96c..05dcd96c 100644
--- a/templates/homepage/basic/thumb.png
+++ b/templates/themes/basic/thumb.png
Binary files differ
diff --git a/templates/homepage/frameset/info.php b/templates/themes/frameset/info.php
index ad42fc91..ad42fc91 100644
--- a/templates/homepage/frameset/info.php
+++ b/templates/themes/frameset/info.php
diff --git a/templates/homepage/frameset/theme.php b/templates/themes/frameset/theme.php
index 6aa126c8..6aa126c8 100644
--- a/templates/homepage/frameset/theme.php
+++ b/templates/themes/frameset/theme.php
diff --git a/templates/homepage/frameset/thumb.png b/templates/themes/frameset/thumb.png
index df18a8e9..df18a8e9 100644
--- a/templates/homepage/frameset/thumb.png
+++ b/templates/themes/frameset/thumb.png
Binary files differ
diff --git a/templates/homepage/recent/info.php b/templates/themes/recent/info.php
index 734908c4..734908c4 100644
--- a/templates/homepage/recent/info.php
+++ b/templates/themes/recent/info.php
diff --git a/templates/homepage/recent/recent.css b/templates/themes/recent/recent.css
index 7b9f2333..7b9f2333 100644
--- a/templates/homepage/recent/recent.css
+++ b/templates/themes/recent/recent.css
diff --git a/templates/homepage/recent/theme.php b/templates/themes/recent/theme.php
index 764c4170..764c4170 100644
--- a/templates/homepage/recent/theme.php
+++ b/templates/themes/recent/theme.php
diff --git a/templates/homepage/recent/thumb.png b/templates/themes/recent/thumb.png
index fff5b824..fff5b824 100644
--- a/templates/homepage/recent/thumb.png
+++ b/templates/themes/recent/thumb.png
Binary files differ