--- a/includes/clientside/static/template-compiler.js Sun Jun 22 18:13:59 2008 -0400
+++ b/includes/clientside/static/template-compiler.js Tue Jun 24 23:37:23 2008 -0400
@@ -1,7 +1,7 @@
// An implementation of Enano's template compiler in Javascript. Same exact API
// as the PHP version - constructor accepts text, then the assign_vars, assign_bool, and run methods.
-function templateParser(text)
+window.templateParser = function(text)
{
this.tpl_code = text;
this.tpl_strings = new Object();
@@ -11,7 +11,7 @@
this.run = __tpRun;
}
-function __tpAssignVars(vars)
+window.__tpAssignVars = function(vars)
{
for(var i in vars)
{
@@ -19,7 +19,7 @@
}
}
-function __tpAssignBool(vars)
+window.__tpAssignBool = function(vars)
{
for(var i in vars)
{
@@ -27,7 +27,7 @@
}
}
-function __tpRun()
+window.__tpRun = function()
{
if(typeof(this.tpl_code) == 'string')
{
@@ -45,7 +45,7 @@
return false;
}
-function __tpCompileTemplate(code)
+window.__tpCompileTemplate = function(code)
{
// Compile plaintext/template code to javascript code
code = code.replace(/\\/g, "\\\\");
@@ -60,7 +60,7 @@
return code;
}
-function __tpExtractVars(code)
+window.__tpExtractVars = function(code)
{
code = code.replace('\\', "\\\\");
code = code.replace("'", "\\'");