'',
'SITETITLE' => '',
'DESCRIPTION' => '',
'ARTICLELIMIT' => '',
'RDFARTICLELIMIT' => '',
'URL' => '',
'EMAIL' => '');
$config_close_tags = array(
'WEBLOG' => '',
'SITETITLE' => '',
'DESCRIPTION' => '',
'ARTICLELIMIT' => '',
'RDFARTICLELIMIT' => '',
'URL' => '',
'EMAIL' => '');
$open_tags = array(
'CHANNEL' => '',
'ITEM' => '- ',
'TITLE' => '',
'LINK' => '');
$close_tags = array(
'CHANNEL' => '
',
'ITEM' => '',
'TITLE' => '',
'LINK' => '');
function make_xml_parser($character, $startelement, $endelement) {
$xml_parser = xml_parser_create("UTF-8");
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'UTF-8');
xml_set_character_data_handler($xml_parser, $character);
xml_set_element_handler($xml_parser, $startelement, $endelement);
return $xml_parser;
}
function get_articlelist($offset, $limit) {
// Get list of all available articles
global $articledir, $showentry, $totalarticles;
$handle=opendir("$articledir");
// Skip reading the directory if we're displaying a permalink
if ($showentry) {
$articlelist[0]=$showentry;
return $articlelist;
}
// Stock $articlelist with every available article
$index=0;
while ($file = readdir($handle)) {
if ($file != "." && $file != "..") {
$articlelist[$index] = "$file";
$index++;
}
}
// Set the total now
$totalarticles = sizeof($articlelist);
// Sort the article list to highest number (most recent) first
rsort ($articlelist);
// Avoid overflows if we don't have a lot of articles, or make sure
// every article is displayed if the limit is 0
if ((sizeof($articlelist) < $limit) || ($limit == 0)) {
$limit = sizeof($articlelist) - $offset;
}
for ($count=0;$count<$limit;$count++) {
$newlist[$count]=$articlelist[$count+$offset];
}
return $newlist;
}
function append_to_url($url, $option) {
if (preg_match("/\?/",$url)) {
$switchchar="&";
}
else {
$switchchar="?";
}
$url = $url.$switchchar.$option;
return $url;
}
?>