[feature/template-engine] Created a script to compile templates.

Script takes path to template as the only argument and outputs
the compiled template to standard output.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev 2011-04-24 23:13:44 -04:00
parent 5afc0b9b90
commit 8d5e468eb4

View file

@ -0,0 +1,24 @@
<?php
// -------------------------------------------------------------
//
// $Id$
//
// FILENAME : compile_template.php
// STARTED : Sun Apr 24, 2011
// COPYRIGHT : © 2011 phpBB Group
// WWW : http://www.phpbb.com/
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
//
// -------------------------------------------------------------
define('IN_PHPBB', 1);
define('ANONYMOUS', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = './../';
include($phpbb_root_path . 'includes/template_compile.'.$phpEx);
$file = $argv[1];
$compile = new phpbb_template_compile();
echo $compile->compile_gen($file);