diff --git a/doc/html/tpldebug_8php.html b/doc/html/tpldebug_8php.html
new file mode 100644
index 000000000..d0384c0f7
--- /dev/null
+++ b/doc/html/tpldebug_8php.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+The Red Matrix: util/tpldebug.php File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  |
+
+ The Red Matrix
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ foreach ($files as $file) print_template |
+ ( |
+ |
+ $s | ) |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+ foreach ($files as $file) $files = glob('include/*.php') |
+
+
+
+
+
+
+
+
+
+
Initial value:{
+
+
+
echo 'boot.php: templates' . "\n"
+
+
+
+
+
+
diff --git a/doc/html/tpldebug_8php.js b/doc/html/tpldebug_8php.js
new file mode 100644
index 000000000..2391d96cc
--- /dev/null
+++ b/doc/html/tpldebug_8php.js
@@ -0,0 +1,6 @@
+var tpldebug_8php =
+[
+ [ "print_template", "tpldebug_8php.html#a44778457a6c02554812fbfad19d32ba3", null ],
+ [ "$files", "tpldebug_8php.html#a5358407d65f2ca826f96356a6642d149", null ],
+ [ "else", "tpldebug_8php.html#afbc7aadb3f7ff1edf0aaaa326a42179c", null ]
+];
\ No newline at end of file
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