summaryrefslogtreecommitdiff
path: root/plugins/TemplatePlugin.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-26 21:56:59 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-26 21:56:59 -0400
commit3e362233ee2f7acd676c0ee86025d7511f265b7e (patch)
treef691c476d17d31517e3367c1bc3d9608c4d7eed8 /plugins/TemplatePlugin.php
parent504c42aa7d4ff5cccd722bceb3231a5a8f46a27b (diff)
parentb7beac36c2dbebfa27982b2fc6c82cf2ebbaae8d (diff)
Merge commit 'laconica/0.8.x' into 0.9.x
Diffstat (limited to 'plugins/TemplatePlugin.php')
-rw-r--r--plugins/TemplatePlugin.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TemplatePlugin.php b/plugins/TemplatePlugin.php
index 03daf6219..6c14f1988 100644
--- a/plugins/TemplatePlugin.php
+++ b/plugins/TemplatePlugin.php
@@ -198,13 +198,13 @@ class TemplatePlugin extends Plugin {
// unless laconica config:
// $config['template']['mode'] = 'html';
if (!(common_config('template', 'mode') == 'html')) {
- $tpl_file = 'tpl/index.php';
+ $tpl_file = $this->templateFolder() . '/index.php';
$tags = array_merge($vars,$this->blocks);
include $tpl_file;
return;
}
- $tpl_file = 'tpl/index.html';
+ $tpl_file = $this->templateFolder() . '/index.html';
// read the static template
$output = file_get_contents( $tpl_file );
@@ -236,6 +236,9 @@ class TemplatePlugin extends Plugin {
return true;
}
+ function templateFolder() {
+ return 'tpl';
+ }
// catching the StartShowHTML event to halt the rendering
function onStartShowHTML( &$act ) {
@@ -300,7 +303,7 @@ class TemplateAction extends Action
$this->clientError(_('only User #1 can update the template'), $code = 401);
// open the old template
- $tpl_file = 'tpl/index.html';
+ $tpl_file = $this->templateFolder() . '/index.html';
$fp = fopen( $tpl_file, 'w+' );
// overwrite with the new template