From 459f442b5764497e30dcf6c00394addc052420f2 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 13 Apr 2011 23:47:47 +1000 Subject: Some sort of theme/homepage start --- inc/functions.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'inc/functions.php') diff --git a/inc/functions.php b/inc/functions.php index 7ec58e79..144cdec1 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -93,6 +93,25 @@ } } + function loadThemeConfig($_theme) { + global $config; + + // Load theme information into $theme + include $config['dir']['homepage'] . '/' . $_theme . '/theme.php'; + return $theme; + } + + function themeSettings() { + $query = query("SELECT * FROM `theme_settings`") or error(db_error()); + $settings = Array(); + + while($s = $query->fetch()) { + $settings[$s['name']] = $s['value']; + } + + return $settings; + } + function sprintf3($str, $vars, $delim = '%') { $replaces = array(); foreach($vars as $k => $v) { -- cgit v1.3