added support to single.tpl for themes (you'll have to specify $theme['hassingle']=true ; added theme_getdir()

This commit is contained in:
real_nowhereman 2007-10-30 17:26:42 +00:00
parent 76193d7e77
commit 03a0fde2aa
2 changed files with 9 additions and 3 deletions

View File

@ -75,10 +75,13 @@
register_widgetset('top'); register_widgetset('top');
register_widgetset('bottom'); register_widgetset('bottom');
} }
function theme_getdir($id = THE_THEME) {
return THEMES_DIR . ($id) . '/';
}
function theme_exists($id) { function theme_exists($id) {
$f = THEMES_DIR . ($id) . '/'; $f = theme_getdir($id);
if (file_exists($f)) if (file_exists($f))
return $f; return $f;

View File

@ -43,11 +43,14 @@
function index_singlepost(&$params, &$module) { function index_singlepost(&$params, &$module) {
global $fpdb; global $fpdb, $theme;
$params['id'] = $_GET['entry']; $params['id'] = $_GET['entry'];
$params['fullparse']=true; $params['fullparse']=true;
$fpdb->query($params); $fpdb->query($params);
if (@$theme['hassingle'])
$module='single.tpl';
add_filter('wp_title', 'index_permatitle', 10, 2); add_filter('wp_title', 'index_permatitle', 10, 2);