コード例 #1
0
ファイル: method-feed.php プロジェクト: rmccue/Lilina
    public static function rss2()
    {
        header('Content-Type: application/rss+xml; charset=' . get_option('encoding', 'utf-8'), true);
        echo '<?xml version="1.0" encoding="' . get_option('encoding', 'utf-8') . '"?' . '>';
        ?>

<!-- Generated by Lilina/<?php 
        echo LILINA_CORE_VERSION;
        ?>
 -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	<?php 
        do_action('rss2_ns');
        ?>
>

<channel>
	<title><?php 
        echo get_option('sitename');
        ?>
</title>
	<link><?php 
        echo get_option('baseurl');
        ?>
</link>
	<description><?php 
        echo get_option('sitename');
        ?>
</description>
	<atom:link href="<?php 
        echo get_option('baseurl');
        ?>
rss.php" rel="self" type="application/rss+xml" />
	<?php 
        //Need to fix this
        ?>
	<pubDate><?php 
        echo date('D, d M Y H:i:s +0000');
        ?>
</pubDate>
	<generator>http://getlilina.org/?v=<?php 
        echo LILINA_CORE_VERSION;
        ?>
</generator>
	<language><?php 
        echo get_option('lang');
        ?>
</language>
	<?php 
        do_action('rss2_head');
        if (has_items()) {
            while (has_items()) {
                the_item();
                ?>
	<item>
		<title><![CDATA[<?php 
                the_title();
                ?>
]]></title>
		<link><?php 
                the_link();
                ?>
</link>
		<pubDate><?php 
                the_date(array('format' => 'D, d M Y H:i:s +0000'));
                ?>
</pubDate>
		<?php 
                //Not entirely accurate; uses the feed name, not the author
                ?>
		<dc:creator><?php 
                the_feed_name();
                ?>
</dc:creator>

		<guid isPermaLink="false"><?php 
                the_id();
                ?>
</guid>
		<description><![CDATA[<?php 
                the_summary();
                ?>
]]></description>
		<content:encoded><![CDATA[<?php 
                the_content();
                ?>
]]></content:encoded>
		<?php 
                do_action('rss2_item');
                ?>
	</item>
	<?php 
            }
        }
        ?>
</channel>
</rss>
<?php 
    }
コード例 #2
0
ファイル: index.php プロジェクト: BackupTheBerlios/oos-svn
        the_title();
        ?>
</h3>
							&nbsp;
							<div class="excerpt"><p><?php 
        the_summary(200);
        ?>
</p></div>
							<div class="read"><a href="<?php 
        the_link();
        ?>
">Continue reading on the original site.</a></div>
						</div>
						<div class="secondary-section">
							<span class="feed"><?php 
        the_feed_name();
        ?>
</span>
							<span class="date"><?php 
        the_date('format=l d F, Y H:i');
        ?>
</span>
						</div>
						<div class="clearer"></div>
					</div>
					<div class="content" id="content-<?php 
        the_id();
        ?>
">
						<?php 
        the_content();
コード例 #3
0
ファイル: index.php プロジェクト: BackupTheBerlios/oos-svn
			<ul>
<?php
// We call it with false as a parameter to avoid incrementing the item number
if(has_items(false)) {
		while(has_items()): the_item();
?>
				<li class="feed-<?php the_feed_id(); ?> item" id="item-<?php the_id(); ?>">
					<div class="title-bar">
						<div class="main-section">
							<h3 class="title" id="title-<?php the_id(); ?>"><?php the_title(); ?></h3>
							&nbsp;
							<div class="excerpt"><p><?php the_summary(200) ?></p></div>
							<div class="read"><a href="<?php the_link(); ?>">Continue reading on the original site.</a></div>
						</div>
						<div class="secondary-section">
							<span class="feed"><?php the_feed_name() ?></span>
							<span class="date"><?php the_date('format=l d F, Y H:i'); ?></span>
						</div>
						<div class="clearer"></div>
					</div>
					<div class="content" id="content-<?php the_id(); ?>">
						<?php the_content(); ?>
					</div>
					<div class="action-bar">
						<?php action_bar('before=&after= | '); ?>
						<?php the_enclosure(); ?>
					</div>
				</li><?php
		endwhile;
}