[Feed-collector-svn] SF.net SVN: feed-collector: [121] trunk
Status: Beta
Brought to you by:
c167
From: <C1...@us...> - 2007-06-04 18:06:42
|
Revision: 121 http://feed-collector.svn.sourceforge.net/feed-collector/?rev=121&view=rev Author: C167 Date: 2007-06-04 11:04:39 -0700 (Mon, 04 Jun 2007) Log Message: ----------- some changes Modified Paths: -------------- trunk/inc/upperBar.php trunk/page_main.php trunk/styles/default/page_header.tpl trunk/styles/default/page_main.tpl Modified: trunk/inc/upperBar.php =================================================================== --- trunk/inc/upperBar.php 2007-06-04 16:08:57 UTC (rev 120) +++ trunk/inc/upperBar.php 2007-06-04 18:04:39 UTC (rev 121) @@ -7,14 +7,24 @@ * @author C167 <c1...@us...> * @package feed-collector */ -if (false === HTTP_Session :: get("logged_in", false)) { - $related_sites = sprintf(" <span>%s</span>\n" . - " <a href=\"http://validator.w3.org/check?uri=referer\" title=\"Validate XHTML\">Validate XHTML</a> |\n" . - " <a href=\"http://www.oswd.org/userinfo.phtml?user=haran\" title=\"Other designs by haran\">haran’s Designs</a> |\n" . - " <a href=\"http://validator.w3.org/check?uri=referer\" title=\"Validate\">Validate</a>\n", _("Related Sites:")); -} else { - $related_sites = sprintf(" <span>%s</span>\n" . - " <a href=\"http://www.oswd.org\" title=\"The host of this base 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:")); -} + +$smarty->assign('related_sites_str', _("Related Sites:")); +$related_sites_list = array ( + array ( + "text" => "Validate XHTML", + "title" => "Validate XHTML", + "href" => "http://validator.w3.org/check?uri=referer" + ), + array ( + "text" => "haran's Designs", + "title" => "Other designs by haran", + "href" => "http://www.oswd.org/designs/search/designer/id/3013/" + ), + array ( + "text" =>"Validate CSS", + "title" => "Validate CSS", + "href" => "http://validator.w3.org/check?uri=referer" + ) +); +$smarty->assign('related_sites_list', $related_sites_list); ?> Modified: trunk/page_main.php =================================================================== --- trunk/page_main.php 2007-06-04 16:08:57 UTC (rev 120) +++ trunk/page_main.php 2007-06-04 18:04:39 UTC (rev 121) @@ -28,7 +28,7 @@ require_once "class/User_manager.php"; $user = new User_manager($db); -/* Style-Chooser */ +/* STYLE */ require_once "inc/styles.php"; $page = "main"; @@ -37,9 +37,7 @@ require_once "./inc/language.php"; // SMARTY -define('SMARTY_DIR', '/usr/share/php/smarty/libs/'); -require_once "smarty/libs/Smarty.class.php"; -$smarty = new Smarty(); +require_once "inc/smarty.php"; // // Now we're going to replace the placeholders in the template with the important content @@ -56,24 +54,22 @@ # body // related sites require_once "./inc/upperBar.php"; -$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 </div>", _("Feed-Collector"), _("{ stay up to date with all your news feeds! }")); -$design = str_replace("<!-- midHeader title left -->", $midHeader_title_left, $design); +// midHeader title +$smarty->assign('page_title', _("Feed-Collector")); +$smarty->assign('sub_title', _("{ stay up to date with all your news feeds! }")); // midHeader title right require_once "./inc/userstatus_display.php"; -$design = str_replace("<!-- midHeader title right -->", $midHeader_title_right, $design); // navigation require_once "inc/navigation.php"; -$design = str_replace("<!-- navigation -->", $navigation, $design); # Main copy -// main -$main = sprintf(" <h1>%s</h1>\n %s", _("Welcome!"), _("<p>This is the home of Feed-Collector, an database-driven news-reader.\n It is written to automaticaly collect news from other websites \n <acronym title=\"Resource Description Framework\">RDF</acronym>-, \n <acronym title=\"Really Simple Syndication\">RSS</acronym>- and \n <acronym title=\"Atom Syndication Formats\">ATOM</acronym>-newsfeeds \n and to display them to a user. There is no need to delete \"older news\", \n so you can come here anytime and search in the database</p>\n <p>Users can register to this site. If they do so, they get a personal page \n displaying the news they are interested in. Once a user is logged in, he can \n modify his page by adding and removing news feeds. To do so, just go to the \n <a href=\"./page_select_feeds.php\">feed-overview-page</a> and select/deselect \n news feeds.</p>")); -$design = str_replace("<!-- main -->", $main, $design); +// main wordwrap 85 +$smarty->assign('greeting', _("Welcome!")); +$smarty->assign('block1', _("This is the home of Feed-Collector, an database-driven news-reader. It is written to automaticaly collect news from other websites <acronym title=\"Resource Description Framework\">RDF</acronym>-, <acronym title=\"Really Simple Syndication\">RSS</acronym>- and <acronym title=\"Atom Syndication Formats\">ATOM</acronym>-newsfeeds and to display them to a user. There is no need to delete \"older news\", so you can come here anytime and search in the database")); +$smarty->assign('block2', _("Users can register to this site. If they do so, they get a personal page displaying the news they are interested in. Once a user is logged in, he can modify his page by adding and removing news feeds. To do so, just go to the <a href=\"./page_select_feeds.php\">feed-overview-page</a> and select/deselect news feeds.")); // latest news $latestnews = & $db->query("SELECT *, MAX( published ) AS published FROM news GROUP BY published DESC LIMIT 0 , 2;"); @@ -126,8 +122,7 @@ $design = str_replace("<!-- box 4 -->", $box_4, $design); # footer -require_once "./inc/footer.php"; -$design = str_replace("<!-- footer -->", $footer, $design); -echo $design; +//echo $design; +$smarty->display("page_main.tpl"); ?> Modified: trunk/styles/default/page_header.tpl =================================================================== --- trunk/styles/default/page_header.tpl 2007-06-04 16:08:57 UTC (rev 120) +++ trunk/styles/default/page_header.tpl 2007-06-04 18:04:39 UTC (rev 121) @@ -7,17 +7,18 @@ <div id="header"> <div class="superHeader"> <span>{$related_sites_str}</span> -{foreach from=$related_sites_list key=title item=i name="related_sites"} - <a href="{$i.href|escape:"url"}" title="{$title}">{$i.text}</a> - {if $smarty.foreach.related_sites.last == 1 } - | +{foreach from=$related_sites_list item=i name="related_sites"} + {if $smarty.foreach.related_sites.last == 0 } + <a href="{$i.href|escape}" title="{$i.title}">{$i.text}</a> | + {else} + <a href="{$i.href|escape}" title="{$i.title}">{$i.text}</a> {/if} {/foreach} </div> <div class="midHeader"> - <h1 class=\"headerTitle\">{$page_title}</h1> - <div class=\"headerSubTitle\" title=\"Message'\"> + <h1 class="headerTitle">{$page_title}</h1> + <div class="headerSubTitle" title=\"Message'\"> {$sub_title} </div> @@ -30,14 +31,14 @@ <div class="subHeader"> <span class="doNotDisplay">Navigation:</span> - <a href="./page_main.php" {$hl_page_main}>{$navi_home}</a> | + <a href="./page_main.php" {$hl_main}>{$navi_home}</a> | <a href="./page_show_all_feeds.php" {$hl_show_all_feeds|default:""}>{$navi_show_all_feeds}</a> | <a href="./page_show_feed_tag.php" {$hl_show_feed_tag|default:""}>{$navi_feeds_by_tag}</a> | <a href="./page_add_new_feed.php" {$hl_add_new_feed|default:""}>{$navi_add_new_feed}</a> | <a href="./page_show_feed.php" {$hl_show_feed|default:""}>{$navi_show_feed}</a> | <a href="./page_add_tag.php?{$smarty.get.feed}" {$hl_add_tag|default:""}>{$navi_add_tag}</a> | {if false == $smarty.session.logged_in|default:"false"} - <a href="./page_login.php" {hl_$login}>{$navi_login}</a> | + <a href="./page_login.php" {$hl_login}>{$navi_login}</a> | <a href="./page_register.php" {$hl_register}>{$navi_register}</a> {else} <a href="./page_personal.php" {$hl_personal}>{$navi_personal}</a> | Modified: trunk/styles/default/page_main.tpl =================================================================== --- trunk/styles/default/page_main.tpl 2007-06-04 16:08:57 UTC (rev 120) +++ trunk/styles/default/page_main.tpl 2007-06-04 18:04:39 UTC (rev 121) @@ -1,49 +1,21 @@ - <body> - <!-- For non-visual user agents: --> - <div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">Skip to main content.</a></div> +{include file="html_header.tpl"} +{include file="page_header.tpl"} - <!-- ##### Header ##### --> - - <div id="header"> - <div class="superHeader"> - <span>{$related_sites_str}</span> -{foreach from=$related_sites_list key=title item=i name="related_sites"} - <a href="{$i.href|escape:"url"}" title="{$title}">{$i.text}</a> - {if $smarty.foreach.related_sites.last == 1 } - | - {/if} -{/foreach} - </div> - - <div class="midHeader"> - <h1 class=\"headerTitle\">{$page_title}</h1> - <div class=\"headerSubTitle\" title=\"Message'\"> - {$sub_title} - </div> - - <br class="doNotDisplay doNotPrint" /> - - <div class="headerLogin"> - <p>{$userstatus}</p> - </div> - </div> - - <div class="subHeader"> - <span class="doNotDisplay">Navigation:</span> - -<!-- navigation --> - </div> - </div> - <!-- ##### Main Copy ##### --> <div id="main-copy"> <div class="rowOfBoxes"> <div class="twoThirds noBorderOnLeft"> -<!-- main --> + <h1>{$greeting}</h1> + <p>{$block1}</p> + <p>{$block2}</p> </div> <div class="oneThird"> +{foreach from=$related_sites_list item=i name="related_sites"} + +{/foreach} + <!-- latest news --> </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |