From 25a55219ec5a956ed70d4938c1834401a666d886 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Jun 2013 16:39:50 -0700 Subject: quick and dirty (real dirty) template doco --- util/tpldebug.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 util/tpldebug.php (limited to 'util') diff --git a/util/tpldebug.php b/util/tpldebug.php new file mode 100644 index 000000000..80da410dc --- /dev/null +++ b/util/tpldebug.php @@ -0,0 +1,43 @@ + 1) { + echo "{$argv[1]}: templates\n"; + print_template($argv[1]); +} +else { + + + echo 'boot.php: templates' . "\n"; + print_template('boot.php'); + + $files = glob('include/*.php'); + foreach($files as $file) { + echo $file . ': templates'. "\n"; + print_template($file); + } + + $files = glob('mod/*.php'); + foreach($files as $file) { + echo $file . ': templates'. "\n"; + print_template($file); + } +} + +function print_template($s) { + $x = file_get_contents($s); + + $cnt = preg_match_all('/replace_macros(.*?)\)\;/ism',$x,$matches); + + if($cnt) { + print_r($matches[0]); + + } + +} \ No newline at end of file -- cgit v1.2.3