]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TemplatePlugin.php
change controlyourself.ca to status.net
[quix0rs-gnu-social.git] / plugins / TemplatePlugin.php
index 03daf6219c8960e5239b00adeae534a00e393ab1..6c14f19881b50c7185eb8f2777e7c1ceecf56fb7 100644 (file)
@@ -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