Some sort of theme/homepage start

This commit is contained in:
Savetheinternet 2011-04-13 23:47:47 +10:00
parent b895102563
commit 459f442b57
6 changed files with 242 additions and 0 deletions

View file

@ -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) {