From 03a0fde2aabca9f797ea397342d622da600817c5 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Tue, 30 Oct 2007 17:26:42 +0000 Subject: [PATCH] added support to single.tpl for themes (you'll have to specify $theme['hassingle']=true ; added theme_getdir() --- fp-includes/core/core.theme.php | 7 +++++-- index.php | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fp-includes/core/core.theme.php b/fp-includes/core/core.theme.php index f193a7c..296cd7c 100644 --- a/fp-includes/core/core.theme.php +++ b/fp-includes/core/core.theme.php @@ -75,10 +75,13 @@ register_widgetset('top'); register_widgetset('bottom'); } - + + function theme_getdir($id = THE_THEME) { + return THEMES_DIR . ($id) . '/'; + } function theme_exists($id) { - $f = THEMES_DIR . ($id) . '/'; + $f = theme_getdir($id); if (file_exists($f)) return $f; diff --git a/index.php b/index.php index 5b47639..c0e7eea 100644 --- a/index.php +++ b/index.php @@ -43,11 +43,14 @@ function index_singlepost(&$params, &$module) { - global $fpdb; + global $fpdb, $theme; $params['id'] = $_GET['entry']; $params['fullparse']=true; $fpdb->query($params); + + if (@$theme['hassingle']) + $module='single.tpl'; add_filter('wp_title', 'index_permatitle', 10, 2);