diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-13 23:47:47 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-13 23:47:47 +1000 |
| commit | 459f442b5764497e30dcf6c00394addc052420f2 (patch) | |
| tree | 3a069f176cacc2c7897aa51f7cd93b0150289866 /inc/functions.php | |
| parent | b8951025635edc3c291d39bbab9f248e8c3de720 (diff) | |
Some sort of theme/homepage start
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 19 |
1 files changed, 19 insertions, 0 deletions
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) { |
