Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
316
Merge Requests
316
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a5adbe46
Commit
a5adbe46
authored
Sep 13, 2007
by
Gábor Hojtsy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#173082
by dvessel: tplify aggregator module, make more stuff themeable
parent
eddb278a
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
393 additions
and
162 deletions
+393
-162
modules/aggregator/aggregator-feed-source.tpl.php
modules/aggregator/aggregator-feed-source.tpl.php
+35
-0
modules/aggregator/aggregator-item.tpl.php
modules/aggregator/aggregator-item.tpl.php
+46
-0
modules/aggregator/aggregator-summary-item.tpl.php
modules/aggregator/aggregator-summary-item.tpl.php
+19
-0
modules/aggregator/aggregator-summary-items.tpl.php
modules/aggregator/aggregator-summary-items.tpl.php
+24
-0
modules/aggregator/aggregator-wrapper.tpl.php
modules/aggregator/aggregator-wrapper.tpl.php
+19
-0
modules/aggregator/aggregator.module
modules/aggregator/aggregator.module
+24
-3
modules/aggregator/aggregator.pages.inc
modules/aggregator/aggregator.pages.inc
+226
-159
No files found.
modules/aggregator/aggregator-feed-source.tpl.php
0 → 100644
View file @
a5adbe46
<?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>
modules/aggregator/aggregator-item.tpl.php
0 → 100644
View file @
a5adbe46
<?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>
modules/aggregator/aggregator-summary-item.tpl.php
0 → 100644
View file @
a5adbe46
<?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
;
?>
modules/aggregator/aggregator-summary-items.tpl.php
0 → 100644
View file @
a5adbe46
<?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>
modules/aggregator/aggregator-wrapper.tpl.php
0 → 100644
View file @
a5adbe46
<?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>
modules/aggregator/aggregator.module
View file @
a5adbe46
...
...
@@ -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'
,
),
);
}
...
...
modules/aggregator/aggregator.pages.inc
View file @
a5adbe46
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment