--- web/trunk/www.linuxsampler.org/news_internal.php 2007/10/12 13:26:07 1408 +++ web/trunk/www.linuxsampler.org/news_internal.php 2007/10/12 14:34:42 1409 @@ -5,10 +5,23 @@ // show all news entries by default $max_items = -1; +$current_tag = array(); +$current_tag_attribs = 0; +$current_tag_body_is_empty = true; +$current_link_ref = ""; + function startElement($parser, $name, $attribs) { global $max_items; + global $current_tag; + global $current_tag_body_is_empty; + global $current_link_ref; + if ($max_items == 0) return; + array_push($current_tag, $name); + + $current_tag_body_is_empty = true; + if ($name == "entry") { if (count($attribs) && isset($attribs["date"])) { $d = $attribs["date"]; @@ -16,8 +29,8 @@ echo "$d "; } else echo "??? "; } else if ($name == "link") { - $addr = (isset($attribs["ref"])) ? $attribs["ref"] : ""; - echo ""; + $current_link_ref = (isset($attribs["ref"])) ? $attribs["ref"] : ""; + echo ""; } else if ($name == "list") { echo ""; else if ($name == "li") echo ""; } function characterData($parser, $data) { global $max_items; + global $current_tag; + global $current_tag_body_is_empty; + + $current_tag_body_is_empty = false; + if ($max_items == 0) return; echo $data;