Make WordPress Core

source: trunk/b2rss.php @ 3

Last change on this file since 3 was 3, checked in by saxmatt, 22 years ago

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
RevLine 
[3]1<?php /* These first lines are the first part of a CaféLog template.
2         In every template you do, you got to copy them before the CaféLog 'loop' */
3$blog=1; // enter your blog's ID
4header("Content-type: text/xml");
5include ("blog.header.php");
6if (!isset($rss_language)) { $rss_language = 'en'; }
7if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
8if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
9?><?php echo "<?xml version=\"1.0\"?".">\n"; ?>
10<!-- generator="b2/<?php echo $b2_version ?>" -->
11<rss version="0.92">
12        <channel>
13                <title><?php bloginfo_rss("name") ?></title>
14                <link><?php bloginfo_rss("url") ?></link>
15                <description><?php bloginfo_rss("description") ?></description>
16                <lastBuildDate><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</lastBuildDate>
17                <docs>http://backend.userland.com/rss092</docs>
18                <managingEditor><?php echo $admin_email ?></managingEditor>
19                <webMaster><?php echo $admin_email ?></webMaster>
20                <language><?php echo $rss_language ?></language>
21
22<?php $items_count = 0; while($row = mysql_fetch_object($result)) { start_b2(); ?>
23                <item>
24                                <title><?php the_title_rss() ?></title><?php
25// we might use this in the future, but not now, that's why it's commented in PHP
26// so that it doesn't appear at all in the RSS
27//                              echo "<category>"; the_category_unicode(); echo "</category>"; ?>
28                                <description><?php the_content_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?></description>
29                                <link><?php permalink_single_rss() ?></link>
30                </item>
31<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } ?>
32
33        </channel>
34</rss>
Note: See TracBrowser for help on using the repository browser.