From 6bae2ad03a538c8c301b173b0dd6845aa181f3c5 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 25 Aug 2009 09:14:43 +1200 Subject: fix up tpl/index.php so doesn't throw errors on hosts with php shorttags on --- tpl/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/index.php b/tpl/index.php index be375e75a..36a161144 100644 --- a/tpl/index.php +++ b/tpl/index.php @@ -1,4 +1,4 @@ - +xml version="1.0" encoding="UTF-8"?> <?php echo section('title'); ?> -- cgit v1.2.3-54-g00ecf From 008a4898c8f3b2624bde54517a54ac64c4ad354d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 24 Aug 2009 20:03:22 +1200 Subject: moved template folder into it's own method, so can be overridden --- plugins/TemplatePlugin.php | 9 ++++++--- 1 file 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 -- cgit v1.2.3-54-g00ecf From eceffc4c01acd8e07cdb3b0a8591a7e65e5317be Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 25 Aug 2009 09:23:09 +1200 Subject: ignore the local folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5394f5eac..1cde3a625 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ avatar/* background/* files/* file/* +local/* _darcs/* logs/* config.php -- cgit v1.2.3-54-g00ecf