diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-15 11:39:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-15 11:39:56 +0000 |
commit | 83f5d82876e6b2102c2b5839b430f1d5f9a23ec1 (patch) | |
tree | 01fdcbf42575cd001bfd87af07b9ef1bd1ea8453 /modules/aggregator | |
parent | d03872979756371aeff787bca107db9a88d7004a (diff) | |
download | brdo-83f5d82876e6b2102c2b5839b430f1d5f9a23ec1.tar.gz brdo-83f5d82876e6b2102c2b5839b430f1d5f9a23ec1.tar.bz2 |
- Everything is using theme("function") now instead of $theme->function().
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 56b8f08e6..038ec1b26 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -60,10 +60,10 @@ function import_update() { } function import_format_item($item, $feed = 0) { - global $theme, $user; + global $user; if ($user->uid && user_access("maintain personal blog")) { - $output .= l("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."))); + $output .= l("<img src=\"". theme("image", "blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", "node/add/blog&iid=$item->iid", array("title" => t("Comment on this news item in your personal blog."))); } // external link @@ -503,7 +503,7 @@ function import_admin() { } function import_page_info() { - global $theme; + $links[] = l(t("latest news"), "import", array("title" => t("Read the latest news from syndicated websites."))); $links[] = l(t("news by source"), "import/feeds", array("title" => t("View the latest headlines sorted by source."))); @@ -514,11 +514,11 @@ function import_page_info() { $links[] = l(t("administer news feeds"), "admin/import", array("title" => t("View the news feed administrative pages."))); } - return "<div align=\"center\">". $theme->links($links) ."</div>"; + return "<div align=\"center\">". theme("links", $links) ."</div>"; } function import_page_last() { - global $theme; + $result = db_query("SELECT i.*, f.title AS ftitle, f.link AS flink FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT ". variable_get("import_page_limit", 75)); @@ -530,7 +530,7 @@ function import_page_last() { $links[] = l(t("feed"), "import/feed/$item->fid", array("title" => t("Read more syndicated news from this feed."))); if ($item->link) { - $output .= "<tr><td><a href=\"$item->link\">$item->title</a> · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n"; + $output .= "<tr><td><a href=\"$item->link\">$item->title</a> · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n"; } if ($item->description) { @@ -541,20 +541,20 @@ function import_page_last() { } $output .= "</table>\n"; - $theme->header(); - $theme->box(t("News feeds"), import_page_info()); - $theme->box(t("Latest news"), $output); - $theme->footer(); + theme("header"); + theme("box", t("News feeds"), import_page_info()); + theme("box", t("Latest news"), $output); + theme("footer"); } function import_page_feed($fid) { - global $theme; + $feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid)); $header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>"; $header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">$feed->description</div></p>"; - $header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" alt=\"\" /></a><br /><br /></div></p>\n"; + $header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ." <a href=\"$feed->url\"><img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" alt=\"\" /></a><br /><br /></div></p>\n"; $result = db_query("SELECT * FROM item WHERE fid = '%s' ORDER BY iid DESC LIMIT ". variable_get("import_page_limit", 75), $fid); @@ -566,7 +566,7 @@ function import_page_feed($fid) { $links[] = "<a href=\"$item->link\">". t("visit") ."</a>"; if ($item->link) { - $output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n"; + $output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n"; } if ($item->description) { $output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">$item->description</div><br /></td></tr>"; @@ -576,15 +576,15 @@ function import_page_feed($fid) { } $output .= "</table>\n"; - $theme->header(); - $theme->box(t("News feeds"), import_page_info()); - $theme->box($feed->title, $header); - $theme->box(t("Latest news"), $output); - $theme->footer(); + theme("header"); + theme("box", t("News feeds"), import_page_info()); + theme("box", $feed->title, $header); + theme("box", t("Latest news"), $output); + theme("footer"); } function import_page_bundle($bid) { - global $theme; + $bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid)); @@ -604,7 +604,7 @@ function import_page_bundle($bid) { $links[] = "<a href=\"$item->link\">". t("visit") ."</a>"; if ($item->link) { - $output .= "<tr><td><a href=\"$item->link\">$item->title</a> · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n"; + $output .= "<tr><td><a href=\"$item->link\">$item->title</a> · ". l($item->ftitle, "import/feed/$item->fid", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". theme("links", $links) ."</td></tr>\n"; } if ($item->description) { @@ -615,16 +615,16 @@ function import_page_bundle($bid) { } $output .= "</table>\n"; - $theme->header(); - $theme->box(t("News feeds"), import_page_info()); - $theme->box($bundle->title, $header); - $theme->box(t("Latest news"), $output); - $theme->footer(); + theme("header"); + theme("box", t("News feeds"), import_page_info()); + theme("box", $bundle->title, $header); + theme("box", t("Latest news"), $output); + theme("footer"); } function import_page_sources() { - global $theme; + $result = db_query("SELECT * FROM feed ORDER BY title"); @@ -633,12 +633,12 @@ function import_page_sources() { $output .= "<div style=\"margin-left: 20px;\">$feed->description</div><br />"; } - $output .= l("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", "import/fd", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />"; + $output .= l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", "import/fd", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />"; - $theme->header(); - $theme->box(t("News feeds"), import_page_info()); - $theme->box(t("News sources"), $output); - $theme->footer(); + theme("header"); + theme("box", t("News feeds"), import_page_info()); + theme("box", t("News sources"), $output); + theme("footer"); } function import_page_fd() { @@ -671,10 +671,10 @@ function import_page_feeds() { } function import_page_blocks($blocks) { - global $theme; - $theme->header(); - $theme->box(t("News feeds"), import_page_info()); + + theme("header"); + theme("box", t("News feeds"), import_page_info()); print "<table cellpadding=\"0\" cellspacing=\"5\" border=\"0\" width=\"100%\">\n"; print " <tr>\n"; @@ -682,7 +682,7 @@ function import_page_blocks($blocks) { $i = 1; print " <td width=\"33%\" valign=\"top\">\n"; while ($block = each($blocks)) { - $theme->box($block["value"]["subject"], $block["value"]["content"]); + theme("box", $block["value"]["subject"], $block["value"]["content"]); if ($i == ceil(count($blocks) / 3)) { break; } @@ -693,7 +693,7 @@ function import_page_blocks($blocks) { print " </tr>\n"; print "</table>\n"; - $theme->footer(); + theme("footer"); } function import_page() { |