From 9daf4133bf6f61cbe3787a46b021d261242a85f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 May 2007 08:34:02 +0100 Subject: add tagwall --- tw/output/HL_DEBUG_output.php | 74 +++++++++++++++++++++++++++++++++++++++++++ tw/output/HTML_output.php | 67 +++++++++++++++++++++++++++++++++++++++ tw/output/XHTML_output.php | 67 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) create mode 100644 tw/output/HL_DEBUG_output.php create mode 100644 tw/output/HTML_output.php create mode 100644 tw/output/XHTML_output.php (limited to 'tw/output') diff --git a/tw/output/HL_DEBUG_output.php b/tw/output/HL_DEBUG_output.php new file mode 100644 index 000000000..4a2521bd4 --- /dev/null +++ b/tw/output/HL_DEBUG_output.php @@ -0,0 +1,74 @@ +highlight( "<$tag>" ); + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; + } + return $this->highlight( "<$tag$attr>" ); + } + + function single ($tag, &$attributes) + { + if($attributes == null) + return $this->highlight( "<$tag />" ); + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= $value[0].'="'.$value[1].'" '; + } + return $this->highlight( "<$tag $attr/>" ); + } + + // template for end tags + function close ($tag) + { + return $this->highlight( "" ); + } + + function template_end() { return null; } + + + function highlight($string) + { + $string = str_replace("&","&",$string); + return ''.str_replace("<","<",$string).''; + } + +} //END class HTML_output + +?> \ No newline at end of file diff --git a/tw/output/HTML_output.php b/tw/output/HTML_output.php new file mode 100644 index 000000000..3df2fef9d --- /dev/null +++ b/tw/output/HTML_output.php @@ -0,0 +1,67 @@ +"; + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; + } + return "<$tag$attr>"; + } + + function single ($tag, &$attributes) + { + if($attributes == null) + return "<$tag>"; + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; + } + return "<$tag$attr>"; + } + + // template for end tags + function close ($tag) + { + return ""; + } + + function template_end() { return null; } + +} //END class HTML_output + +?> \ No newline at end of file diff --git a/tw/output/XHTML_output.php b/tw/output/XHTML_output.php new file mode 100644 index 000000000..89207b611 --- /dev/null +++ b/tw/output/XHTML_output.php @@ -0,0 +1,67 @@ +"; + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= ' '.$value[0].'="'.$value[1].'"'; + } + return "<$tag$attr>"; + } + + function single ($tag, &$attributes) + { + if($attributes == null) + return "<$tag />"; + $attr = null; + foreach ($attributes as $value) + { + if($value[1]) $attr .= $value[0].'="'.$value[1].'" '; + } + return "<$tag $attr/>"; + } + + // template for end tags + function close ($tag) + { + return ""; + } + + function template_end() { return null; } + +} //END class XHTML_output + +?> \ No newline at end of file -- cgit v1.2.3