Commit ee305ae1 authored by Dries's avatar Dries

Round 3 of aggregator improvements:

 - Added support for new tags:
   + Optinal feed image: <image> tag.
   + Dublin core dates: <dc:date> <dcterms:created>, <dcterms:issued>,
     <dcterms:modified>.
 - Usability improvements:
   + On the administration page, made the feed/bundle titles link
     to the feeds/bundles' pages.  On the feed/bundle's page, made
     the 'Last updated' field link to the administration page.
   + Moved the 'syndication' menu one level down.
 - Updated some content sensitive help.
 - Further improved themeability.
 - Fixed some invalid HTML.
parent 93dd6445
......@@ -7,13 +7,14 @@ Drupal x.x.x, xxxx-xx-xx
- news aggregator:
* added support for conditional GET.
* added OPML feed subscription list.
* added support for <image>, <pubDate>, <dc:date>, <dcterms:created>, <dcterms:issued> and <dcterms:modified>.
- comment module:
* made it possible to disable the "comment viewing controls".
- performance:
* improved module loading when serving cached pages.
* made it possible to automatically disable modules when under heavy load.
* made it possible to automatically disable blocks when under heavy load.
* improved performance of locale module and reduced memory footprint.
* improved performance and memory footprint of the locale module.
- theme system:
* made all theme functions start with 'theme_'.
* made all theme functions return their output.
......
......@@ -108,6 +108,7 @@ CREATE TABLE [dbo].[feed] (
[attributes] [varchar] (255) NULL ,
[link] [varchar] (255) NULL ,
[description] [varchar] (8000) NULL ,
[image] [varchar] (512) NULL ,
[etag] [varchar] (255) NULL ,
[modified] [int] NOT NULL
) ON [PRIMARY]
......
......@@ -160,6 +160,7 @@ CREATE TABLE feed (
attributes varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '',
description longtext NOT NULL,
image longtext NOT NULL default '',
etag varchar(255) NOT NULL default '',
modified int(10) NOT NULL default '0',
PRIMARY KEY (fid),
......
......@@ -158,6 +158,7 @@ CREATE TABLE feed (
attributes varchar(255) NOT NULL default '',
link varchar(255) NOT NULL default '',
description text NOT NULL default '',
image text NOT NULL default '',
etag varchar(255) NOT NULL default '',
modified integer NOT NULL default '0',
PRIMARY KEY (fid),
......
......@@ -452,6 +452,15 @@ function theme_error($message) {
return "<div class=\"error\">$message</div>";
}
/**
* Returns code that emits an XML-icon.
*
* @return a string containing the @a output.
*/
function theme_xml_icon($url) {
return "<div class=\"xml-icon\"><a href=\"$url\"><img src=\"misc/xml.gif\" width=\"36\" height=\"14\" alt=\"". t('XML feed') ."\" /></a></div>";
}
/**
* Execute hook _head which is run at the start of the page, and output should
* be in the head tags.
......
......@@ -126,14 +126,17 @@ img {
.form-submit {
margin: 0.5em 0;
}
.news-item .date {
#aggregator .feed img {
float: right;
}
#aggregator .news-item .date {
float: left;
}
.news-item .body {
#aggregator .news-item .body {
margin-top: 1em;
margin-left: 4em;
}
.news-item .body .feed {
#aggregator .news-item .body .feed {
font-size: 0.9em;
}
#forum .description {
......
This diff is collapsed.
This diff is collapsed.
......@@ -122,8 +122,8 @@ function blog_page_user($uid) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
$output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url("blog/feed/$account->uid"));
print theme("page", $output, $title);
}
......@@ -138,8 +138,8 @@ function blog_page_last() {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
$output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url('blog/feed'));
print theme("page", $output);
}
......
......@@ -122,8 +122,8 @@ function blog_page_user($uid) {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
$output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>";
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url("blog/feed/$account->uid"));
print theme("page", $output, $title);
}
......@@ -138,8 +138,8 @@ function blog_page_last() {
while ($node = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $node->nid)), 1);
}
$output .= theme("pager", NULL, variable_get("default_nodes_main", 10));
$output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed", array("title" => t("Read the XML version of all blogs."))) ."</div>";
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url('blog/feed'));
print theme("page", $output);
}
......
......@@ -922,7 +922,7 @@ function node_block($op = "list", $delta = 0) {
}
else {
$block["subject"] = t("Syndicate");
$block["content"] = "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"XML\" title=\"XML\" />", "node/feed", array("title" => t("Read the XML version of this page."))) ."</div>";
$block["content"] = theme('xml_icon', url('node/feed'));
return $block;
}
......
......@@ -922,7 +922,7 @@ function node_block($op = "list", $delta = 0) {
}
else {
$block["subject"] = t("Syndicate");
$block["content"] = "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"XML\" title=\"XML\" />", "node/feed", array("title" => t("Read the XML version of this page."))) ."</div>";
$block["content"] = theme('xml_icon', url('node/feed'));
return $block;
}
......
......@@ -33,7 +33,7 @@ table {
#main {
width: 80%;
}
#aggregator .info {
#aggregator .feed {
border: 1px dashed #888;
padding: 1em;
}
......
......@@ -49,7 +49,7 @@ ul {
font-style: italic;
font-size: 0.9em;
}
#aggregator .info {
#aggregator .feed {
border: 1px dashed #000;
padding: 1em;
}
......
......@@ -64,7 +64,8 @@
"2003-11-27" => "update_72",
"2003-12-03" => "update_73",
"2003-12-06" => "update_74",
"2004-01-06" => "update_75"
"2004-01-06" => "update_75",
"2004-01-11" => "update_76"
);
function update_32() {
......@@ -599,6 +600,10 @@ function update_75() {
update_sql("UPDATE {system} SET filename = 'modules/aggregator.module', name = 'aggregator' WHERE filename = 'modules/import.module'");
}
function update_76() {
update_sql("ALTER TABLE {feed} ADD image longtext");
}
/*
** System functions
*/
......
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