Thread: [Feed-collector-svn] SF.net SVN: feed-collector: [109] trunk/inc
Status: Beta
Brought to you by:
c167
|
From: <C1...@us...> - 2007-05-15 21:32:48
|
Revision: 109
http://feed-collector.svn.sourceforge.net/feed-collector/?rev=109&view=rev
Author: C167
Date: 2007-05-15 14:32:46 -0700 (Tue, 15 May 2007)
Log Message:
-----------
added design
Modified Paths:
--------------
trunk/inc/footer.php
Added Paths:
-----------
trunk/inc/styles.php
Modified: trunk/inc/footer.php
===================================================================
--- trunk/inc/footer.php 2007-05-15 20:05:02 UTC (rev 108)
+++ trunk/inc/footer.php 2007-05-15 21:32:46 UTC (rev 109)
@@ -15,6 +15,11 @@
" <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 •");
-" • <strong>Updated »</strong> %s •", date("r", time()));
+" • <strong>Updated »</strong> %s •", date("r", time()), file_exists("styles/default/images/valid-css") ? "<img src=\"styles/default/images/valid-css\" alt=\"valid-css\" />":"");
+if(file_exists("styles/default/images/valid-css") or file_exists("styles/default/images/valid-markup")) {
+ $footer .= " <div class=\"right\">\n";
+ $footer .= file_exists("styles/default/images/valid-markup") ? " <img src=\"styles/default/images/valid-markup\" alt=\"Valid Markup\" />\n" : "";
+ $footer .= file_exists("styles/default/images/valid-css") ? " <img src=\"styles/default/images/valid-css\" alt=\"Valid CSS\" />\n" : "";
+ $footer .= " </div>\n";
+}
?>
Added: trunk/inc/styles.php
===================================================================
--- trunk/inc/styles.php (rev 0)
+++ trunk/inc/styles.php 2007-05-15 21:32:46 UTC (rev 109)
@@ -0,0 +1,25 @@
+<?php
+if(!empty($_GET['style'])) {
+ $style_prop = $_GET['style'];
+} elseif(!empty(HTTP_Session :: get('style'))) {
+ $style_prop = HTTP_Session :: get('style');
+} elseif(!empty($_POST['style'])) {
+ $style_prop = $_POST['style'];
+} else {
+ $style_prop = "default";
+}
+if(true === is_valid_design($style_prop])) {
+ $design = $style_prop;
+} else {
+ $design = "default";
+}
+
+/*
+ *
+ * @param String $design
+ * @return boolean
+ */
+function is_valid_design($design) {
+ return true;
+}
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <C1...@us...> - 2007-06-04 14:41:44
|
Revision: 118
http://feed-collector.svn.sourceforge.net/feed-collector/?rev=118&view=rev
Author: C167
Date: 2007-06-04 07:41:40 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
some changes the third
Modified Paths:
--------------
trunk/inc/config.php
Added Paths:
-----------
trunk/inc/smarty.php
Modified: trunk/inc/config.php
===================================================================
--- trunk/inc/config.php 2007-06-04 14:26:40 UTC (rev 117)
+++ trunk/inc/config.php 2007-06-04 14:41:40 UTC (rev 118)
@@ -13,31 +13,31 @@
*/
// Database-configuration
-$db['type'] = "mysql"; // SQL_DB-Type
-$db['host'] = "localhost"; // The hostname
-$db['port'] = ""; // The Port. Nomally, the default port is right.
-$db['user'] = "feed-collector"; // The User that has access to the DB
-$db['passwd'] = "feed-collector"; // The password of this user
+$db['type'] = "mysql"; // SQL_DB-Type
+$db['host'] = "localhost"; // The hostname
+$db['port'] = "3306"; // The Port. Nomally, the default port is right.
+$db['user'] = "feed-collector"; // The User that has access to the DB
+$db['passwd'] = "feed-collector"; // The password of this user
$db['database'] = "feed-collector"; // The name of the database
// Session-configuration
-$session['time']['expire'] = 60 * 60 * 24;
-$session['time']['idle'] = 60 * 60;
-$session['container']['tablename'] = "sessiondata";
+$session['time']['expire'] = 60 * 60 * 24;
+$session['time']['idle'] = 60 * 60;
+$session['container']['tablename'] = "sessiondata";
$session['container']['autooptimisation_allowed'] = true;
// Update-configuration
-$update['enabled'] = true;
+$update['enabled'] = true;
$update['difference'] = 1800;
-$update['loglevel'] = PEAR_LOG_NOTICE;
+$update['loglevel'] = PEAR_LOG_NOTICE;
// 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'] = "./templates_c/";
+$sm['compile_dir'] = "./smarty/emplates_c/";
$sm['config_dir'] = "./inc/";
-$sm['cache_dir'] = "./cache/";
+$sm['cache_dir'] = "./smarty/cache/";
// Valid pages
$validPages = array (
@@ -63,7 +63,7 @@
*/
// Database-configuration
-$db['dsn'] = $db['type'] . "://" . $db['user'] . ":" . $db['passwd'] . "@" . $db['host'] . "/" . $db['database'];
+$db['dsn'] = sprintf("%s://%s:%s@%s:%d/%s", $db['type'], $db['user'], $db['passwd'], $db['host'], $db['port'], $db['database']);
// Session-configuration
if (($db['type'] == "mysql" or $db['type'] == "postgresql") and $session['container']['autooptimisation_allowed']) {
Added: trunk/inc/smarty.php
===================================================================
--- trunk/inc/smarty.php (rev 0)
+++ trunk/inc/smarty.php 2007-06-04 14:41:40 UTC (rev 118)
@@ -0,0 +1,17 @@
+<?php
+/*
+ * Created on 04.06.2007
+ * This file contains the smarty-options
+ * @since 115 - 04.06.2007
+ * @author C167 <c1...@us...>
+ * @package feed-collector
+ */
+
+
+require_once "smarty/libs/Smarty.class.php";
+$smarty = new Smarty();
+
+$smarty->template_dir = $sm['template_dir'];
+$smarty->compile_dir = $sm['compile_dir'];
+$smarty->config_dir = $sm['config_dir'];
+$smarty->cache_dir = $sm['cache_dir'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|