Explorar o código

syntax highlighting can now be turned off, template can be changed in
configuration

Simon Rupf %!s(int64=12) %!d(string=hai) anos
pai
achega
d247bff897
Modificáronse 3 ficheiros con 6 adicións e 3 borrados
  1. 3 0
      cfg/conf.ini
  2. 1 1
      lib/zerobin.php
  3. 2 2
      tpl/page.html

+ 3 - 0
cfg/conf.ini

@@ -20,6 +20,9 @@ burnafterreadingselected = false
 ; size limit per paste or comment in bytes, default is 2 Mibibytes
 sizelimit = 2097152
 
+; template to include, default is "page" (tpl/page.html)
+template = "page"
+
 [expire]
 ; expire value that is selected per default
 ; make sure the value exists in [expire_options]

+ 1 - 1
lib/zerobin.php

@@ -405,7 +405,7 @@ class zerobin
         $page->assign('SYNTAXHIGHLIGHTING', $this->_conf['main']['syntaxhighlighting']);
         $page->assign('EXPIRE', $expire);
         $page->assign('EXPIREDEFAULT', $this->_conf['expire']['default']);
-        $page->draw('page');
+        $page->draw($this->_conf['main']['template']);
     }
 
     /**

+ 2 - 2
tpl/page.html

@@ -10,8 +10,8 @@
 		<script type="text/javascript" src="js/sjcl.js#"></script>
 		<script type="text/javascript" src="js/base64.js#"></script>
 		<script type="text/javascript" src="js/rawdeflate.js#"></script>
-		<script type="text/javascript" src="js/rawinflate.js#"></script>
-		<script type="text/javascript" src="js/prettify.js#"></script>
+		<script type="text/javascript" src="js/rawinflate.js#"></script>{if="$SYNTAXHIGHLIGHTING"}
+		<script type="text/javascript" src="js/prettify.js#"></script>{/if}
 		<script type="text/javascript" src="js/zerobin.js?{$VERSION|rawurlencode}#"></script>
 		<!--[if lt IE 10]>
 		<style> body {padding-left:60px;padding-right:60px;} div#ienotice {display:block;} </style>