[geeklog-hg] geeklog: Fixed COM_getBlockTemplate so it also checks for a defa...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jun 25 14:03:07 EDT 2013
changeset 9126:790c64a078d1
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/790c64a078d1
user: Tom <websitemaster at cogeco.net>
date: Sun Jun 23 09:53:07 2013 -0400
description:
Fixed COM_getBlockTemplate so it also checks for a default theme since it doesn't use the template class directly (which does this automatically)
diffstat:
public_html/lib-common.php | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diffs (45 lines):
diff -r b6090ca91df3 -r 790c64a078d1 public_html/lib-common.php
--- a/public_html/lib-common.php Sat Jun 22 13:55:17 2013 -0400
+++ b/public_html/lib-common.php Sun Jun 23 09:53:07 2013 -0400
@@ -346,6 +346,7 @@
* Get the configuration values from the theme
*/
$_CONF['theme_default'] = ''; // Default is none
+$_CONF['path_layout_default'] = ''; // Default is none
$_CONF['supported_version_theme'] = '1.8.1'; // if the themes supported version of the theme engine not found assume lowest version
$func = "theme_config_" . $_CONF['theme'];
if (function_exists($func)) {
@@ -354,6 +355,7 @@
$_IMAGE_TYPE = $theme_config['image_type'];
if (isset($theme_config['theme_default'])) {
$_CONF['theme_default'] = $theme_config['theme_default'];
+ $_CONF['path_layout_default'] = $_CONF['path_themes'] . $_CONF['theme_default'] . '/';
}
if (isset($theme_config['supported_version_theme'])) {
$_CONF['supported_version_theme'] = $theme_config['supported_version_theme'];
@@ -646,6 +648,14 @@
{
$template = $positionSpecific;
}
+ // See if default theme if so check there
+ if(!empty($_CONF['theme_default']))
+ {
+ if( file_exists( $_CONF['path_layout_default'] . $positionSpecific ) )
+ {
+ $template = $positionSpecific;
+ }
+ }
}
if( $_COM_VERBOSE )
@@ -8197,6 +8207,10 @@
file_exists($_CONF['path_layout'] . 'errormessage.html')) {
// NOTE: NOT A TEMPLATE! JUST HTML!
include $_CONF['path_layout'] . 'errormessage.html';
+ } elseif (!empty($_CONF['path_layout_default']) &&
+ file_exists($_CONF['path_layout_default'] . 'errormessage.html')) {
+ // NOTE: NOT A TEMPLATE! JUST HTML!
+ include $_CONF['path_layout_default'] . 'errormessage.html';
} else {
// Otherwise, display simple error message
$title = 'An Error Occurred';
More information about the geeklog-cvs
mailing list