stash('blog'); $cc = $blog['blog_cc_license']; if (empty($cc)) return ''; require_once("cc_lib.php"); require_once("MTUtil.php"); $cc_url = cc_url($cc); $rdf = << RDF; ## SGML comments cannot contain double hyphens, so we convert ## any double hyphens to single hyphens. $entry = $ctx->stash('entry'); if ($entry) { $permalink = $ctx->tag('EntryPermalink'); $title = encode_xml(strip_hyphen($entry['entry_title'])); $desc = encode_xml(strip_hyphen($ctx->tag('EntryExcerpt'))); $creator = encode_xml(strip_hyphen($entry['entry_author_id'] ? $entry['author_name'] : '')); $date = $ctx->_hdlr_date(array('format' => "%Y-%m-%dT%H:%M:%S"), $ctx) . $ctx->tag('BlogTimezone'); $rdf .= << $title $desc $creator $date RDF; } else { $site_url = $blog['blog_site_url']; if (!preg_match('!/$!', $site_url)) $site_url .= '/'; $title = encode_xml(strip_hyphen($blog['blog_name'])); $desc = encode_xml(strip_hyphen($blog['blog_description'])); $rdf .= << $title $desc RDF; } $rdf .= cc_rdf($cc) . "\n-->\n"; return $rdf; } ?>