[Feed-collector-svn] SF.net SVN: feed-collector: [120] trunk/inc
Status: Beta
Brought to you by:
c167
|
From: <C1...@us...> - 2007-06-04 16:09:23
|
Revision: 120
http://feed-collector.svn.sourceforge.net/feed-collector/?rev=120&view=rev
Author: C167
Date: 2007-06-04 09:08:57 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
big changes, page_main.php working partially
Modified Paths:
--------------
trunk/inc/config.php
trunk/inc/navigation.php
trunk/inc/smarty.php
trunk/inc/userstatus_display.php
Modified: trunk/inc/config.php
===================================================================
--- trunk/inc/config.php 2007-06-04 14:43:21 UTC (rev 119)
+++ trunk/inc/config.php 2007-06-04 16:08:57 UTC (rev 120)
@@ -34,8 +34,8 @@
// Smarty settings
define('SMARTY_DIR', '/usr/share/php/smarty/libs/');
// these folders should be outside the document root
-$sm['template_dir'] = "./styles/$style/";
-$sm['compile_dir'] = "./smarty/emplates_c/";
+$sm['template_dir'] = "./styles/";
+$sm['compile_dir'] = "./smarty/templates_c/";
$sm['config_dir'] = "./inc/";
$sm['cache_dir'] = "./smarty/cache/";
Modified: trunk/inc/navigation.php
===================================================================
--- trunk/inc/navigation.php 2007-06-04 14:43:21 UTC (rev 119)
+++ trunk/inc/navigation.php 2007-06-04 16:08:57 UTC (rev 120)
@@ -14,62 +14,43 @@
}
switch ($page) {
case "main" :
- $page_main = $hl;
- $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $login = $register = $personal = "";
+ $smarty->assign('hl_main', $hl);
break;
case "show_all_feeds" :
- $show_all_feeds = $hl;
- $page_main = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $login = $register = $personal = "";
+ $smarty->assign('hl_show_all_feeds', $hl);
break;
case "show_feed_tag" :
- $show_feed_tag = $hl;
- $page_main = $show_all_feeds = $add_new_feed = $show_feed = $add_tag = $login = $register = $personal = "";
+ $smarty->assign('hl_show_feed_tag', $hl);
break;
case "add_new_feed" :
- $add_new_feed = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $show_feed = $add_tag = $login = $register = $personal = "";
+ $smarty->assign('hl_add_new_feed', $hl);
break;
case "show_feed" :
- $show_feed = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $add_tag = $login = $register = $personal = "";
+ $smarty->assign('hl_show_feed', $hl);
break;
case "add_tag" :
- $add_tag = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $register = $personal = "";
+ $smarty->assign('hl_add_tag', $hl);
break;
case "login" :
- $login = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $register = $personal = "";
+ $smarty->assign('hl_login', $hl);
break;
case "register" :
- $register = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $login = $personal = "";
+ $smarty->assign('hl_register', $hl);
break;
case "personal" :
- $personal = $hl;
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $login = $register = "";
+ $smarty->assign('hl_personal', $hl);
break;
default :
- $page_main = $show_all_feeds = $show_feed_tag = $add_new_feed = $show_feed = $add_tag = $login = $register = $personal = "";
+ break;
}
-$navigation = sprintf(" <a href=\"./page_main.php\"$page_main>%s</a> |\n" .
-" <a href=\"./page_show_all_feeds.php\"$show_all_feeds>%s</a> |\n" .
-" <a href=\"./page_show_feed_tag.php\"$show_feed_tag>%s</a> |\n" .
-" <a href=\"./page_add_new_feed.php\"$add_new_feed>%s</a> |\n" .
-" <a href=\"./page_show_feed.php\"$show_feed>%s</a> |\n" .
-" <a href=\"./page_add_tag.php?%s\"$add_tag>%s</a> |\n",
- dgettext("navigation", "Home"),
- dgettext("navigation", "Show all Feeds"),
- dgettext("navigation", "Feeds by TAG"),
- dgettext("navigation", "Add a Feed"),
- dgettext("navigation", "Display a Feed"),
- !empty ($_GET['feed']) ? "feed=" . $_GET['feed'] : "",
- dgettext("navigation", "Add a Tag"));
-if (false === HTTP_Session :: get("logged_in", false)) {
- $navigation .= sprintf(" <a href=\"./page_login.php\"$login>%s</a> |\n" .
- " <a href=\"./page_register.php\"$register>%s</a>", dgettext("navigation", "Login"), dgettext("navigation", "Register"));
-} else {
- $navigation .= sprintf(" <a href=\"./page_personal.php\"$personal>%s</a> |\n" .
- " <a href=\"./page_logout.php?returnto=page_main.php\">%s</a>", dgettext("navigation", "Personal Page"), dgettext("navigation", "LogOut"));
-}
+$smarty->assign('navi_home', dgettext("navigation", "Home"));
+$smarty->assign('navi_show_all_feeds', dgettext("navigation", "Show all Feeds"));
+$smarty->assign('navi_feeds_by_tag', dgettext("navigation", "Feeds by TAG"));
+$smarty->assign('navi_add_new_feed', dgettext("navigation", "Add a Feed"));
+$smarty->assign('navi_show_feed', dgettext("navigation", "Display a Feed"));
+$smarty->assign('navi_add_tag', dgettext("navigation", "Add a Tag"));
+$smarty->assign('navi_login' , dgettext("navigation", "Login"));
+$smarty->assign('navi_register', dgettext("navigation", "Register"));
+$smarty->assign('navi_personal', dgettext("navigation", "Personal Page"));
+$smarty->assign('navi_logout', dgettext("navigation", "LogOut"));
?>
Modified: trunk/inc/smarty.php
===================================================================
--- trunk/inc/smarty.php 2007-06-04 14:43:21 UTC (rev 119)
+++ trunk/inc/smarty.php 2007-06-04 16:08:57 UTC (rev 120)
@@ -11,7 +11,7 @@
require_once "smarty/libs/Smarty.class.php";
$smarty = new Smarty();
-$smarty->template_dir = $sm['template_dir'];
+$smarty->template_dir = $sm['template_dir'].$style;
$smarty->compile_dir = $sm['compile_dir'];
$smarty->config_dir = $sm['config_dir'];
$smarty->cache_dir = $sm['cache_dir'];
Modified: trunk/inc/userstatus_display.php
===================================================================
--- trunk/inc/userstatus_display.php 2007-06-04 14:43:21 UTC (rev 119)
+++ trunk/inc/userstatus_display.php 2007-06-04 16:08:57 UTC (rev 120)
@@ -8,14 +8,14 @@
* @package feed-collector
*/
if (false === HTTP_Session :: get("logged_in", false)) {
- $midHeader_title_right = sprintf(" <p>%s</p>", dgettext("userstatus_display", "You are not logged in"));
+ $smarty->assign('userstatus', dgettext("userstatus_display", "You are not logged in"));
} else {
if (HTTP_Session :: get("username", false) == false) {
$username = $user->getUsername();
} else {
$username = HTTP_Session :: get("username");
}
- $midHeader_title_right = sprintf(" <p>%s %s</p>", dgettext("userstatus_display", "Hello"), $username);
+ $smarty->assign('userstatus', dgettext("userstatus_display", "Hello")." ".$username);
HTTP_Session::updateIdle();
}
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|