[Feed-collector-svn] SF.net SVN: feed-collector: [79] trunk
Status: Beta
Brought to you by:
c167
From: <c1...@us...> - 2006-12-27 10:56:37
|
Revision: 79 http://feed-collector.svn.sourceforge.net/feed-collector/?rev=79&view=rev Author: c167 Date: 2006-12-27 02:56:35 -0800 (Wed, 27 Dec 2006) Log Message: ----------- some changes Modified Paths: -------------- trunk/class/Feed_manager.php trunk/class/Tag_manager.php trunk/page_add_tag.php trunk/page_show_all_feeds.php trunk/page_show_feed.php Added Paths: ----------- trunk/page_show_feed_tag.php trunk/styles/default/page_show_feed_tag-screen.css trunk/styles/default/page_show_feed_tag.tpl Modified: trunk/class/Feed_manager.php =================================================================== --- trunk/class/Feed_manager.php 2006-12-20 21:46:24 UTC (rev 78) +++ trunk/class/Feed_manager.php 2006-12-27 10:56:35 UTC (rev 79) @@ -187,6 +187,50 @@ } /** + * Get all the feeds + * @return mixed + * @access public + */ + public function getFeeds() { + $query = $this->mdb->query("SELECT site_name, site_url, site_lang, feed_name, feed_db_name FROM feeds GROUP BY feed_name ASC;"); + if (PEAR :: isError($query)) { + return false; + } + $i = 0; + while ($row = $query->fetchRow()) { + $return[$i]['site_name'] = $row['site_name']; + $return[$i]['site_url'] = $row['site_url']; + $return[$i]['site_lang'] = $row['site_lang']; + $return[$i]['feed_name'] = $row['feed_name']; + $return[$i]['feed_url'] = $row['feed_db_name']; + $i++; + } + return $return; + } + + /** + * Get one specific feed + * @param String $feed The feeds name + * @return Mixed + * @access public + */ + public function getSpecFeed($feed) { + $query = $this->mdb->query("SELECT id, site_name, site_url, site_lang, feed_name, feed_db_name FROM feeds GROUP BY feed_name ASC;"); + if (PEAR :: isError($query)) { + return false; + } + + $row = $query->fetchRow(); + $return['id'] = $row['id']; + $return['site_name'] = $row['site_name']; + $return['site_url'] = $row['site_url']; + $return['site_lang'] = $row['site_lang']; + $return['feed_name'] = $row['feed_name']; + $return['feed_url'] = $row['feed_db_name']; + return $return; + } + + /** * Return the number of pages * @param int $count Feeds per Page * @return int @@ -300,11 +344,11 @@ else return $query; } - + ############# # STATISTIC # ############# - + /** * STATISTIC * Return the Number of feeds we have in our database Modified: trunk/class/Tag_manager.php =================================================================== --- trunk/class/Tag_manager.php 2006-12-20 21:46:24 UTC (rev 78) +++ trunk/class/Tag_manager.php 2006-12-27 10:56:35 UTC (rev 79) @@ -43,16 +43,16 @@ */ public function addTag($tag, $by, $feed) { $select = $this->db->queryOne("SELECT `tag` FROM `tags` WHERE tag = '$tag' AND feed = '$feed';"); - if($select == $tag) { + if ($select == $tag) { return false; } $insert = $this->db->query("INSERT INTO `tags` ( `id` , `setBy` , `tag` , `feed` ) VALUES ( NULL , '$by', '$tag', '$feed');"); - if(PEAR :: isError($insert)) { + if (PEAR :: isError($insert)) { return false; } return true; } - + /** * Remove a tag from a feed * @param String $tag The tag itself @@ -61,9 +61,9 @@ * @access public */ public function removeTag($tag, $feed) { - + } - + /** * Get the tags from a feed * @param String $feed The feed name @@ -71,19 +71,22 @@ * @access public */ public function getTags($feed) { + //if(substr($feed, 0, 2) == "f_!") { + // $feed = "f_".$feed; + //} $query = $this->db->query("SELECT tag FROM tags WHERE feed = '$feed';"); - if(PEAR :: isError($query)) { + if (PEAR :: isError($query)) { return false; } - while($row = $query->fetchRow()) { - if(!isset($row['tag'])) { + while ($row = $query->fetchRow()) { + if (!isset ($row['tag'])) { return false; } $return[] = $row['tag']; } return $return; } - + /** * Return all feeds that have a given tag * @param String $tag The tag to search for @@ -92,15 +95,34 @@ */ public function getFeedsByTag($tag) { $query = $this->db->query("SELECT feed FROM tags WHERE tag = '$tag';"); - if(PEAR :: isError($query)) { + if (PEAR :: isError($query)) { return false; } - while($row = $query->fetchRow()) { - + while ($row = $query->fetchRow()) { + $return[] = $row['feed']; } + return $return; } /** + * Checks if a feed has tags + * @param String $feed The name of the feed + * @return boolean + * @access public + */ + public function hasTags($feed) { + $query = $this->db->queryOne("SELECT tag FROM tags WHERE feed='$feed';"); + if (PEAR :: isError($query)) { + return false; + } + if (empty ($query)) { + return false; + } + return true; + + } + + /** * Random number generator * @param Int $max upper end * @param Int $min lower end, default 0 Modified: trunk/page_add_tag.php =================================================================== --- trunk/page_add_tag.php 2006-12-20 21:46:24 UTC (rev 78) +++ trunk/page_add_tag.php 2006-12-27 10:56:35 UTC (rev 79) @@ -34,7 +34,7 @@ ); $db = & MDB2 :: factory($dsn, $options); if (PEAR :: isError($db)) { - + } $db->setFetchMode(MDB2_FETCHMODE_ASSOC); @@ -64,18 +64,49 @@ ############## require_once "HTTP.php"; +############### +# Tag-Manager # +############### +require_once "class/Tag_manager.php"; +$tag_manager = new Tag_Manager($db); + ################ # User-Manager # ################ require_once "class/User_manager.php"; $user = new User_manager($db); -/* + if(false === HTTP_Session :: get("logged_in", false)) { HTTP :: redirect("./page_login.php"); } -*/ +$main = ""; + if (!$tag_manager->hasTags($_GET['feed'])) { + $main .= sprintf("hi"); + // there are no tags yet, please add one... + } else { + $main .= sprintf(" <div id=\"tags\">\n" . + " <div id=\"tags_title\">%s</div>\n", _("Tags")); + $tags = $tag_manager->getTags($_GET['feed']); + if (count($tags) == 1) { + $main .= sprintf(" <a href=\"./page_show_feed_tag.php?tag=%s\">%s</a>", $tags[0], $tags[0]); + } else { + foreach ($tags as $id => $tag) { + $main .= " <a href=\"./page_show_feed_tag.php?tag=$tag\">$tag</a>"; + if ($id !== (count($tags) - 1)) { + $main .= ", "; + } + $main .= "\n"; + } + } + $main .= " </div>\n"; + } +if (isset ($_POST['tag'])) { + $tag_manager->addTag($_POST['tag'], HTTP_Session :: get("username"), $_GET['feed']); +} +$main .= displayAddForm(); + ##################### # BUILD THE CONTENT # ##################### @@ -114,6 +145,24 @@ echo $design; +function displayAddForm() { + $form = sprintf(" <div id=\"addTags_form\">\n" . + " <form action=\"%s\" method=\"post\" accept-charset=\"UTF-8\">\n" . + " <div id=\"formtitle\">%s</div>\n" . + " <div class=\"left\">\n" . + " <div class=\"formElem\">%s</div>\n" . + " </div>\n" . + " <div class=\"right\">\n" . + " <div class=\"formField\" ><input type=\"text\" name=\"tag\" size=\"30\" maxlength=\"30\" /></div>\n" . + " </div>\n" . + " <div id=\"formButtons\">\n" . + " <input type=\"submit\" value=\"%s\" name=\"submit\" />\n" . + " </div>\n" . + " </form>\n" . + " </div>\n", $_SERVER['PHP_SELF']."?feed=".$_GET['feed'], _("Add Tag"), _("tag name"), _("Submit!")); + return $form; +} + function filterInput($input, $type) { $inhalt = trim($inhalt); $inhalt = htmlspecialchars($inhalt); Modified: trunk/page_show_all_feeds.php =================================================================== --- trunk/page_show_all_feeds.php 2006-12-20 21:46:24 UTC (rev 78) +++ trunk/page_show_all_feeds.php 2006-12-27 10:56:35 UTC (rev 79) @@ -65,7 +65,7 @@ # LANGUAGE # ############ require_once "HTTP.php"; -$language = HTTP::negotiateLanguage($langs, "en_EN"); +$language = HTTP :: negotiateLanguage($langs, "en_EN"); ################ # User-Manager # @@ -73,8 +73,14 @@ require_once "class/User_manager.php"; $user = new User_manager($db); -$maxpages = $feed->getFeedsMaxPages(10); +############### +# Tag-Manager # +############### +require_once "class/Tag_manager.php"; +$tag_manager = new Tag_Manager($db); +//$maxpages = $feed->getFeedsMaxPages(10); + $page = "main"; // // Now we're going to replace the placeholders in the template with the important content @@ -102,7 +108,7 @@ $midHeader_title_right = sprintf(" <form action=\"./page_login.php\" method=\"post\"><span>%s</span> <input type=\"submit\" name=\"submit\" value=\"%s\" /><br />\n" . " <input type=\"text\" name=\"username\" value=\"%s\" size=\"20\" /><br />\n" . " <input type=\"password\" name=\"password\" value=\"%s\" /><br />\n" . - " <input type=\"hidden\" name=\"cameFrom\" value=\"%s\" />" . + " <input type=\"hidden\" name=\"cameFrom\" value=\"%s\" />\n" . " </form>\n" . " </div>", _("Login:"), _("Submit!"), _("Username"), _("Password"), basename($_SERVER['PHP_SELF'])); } else { @@ -122,16 +128,17 @@ # Main copy // main -if(true === HTTP_Session :: get("logged_in")) { +if (true === HTTP_Session :: get("logged_in")) { $main = createSelectionForm(); } else { - $main = createSelectionTable($feed, 30, detectActualPage($maxpages)); + $main = createSelectionTable($feed, /*30, detectActualPage($maxpages),*/ + $tag_manager); } $design = str_replace("<!-- main -->", $main, $design); // page-navigation -$page_navigation = displayPageNavi($maxpages, detectActualPage($maxpages)); -$design = str_replace("<!-- page-navigation -->", $page_navigation, $design); +//$page_navigation = displayPageNavi($maxpages, detectActualPage($maxpages)); +//$design = str_replace("<!-- page-navigation -->", $page_navigation, $design); # footer // footer @@ -140,61 +147,117 @@ echo $design; -function createSelectionForm($feed) { - +function createSelectionForm($feed, $tag_manager) { + $items = $feed->getFeeds(); + if (false === $items) { + return "error!!!"; + } + $return = sprintf(" <form action=\"$PHP_SELF\" method=\"post\">"); + $return .= sprintf(" <table summary=\"\">\n" . + " <tr>\n" . + " <th>%s</th>\n" . + " <th>%s</th>\n" . + " <th>%s</th>\n" . + " <th class=\"language_flag\"><img src=\"pic/lang/International.gif\" alt=\"%s\" /></th>\n" . + " </tr>\n", _("Feed List"), _("Site"), _("Feed"), _("Tags"), _("Languages")); + foreach ($items as $list) { + $return .= sprintf(" <tr>\n" . + " <td><a href=\"./page_show_feed?feed=%s\">%s</a></td>\n" . + " <td><a href=\"%s\">%s</a></td>\n", $list['feed_url'], $list['feed_name'], $list['site_url'], $list['site_name']); + if (false === $tag_manager->hasTags($list['feed_url'])) { + $return .= " <td> </td>\n"; + } else { + $tags = $tag_manager->getTags($list['feed_url']); + if (count($tags) == 1) { + $return .= sprintf(" <td><a href=\"./page_show_feed_tag.php?tag=%s\">%s</a></td>\n", $tags[0], $tags[0]); + } else { + $return .= " <td>\n"; + foreach ($tags as $id => $tag) { + $return .= " <a href=\"./page_show_feed_tag.php?tag=$tag\">$tag</a>"; + if ($id !== (count($tags) - 1)) { + $return .= ", "; + } + //$main .= "\n"; + } + $return .= " </td>\n"; + } + } + $return .= sprintf(" <td><img src=\"pic/lang/%s.gif\" alt=\"%s\" /></td>\n" . + " </tr>\n", $list['site_lang'], $list['site_lang']); + } + + $return .= " </table>"; + return $return; } -function createSelectionTable($feed, $count, $page) { -$items = $feed->getFeedsPerPage($count, $page); -if(false === $items) { - return "error!!!"; -} - $return = sprintf( -" <table summary=\"\">\n" . -" <tr>\n" . -" <th>%s</th>\n" . -" <th>%s</th>\n" . -" <th class=\"language_flag\"><img src=\"pic/lang/International.gif\" alt=\"%s\" /></th>\n" . -" </tr>\n", _("Feed List"), _("Site"), _("Feed"), _("Languages")); -foreach($items as $list) { - $return .= sprintf( +function createSelectionTable($feed, $tag_manager) { + $items = $feed->getFeeds(); + if (false === $items) { + return "error!!!"; + } + $return = sprintf(" <table summary=\"\">\n" . " <tr>\n" . - " <td><a href=\"%s\">%s</a></td>\n" . - " <td><a href=\"./page_show_feeds?feed=%s\">%s</a></td>\n" . - " <td><img src=\"pic/lang/%s.gif\" alt=\"%s\" /></td>\n" . - " </tr>\n", $list['site_url'], $list['site_name'], $list['feed_url'], $list['feed_name'], $list['site_lang'], $list['site_lang']); -} + " <th>%s</th>\n" . + " <th>%s</th>\n" . + " <th>%s</th>\n" . + " <th class=\"language_flag\"><img src=\"pic/lang/International.gif\" alt=\"%s\" /></th>\n" . + " </tr>\n", _("Feed List"), _("Site"), _("Feed"), _("Tags"), _("Languages")); + foreach ($items as $list) { + $return .= sprintf(" <tr>\n" . + " <td><a href=\"./page_show_feed?feed=%s\">%s</a></td>\n" . + " <td><a href=\"%s\">%s</a></td>\n", $list['feed_url'], $list['feed_name'], $list['site_url'], $list['site_name']); + if (false === $tag_manager->hasTags($list['feed_url'])) { + $return .= " <td> </td>\n"; + } else { + $tags = $tag_manager->getTags($list['feed_url']); + if (count($tags) == 1) { + $return .= sprintf(" <td><a href=\"./page_show_feed_tag.php?tag=%s\">%s</a></td>\n", $tags[0], $tags[0]); + } else { + $return .= " <td>\n"; + foreach ($tags as $id => $tag) { + $return .= " <a href=\"./page_show_feed_tag.php?tag=$tag\">$tag</a>"; + if ($id !== (count($tags) - 1)) { + $return .= ", "; + } + //$main .= "\n"; + } + $return .= " </td>\n"; + } + } + $return .= sprintf(" <td><img src=\"pic/lang/%s.gif\" alt=\"%s\" /></td>\n" . + " </tr>\n", $list['site_lang'], $list['site_lang']); + } -$return .= " </table>"; -return $return; + $return .= " </table>"; + return $return; } function displayPageNavi($maxpages, $page) { echo 1; $return = _("Page: "); - for($i = 1; $i <= $maxpages; $i++) { + for ($i = 1; $i <= $maxpages; $i++) { echo 2; - if($i !== 1) { + if ($i !== 1) { echo 3; $return .= " | "; } - if($i !== $page) { + if ($i !== $page) { echo 4; - $return .= sprintf(" [<a href=\"./page_show_all_feeds.php?page=%d\">%d</a>]", $i,$i); + $return .= sprintf(" [<a href=\"./page_show_all_feeds.php?page=%d\">%d</a>]", $i, $i); } else { echo 5; $return .= sprintf(" [%d]", $i); } } - + return $return; } function detectActualPage($maxpages) { - if(!isset($_GET['page'])) { + if (!isset ($_GET['page'])) { return 1; } - if($maxpages < $_GET['page']) { + if ($maxpages < $_GET['page']) { return 1; } $page = $_GET['page']; Modified: trunk/page_show_feed.php =================================================================== --- trunk/page_show_feed.php 2006-12-20 21:46:24 UTC (rev 78) +++ trunk/page_show_feed.php 2006-12-27 10:56:35 UTC (rev 79) @@ -191,7 +191,7 @@ $return .= " | "; } if ($i !== $page) { - $return .= sprintf(" [<a href=\"./page_show_feed.php?feed=%s&page=%d\">%d</a>]", $feedname, $i, $i); + $return .= sprintf(" [<a href=\"./page_show_feed.php?feed=%s&page=%d\">%d</a>]", $feedname, $i, $i); } else { $return .= sprintf(" [%d]", $i); } Added: trunk/page_show_feed_tag.php =================================================================== --- trunk/page_show_feed_tag.php (rev 0) +++ trunk/page_show_feed_tag.php 2006-12-27 10:56:35 UTC (rev 79) @@ -0,0 +1,205 @@ +<?php + + +/** + * Created on 30.08.2006 + * This file is called if someone wants the main page or doesn't select any page + * @version 1 + * @since 46 - 19.10.2006 + * @author c167 <c1...@us...> + * @package feed-collector + */ + +require_once "inc/functions.php"; + +require_once "inc/config.php"; +require_once "inc/definitions.php"; +error_reporting(E_ALL); +############ +# DATABASE # +############ +require_once "MDB2.php"; +$dsn = array ( + 'phptype' => DB_TYPE, + 'username' => DB_LOGIN, + 'password' => DB_PASSWD, + 'hostspec' => DB_HOST, + 'database' => DB_DATABASE +); +$options = array ( + 'debug' => 2, + 'result_buffering' => true, + 'portability' => MDB2_PORTABILITY_ALL +); +$db = & MDB2 :: factory($dsn, $options); +if (PEAR :: isError($db)) { + echo $db->getMessage(); + echo "<br />"; + echo $db->getDebugInfo(); +} +$db->setFetchMode(MDB2_FETCHMODE_ASSOC); + +########### +# SESSION # +########### +require_once "HTTP/Session.php"; +$options = array ( + 'dsn' => & $db, + 'table' => $session['container']['tablename'], + 'autooptimize' => $session['container']['autooptimize'] +); +HTTP_Session :: setContainer('MDB2', $options); +HTTP_Session :: start(); +HTTP_Session :: setExpire($session['time']['expire']); +HTTP_Session :: setIdle($session['time']['idle']); + +################ +# Feed-Manager # +################ +require_once "class/Feed_manager.php"; +$feed = new Feed_manager($db); + +################ +# User-Manager # +################ +require_once "class/User_manager.php"; +$user = new User_manager($db); + +############### +# Tag-Manager # +############### +require_once "class/Tag_manager.php"; +$tag_manager = new Tag_Manager($db); + +require_once "HTTP.php"; +// +// Now we're going to replace the placeholders in the template with the important content +// +$_GET['tag'] = "heise"; +if (!isset ($_GET['tag'])) { + //HTTP :: redirect("./page_show_all_feeds.php"); +} else { + $main = createFeedsTable($_GET['tag'], $tag_manager, $feed); +} + +$design = file_get_contents("styles/default/page_show_feed_tag.tpl", "r"); + +# Header +// title +$title = "Feed-Collector"; +$design = str_replace("<!-- title -->", $title, $design); + +// related sites +$related_sites = sprintf(" <span>%s</span>\n <a href=\"http://www.oswd.org\" title=\"The host of this design\">OSWD</a> |\n <a href=\"http://www.oswd.org/userinfo.phtml?user=haran\" title=\"Other designs by haran\">haran’s Designs</a>", _("Related Sites:")); +$design = str_replace("<!-- related sites -->", $related_sites, $design); + +// midHeader title left +$midHeader_title_left = sprintf(" <h1 class=\"headerTitle\">%s</h1>\n <div class=\"headerSubTitle\" title=\"Message'\">\n %s\n", _("Feed-Collector"), _("{ stay up to date with all your news feeds! }")); +$design = str_replace("<!-- midHeader title left -->", $midHeader_title_left, $design); + +// midHeader title right +if (false === HTTP_Session :: get("logged_in", false)) { + $midHeader_title_right = sprintf(" <form action=\"./page_login.php\" method=\"post\"><span>%s</span> <input type=\"submit\" name=\"submit\" value=\"%s\" /><br />\n" . + " <input type=\"text\" name=\"username\" value=\"%s\" size=\"20\" /><br />\n" . + " <input type=\"text\" name=\"password\" value=\"%s\" /><br />\n" . + " <input type=\"hidden\" name=\"cameFrom\" value=\"%s\" />" . + " </form>\n" . + " </div>", _("Login:"), _("Submit!"), _("Username"), _("Password"), basename($_SERVER['PHP_SELF'])); +} else { + $midHeader_title_right = sprintf(" <span>%s %s</span><br />\n" . + " <p id=\"userinfo\">%s %s</p>", _("Hello"), HTTP_Session :: get("username"), _("Your last login was at"), date("H:m:i", HTTP_Session :: get("lastLogin"))); +} +$design = str_replace("<!-- midHeader title right -->", $midHeader_title_right, $design); + +// navigation +$navigation = sprintf(" <span class=\"doNotDisplay\">Navigation:</span>\n <a href=\"./page_main.php\">%s</a> |\n <a href=\"./page_show_feeds.php\" class=\"highlight\">%s</a> |\n <a href=\"./page_search.php\">%s</a> |\n <a href=\"./index.html\">%s</a> |\n <a href=\"./index.html\">%s</a> |\n", _("Home"), _("Show Feeds"), _("Search"), _("Show TAGs"), _("About")); +if (false === HTTP_Session :: get("logged_in", false)) { + $navigation .= sprintf(" <a href=\"./page_login.php\">%s</a> |\n <a href=\"./page_register.php\">%s</a>", _("Login"), _("Register")); +} else { + $navigation .= sprintf(" <a href=\"./page_profile.php\">%s</a>", _("Profile")); +} +$design = str_replace("<!-- navigation -->", $navigation, $design); + +/* + * At this point we have to decide wether we display only one Feed or some more, perhaps loaded and movable by AJAX... + */ +# Main copy +// main +$design = str_replace("<!-- main -->", $main, $design); + +// page-navigation +//$page_navigation = displayPageNavi($maxpages, detectActualPage($maxpages), $_GET['feed']); +//$design = str_replace("<!-- page-navigation -->", $page_navigation, $design); + +# footer +// footer +$footer = sprintf(" <span class=\"doNotPrint\">\n %s\n <a href=\"mailto:c1...@us...\" title=\"the developsers email adress\">email the Webmaster</a><br />\n </span>\n\n <!-- <strong>URI »</strong> http://domain.is.invalid/prosimii/index.html -->\n • <strong>Updated »</strong> 2006-Oct-25 18:42 +1000 •", _("For comments or questions about this website, please")); +$design = str_replace("<!-- footer -->", $footer, $design); + +echo $design; + +function createFeedsTable($tag, $tag_manager, $feed_manager) { + $feeds = $tag_manager->getFeedsByTag($tag); + if (false === $feeds) { + return "error!!!"; + } + $return = sprintf(" <table summary=\"%s\">\n", $tag); + foreach($feeds as $feed) { + $return .= sprintf(" <tr>\n" . + " <td><a id=\"n%d\" href=\"%s\">%s</a></td>\n" . + " </tr>\n", $feed['id'], $feed['feed_url'], $feeds['feed_name']); + + } + /* + for ($i = count($feeds) - 1; $i >= 0; $i--) { + //foreach ($items as $list) { + $return .= sprintf(" <tr>\n" . + " <td><a id=\"n%d\" href=\"%s\">%s</a></td>\n" . + " </tr>\n", $feeds[$i]['id'], $feeds[$i]['url'], $feeds[$i]['title'], $feeds[$i]['summary']); + } +*/ + $return .= " </table>"; + return $return; +} + +function findBiggestArray($a1, $a2, $a3) { + $a1 = count($a1); + $a2 = count($a2); + $a3 = count($a3); + $number = 0; + if ($a1 > $number) + $number = $a1; + if ($a2 > $number) + $number = $a2; + if ($a3 > $number) + $number = $a3; + return $number; +} + +function displayPageNavi($maxpages, $page, $feedname) { + $return = _("Page: "); + for ($i = 1; $i <= $maxpages; $i++) { + if ($i !== 1) { + $return .= " | "; + } + if ($i !== $page) { + $return .= sprintf(" [<a href=\"./page_show_feed.php?feed=%s&page=%d\">%d</a>]", $feedname, $i, $i); + } else { + $return .= sprintf(" [%d]", $i); + } + } + return $return; +} + +function detectActualPage($maxpages) { + if (!isset ($_GET['page'])) { + return 1; + } + if ($maxpages < $_GET['page']) { + return $maxpages; + } + $page = $_GET['page']; + settype($page, 'int'); + return $page; +} +?> \ No newline at end of file Added: trunk/styles/default/page_show_feed_tag-screen.css =================================================================== --- trunk/styles/default/page_show_feed_tag-screen.css (rev 0) +++ trunk/styles/default/page_show_feed_tag-screen.css 2006-12-27 10:56:35 UTC (rev 79) @@ -0,0 +1,371 @@ +/***************************************************** + * TITLE: Show Feeds Screen Stylesheet * + * URI: styles/default/page_show_feed_tag-screen.css * + * MODIF: 2006-Nov-16 18:06 +0100 * + *****************************************************/ + + +/* ##### Common Styles ##### */ + +body { + font-family: verdana, helvetica, arial, sans-serif; + font-size: 73%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + +html > body { + font-size: 9pt; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(61,92,122); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +a { + color: rgb(61,92,122); + background-color: transparent; + text-decoration: underline; + margin: 0; + padding: 0 1px 2px 1px; +} + +a:hover { + color: rgb(117,144,174); + text-decoration: none; +} + +ol { + margin: 1em 0 1.5em 0; + padding: 0; +} + +ul { + list-style-type: square; + margin: 1em 0 1.5em 0; + padding: 0; +} + +dl { + margin: 1em 0 0.5em 0; + padding: 0; +} + +ul li { + line-height: 1.5em; + margin: 1.25ex 0 0 1.5em; + padding: 0; +} + +ol li { + line-height: 1.5em; + margin: 1.25ex 0 0 2em; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0; + padding: 0 0 1ex 0; +} + +dd { + line-height: 1.75em; + margin: 0 0 1.5em 1.5em; + padding: 0; +} + +.doNotDisplay { + display: none !important; +} + + +.smallCaps { + font-size: 117%; + font-variant: small-caps; +} + + +/* ##### Header ##### */ + +.superHeader { + color: rgb(130,128,154); + background-color: rgb(33,50,66); + text-align: right; + margin: 0; + padding: 0.5ex 10px; +} + +.superHeader span { + color: rgb(195,196,210); + background-color: transparent; + font-weight: bold; + text-transform: uppercase; +} + +.superHeader a { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.superHeader a:hover { + color: rgb(193,102,90); + background-color: transparent; + text-decoration: none; +} + +.midHeader { + color: white; + background-color: rgb(61,92,122); + margin: 0; + padding: 0.26ex 10px; +} + +.headerTitle { + font-size: 300%; + margin: 0; + padding: 0; +} + +.headerSubTitle { + font-size: 151%; + font-weight: normal; + font-style: italic; + margin: 0 0 1ex 0; + padding: 0; +} + +.headerLinks { + text-align: right; + margin: 0; + padding: 0 0 2ex 0; + position: absolute; + right: 1.5em; + top: 3.5em; +} + +.headerLinks a { + color: white; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0 0.5ex 0; + display: block; +} + +.headerLinks a:hover { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: underline; +} + +.subHeader { + color: white; + background-color: rgb(117,144,174); + margin: 0; + padding: 0.5ex 10px; +} + +.subHeader a, .subHeader .highlight { + color: white; + background-color: transparent; + font-size: 110%; + font-weight: bold; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.subHeader a:hover, .subHeader .highlight { + color: rgb(255,204,0); + background-color: transparent; + text-decoration: none; +} + +/* ##### Main Copy ##### */ + +#main-copy { + margin: 0; + padding: 0.5em 10px; + clear: left; +} + +#main-copy h1 { + color: rgb(117,144,174); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 200%; + margin: 0; + padding: 0; +} + +#main-copy h2 { + color: rgb(61,92,122); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-weight: normal; + font-size: 151%; + margin: 0; + padding: 1ex 0 0 0; +} + +#main-copy p { + line-height: 1.75em; + margin: 1em 0 1.5em 0; + padding: 0; +} + +.newsHeading { + color: rgb(61,92,122); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 145%; + text-decoration: none; + margin: 0; + padding: 1ex 0 0 0; + display: block; +} + +.column1, .column2, .column3 { + margin: 1em 0; + padding: 0 2.5%; + float: left; + width: 28%; +} + +.column2 { /* Renders the column dividers */ + border-left: 1px solid rgb(204,204,204); + border-right: 1px solid rgb(204,204,204); +} + +.column1 .feed_headline { + border-left: 1px solid yellow; + border-right: 1px solid yellow; + border-top: 1px solid yellow; + padding-bottom: 1em; +} + +.column1 ul { + margin-top: 0em; + border: 1px solid yellow; + +} + +.column2 .feed_headline { + border-left: 1px solid red; + border-right: 1px solid red; + border-top: 1px solid red; + padding-bottom: 1em; +} + +.column2 ul { + border: 1px solid red; + margin-top: 0; + +} + +.column3 .feed_headline { + border-left: 1px solid green; + border-right: 1px solid green; + border-top: 1px solid green; + padding-bottom: 1em; +} + +.column3 ul { + border: 1px solid green; + margin-top: 0; +} + +.rowOfBoxes { + clear: both; +} + +.quarter, .oneThird, .half, .twoThirds, .fullWidth { + margin: 1em 0; + float: left; + border-left: 1px solid rgb(204,204,204); +} + +.quarter { + width: 21%; + padding: 0 1.9%; +} + +.oneThird { + width: 28%; + padding: 0 1.9%; +} + +.half { + text-align: justify; + width: 46%; + padding: 0 1.9%; +} + +.twoThirds { + text-align: justify; + width: 63%; + padding: 0 1.9%; +} + +.fullWidth { + text-align: justify; + width: 96%; + padding: 0 1.2em; + border-left: none; +} + +.filler { /* use with an empty <p> element to add padding to the end of a text box */ + border: 1px solid white; +} + +.noBorderOnLeft { + border-left: none; +} + +.dividingBorderAbove { + border-top: 1px solid rgb(204,204,204); +} + +/* More elegant alternatives to .noBorderOnLeft & .dividingBorderAbove + * that don't require the creation of new classes - but which are not + * supported by MSIE - are the following: + * + * .rowOfBoxes > div:first-child { + * border-left: none; + * } + * + * .rowOfBoxes + .rowOfBoxes { + * border-top: 1px solid rgb(204,204,204); + * } + */ + + +/* ##### Footer ##### */ + +#footer { + color: rgb(51,51,102); + background-color: rgb(239,239,239); + font-size: 87%; + text-align: center; + line-height: 1.25em; + margin: 2em 0 0 0; + padding: 1ex 10px; + clear: left; +} + +#footer a { + color: rgb(0,68,204); + background-color: transparent; + text-decoration: underline; +} + +#footer a:hover { + text-decoration: none; +} \ No newline at end of file Added: trunk/styles/default/page_show_feed_tag.tpl =================================================================== --- trunk/styles/default/page_show_feed_tag.tpl (rev 0) +++ trunk/styles/default/page_show_feed_tag.tpl 2006-12-27 10:56:35 UTC (rev 79) @@ -0,0 +1,62 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU"> + <head> + <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" /> + <meta name="author" content="haran" /> + <meta name="generator" content="haran" /> + + <link rel="stylesheet" type="text/css" href="./styles/default/page_show_feed_tag-screen.css" media="screen, tv, projection" title="Default" /> + <link rel="stylesheet alternative" type="text/css" href="./styles/default/page_show_feed_tag-print.css" media="screen" title="Print Preview" /> + <link rel="stylesheet" type="text/css" href="./styles/default/page_show_feed_tag-print.css" media="print" /> + + <script type="text/javascript" src="js.js" /> + <title><!-- title --></title> + </head> + + <body> + <!-- For non-visual user agents: --> + <div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">Skip to main content.</a></div> + + <!-- ##### Header ##### --> + + <div id="header"> + <div class="superHeader"> +<!-- related sites --> + </div> + + <div class="midHeader"> +<!-- midHeader title left --> + </div> + + <br class="doNotDisplay doNotPrint" /> + + <div class="headerLinks"> +<!-- midHeader title right --> + </div> + </div> + + <div class="subHeader"> +<!-- navigation --> + </div> + + <!-- ##### Main Copy ##### --> + + <div id="main-copy"> +<!-- main --> + + <div id="page-navigation"> +<!-- page-navigation --> + </div> + </div> + + + + <!-- ##### Footer ##### --> + + <div id="footer"> +<!-- footer --> + </div> + </body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |