Commit a5adbe46 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#173082 by dvessel: tplify aggregator module, make more stuff themeable

parent eddb278a
<?php
// $Id$
/**
* @file aggregator-feed-source.tpl.php
* Default theme implementation to present the source of the feed.
*
* The contents are render above feed listings when browsing source feeds.
* For example, "example.com/aggregator/sources/1".
*
* Available variables:
* - $source_icon: Feed icon linked to the source. Rendered through
* theme_feed_icon().
* - $source_image: Image set by the feed source.
* - $source_description: Description set by the feed source.
* - $source_url: URL to the feed source.
* - $last_checked: How long ago the feed was checked locally.
*
* @see template_preprocess()
* @see template_preprocess_aggregator_feed_source()
*/
?>
<div class="feed-source">
<?php print $source_icon; ?>
<?php print $source_image; ?>
<div class="feed-description">
<?php print $source_description; ?>
</div>
<div class="feed-url">
<em><?php print t('URL:'); ?></em> <a href="<?php print $source_url; ?>"><?php print $source_url; ?></a>
</div>
<div class="feed-updated">
<em><?php print t('Updated:'); ?></em> <?php print $last_checked; ?>
</div>
</div>
<?php
// $Id$
/**
* @file aggregator-item.tpl.php
* Default theme implementation to format an individual feed item for display
* on the aggregator page.
*
* Available variables:
* - $feed_url: URL to the originating feed item.
* - $feed_title: Title of the feed item.
* - $source_url: Link to the local source section.
* - $source_title: Title of the remote source.
* - $source_date: Date the feed was posted on the remote source.
* - $content: Feed item content.
* - $categories: Linked categories assigned to the feed.
*
* @see template_preprocess()
* @see template_preprocess_aggregator_item()
*/
?>
<div class="feed-item">
<h3 class="feed-item-title">
<a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>
</h3>
<div class="feed-item-meta">
<?php if ($source_url) : ?>
<a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
<?php endif; ?>
<span class="feed-item-date"><?php print $source_date; ?></span>
</div>
<?php if ($content) : ?>
<div class="feed-item-body">
<?php print $content; ?>
</div>
<?php endif; ?>
<?php if ($categories) : ?>
<div class="feed-item-categories">
<?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
</div>
<?php endif ;?>
</div>
<?php
// $Id$
/**
* @file aggregator-summary-item.tpl.php
* Default theme implementation to present a linked feed item for summaries.
*
* Available variables:
* - $feed_url: Link to originating feed.
* - $feed_title: Title of feed.
* - $feed_age: Age of remote feed.
* - $source_url: Link to remote source.
* - $source_title: Locally set title for the source.
*
* @see template_preprocess()
* @see template_preprocess_aggregator_summary_item()
*/
?>
<a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a> <span class="age"><?php print $feed_age; ?></span><?php if ($source_url) : ?>, <span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span><?php endif; ?>
<?php
// $Id$
/**
* @file aggregator-summary-items.tpl.php
* Default theme implementation to present feeds as list items.
*
* Each iteration generates a single feed source or category.
*
* Available variables:
* - $title: Title of the feed or category.
* - $summary_list: Unordered list of linked feed items generated through
* theme_item_list().
* - $source_url: URL to the local source or category.
*
* @see template_preprocess()
* @see template_preprocess_aggregator_summary-items()
*/
?>
<h2><?php print $title; ?></h2>
<?php print $summary_list; ?>
<div class="links">
<a href="<?php print $source_url; ?>"><?php print t('More'); ?></a>
</div>
<?php
// $Id$
/**
* @file comment-wrapper.tpl.php
* Default theme implementation to wrap aggregator content.
*
* Available variables:
* - $content: All aggregator content.
* - $page: Pager links rendered through theme_pager().
*
* @see template_preprocess()
* @see template_preprocess_comment_wrapper()
*/
?>
<div id="aggregator">
<?php print $content; ?>
<?php print $pager; ?>
</div>
......@@ -30,24 +30,45 @@ function aggregator_help($path, $arg) {
*/
function aggregator_theme() {
return array(
'aggregator_page_list' => array(
'aggregator_wrapper' => array(
'arguments' => array('content' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-wrapper',
),
'aggregator_categorize_items' => array(
'arguments' => array('form' => NULL),
'file' => 'aggregator.pages.inc',
),
'aggregator_feed' => array(
'aggregator_feed_source' => array(
'arguments' => array('feed' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-feed-source',
),
'aggregator_block_item' => array(
'arguments' => array('item' => NULL, 'feed' => 0),
),
'aggregator_summary_items' => array(
'arguments' => array('summary_items' => NULL, 'source' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-summary-items',
),
'aggregator_summary_item' => array(
'arguments' => array('item' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-summary-item',
),
'aggregator_page_item' => array(
'aggregator_item' => array(
'arguments' => array('item' => NULL),
'file' => 'aggregator.pages.inc',
'template' => 'aggregator-item',
),
'aggregator_page_opml' => array(
'arguments' => array('feeds' => NULL),
'file' => 'aggregator.pages.inc',
),
'aggregator_page_rss' => array(
'arguments' => array('feeds' => NULL, 'category' => NULL),
'file' => 'aggregator.pages.inc',
),
);
}
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment