phphtmllib-devel Mailing List for phpHtmlLib (Page 8)
Status: Beta
Brought to you by:
hemna
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(3) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
2004 |
Jan
(1) |
Feb
(8) |
Mar
(139) |
Apr
(65) |
May
(32) |
Jun
(55) |
Jul
(21) |
Aug
(60) |
Sep
(43) |
Oct
(1) |
Nov
(18) |
Dec
(34) |
2005 |
Jan
(25) |
Feb
(2) |
Mar
(49) |
Apr
(13) |
May
(40) |
Jun
(22) |
Jul
(21) |
Aug
(59) |
Sep
(178) |
Oct
(54) |
Nov
(3) |
Dec
(49) |
2006 |
Jan
(21) |
Feb
(1) |
Mar
(5) |
Apr
(29) |
May
(86) |
Jun
(79) |
Jul
(52) |
Aug
(127) |
Sep
(187) |
Oct
(90) |
Nov
(61) |
Dec
(48) |
2007 |
Jan
(79) |
Feb
(136) |
Mar
(58) |
Apr
(139) |
May
(293) |
Jun
(112) |
Jul
(138) |
Aug
(112) |
Sep
(148) |
Oct
(76) |
Nov
(29) |
Dec
(66) |
2008 |
Jan
(45) |
Feb
(60) |
Mar
(119) |
Apr
(169) |
May
(172) |
Jun
(136) |
Jul
(107) |
Aug
(114) |
Sep
(104) |
Oct
(26) |
Nov
(50) |
Dec
(48) |
2009 |
Jan
(9) |
Feb
(35) |
Mar
(22) |
Apr
(43) |
May
(83) |
Jun
(68) |
Jul
(58) |
Aug
(21) |
Sep
(23) |
Oct
(62) |
Nov
(36) |
Dec
(26) |
2010 |
Jan
(16) |
Feb
(83) |
Mar
(73) |
Apr
(51) |
May
(76) |
Jun
(96) |
Jul
(70) |
Aug
(33) |
Sep
(10) |
Oct
(1) |
Nov
(2) |
Dec
|
2011 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(1) |
2014 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
|
2015 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <he...@us...> - 2010-02-24 02:08:05
|
Revision: 3363 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3363&view=rev Author: hemna Date: 2010-02-24 02:07:59 +0000 (Wed, 24 Feb 2010) Log Message: ----------- fixed menus Modified Paths: -------------- trunk/open2300/lib/core/page/open2300Page.inc trunk/open2300/lib/modules/home/page/HomePage.inc trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/core/page/open2300Page.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -40,6 +40,8 @@ * Where the nav blocks go */ const ID_NAV = 'leftBlock'; + + protected $centering_width = "500px"; /** * This is the constructor. @@ -123,13 +125,18 @@ } protected function header_block() { - $header = new DIVtag(array('id' => 'pageheader')); + $header = new Container(); $header->add( new DIVtag(array('id' => 'idPageHeadText'),"Hemna's Weather Station"), - new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA"), - new DIVtag(array('id' => self::ID_MENU), $this->menu_block()) ); + new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA") + ); - return $header; + $table = TABLEtag::factory("1024",0,0,0,"center"); + + $table->add_row(new TDtag(array("id" => "pageheader"), + $header)); + $table->add_row(new TDtag(array('id' => self::ID_MENU), $this->menu_block())); + return $table; } /** @@ -159,8 +166,8 @@ */ protected function main_block() { - $main = new DIVtag(); - $main->set_id(self::ID_BODY); + $main = new DIVtag(array("id" => self::ID_BODY, + "style" => "width: ".$this->centering_width."; margin-left: auto; margin-right:auto;")); $table = TABLEtag::factory("100%", 0); Modified: trunk/open2300/lib/modules/home/page/HomePage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -12,6 +12,8 @@ class HomePage extends open2300Page { private $wx = null; + + protected $centering_width = "1400px"; function __construct() { @@ -21,25 +23,8 @@ public function request_vars() { return array(); - } + } - protected function main_block() { - - $main = new DIVtag(array("id" => self::ID_BODY, - "style" => "width: 1400px; margin-left: auto; margin-right:auto;")); - - $table = TABLEtag::factory("100%", 0); - - $table->add_row( TDtag::factory("leftblock", "", $this->left_block() ), - TDtag::factory("rightblock", "", $this->content_block() )); - - $table->add_row(new TDtag(array("colspan"=> 2), - $this->footer_block())); - $main->add( $table ); - - return $main; - } - /** * */ Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -11,6 +11,8 @@ private $wx = null; private $wxdate = null; + protected $centering_width = "810px"; + function __construct() { parent::__construct('Hemna WX Station'); @@ -22,26 +24,6 @@ Log::singleton()->debug("use date of ".$this->wxdate); } - - - - protected function main_block() { - - $main = new DIVtag(array("id" => self::ID_BODY, - "style" => "width: 810px; margin-left: auto; margin-right:auto;")); - - $table = TABLEtag::factory("100%", 0); - - $table->add_row( TDtag::factory("leftblock", "", $this->left_block() ), - TDtag::factory("rightblock", "", $this->content_block() )); - - $table->add_row(new TDtag(array("colspan"=> 2), - $this->footer_block())); - $main->add( $table ); - - return $main; - } - protected function left_block() { global $config; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-24 02:07:13
|
Revision: 3362 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3362&view=rev Author: hemna Date: 2010-02-24 02:07:07 +0000 (Wed, 24 Feb 2010) Log Message: ----------- updates to make the menu live in the correct spot Modified Paths: -------------- trunk/open2300/htdocs/css/main.css trunk/open2300/htdocs/css/menu.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-23 19:29:57 UTC (rev 3361) +++ trunk/open2300/htdocs/css/main.css 2010-02-24 02:07:07 UTC (rev 3362) @@ -18,7 +18,7 @@ background-color: #AFB5FF; width: 100%; height:150px; - background: url('/images/pano_banner_winter.jpg') no-repeat top center; + background: url('/images/pano_banner_winter.jpg') no-repeat top center; } #idPageHeadText { @@ -27,6 +27,8 @@ font-size:1.4em; font-weight:bold; padding-top:8px; + position:relative; + top: -50px; } #idPageSubHeadText { @@ -34,6 +36,8 @@ text-align:center; font-size:.6em; padding-top:0px; + position:relative; + top: -50px; } Modified: trunk/open2300/htdocs/css/menu.css =================================================================== --- trunk/open2300/htdocs/css/menu.css 2010-02-23 19:29:57 UTC (rev 3361) +++ trunk/open2300/htdocs/css/menu.css 2010-02-24 02:07:07 UTC (rev 3362) @@ -1,23 +1,23 @@ #idMenu { - position: absolute; - left:190px; - top: 140px; - font-size: .6em; - margin:0px; - padding:0px; + position: relative; + font-size: .7em; + margin: 0px; + padding-top: -10px; + //border: 1px solid green; } #idMenu #idMenuItems { margin:0px; padding:0px; + //border: 1px solid red; } #idMenu #idMenuItems li { list-style: none; text-align:left; float: left; - padding:0px; - margin:0px; + padding-top: -10px; + margin-top: -10px; } #idMenu #idMenuItems li:first-child { @@ -32,7 +32,7 @@ #idMenu #idMenuItems li a { padding:4px; padding-right:10px; - height: 20px; + height: 40px; line-height: 20px; font-size: 1em; border: none; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-23 19:30:03
|
Revision: 3361 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3361&view=rev Author: hemna Date: 2010-02-23 19:29:57 +0000 (Tue, 23 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/images/pano_banner_winter.jpg Added: trunk/open2300/htdocs/images/pano_banner_winter.jpg =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/pano_banner_winter.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-23 19:29:33
|
Revision: 3360 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3360&view=rev Author: hemna Date: 2010-02-23 19:29:27 +0000 (Tue, 23 Feb 2010) Log Message: ----------- added winter banner Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-22 08:12:41 UTC (rev 3359) +++ trunk/open2300/htdocs/css/main.css 2010-02-23 19:29:27 UTC (rev 3360) @@ -18,7 +18,7 @@ background-color: #AFB5FF; width: 100%; height:150px; - background: url('/images/pano_cropped_banner1.jpg') no-repeat top center; + background: url('/images/pano_banner_winter.jpg') no-repeat top center; } #idPageHeadText { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 08:13:05
|
Revision: 3359 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3359&view=rev Author: hemna Date: 2010-02-22 08:12:41 +0000 (Mon, 22 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/htdocs/css/menu.css Added: trunk/open2300/htdocs/css/menu.css =================================================================== --- trunk/open2300/htdocs/css/menu.css (rev 0) +++ trunk/open2300/htdocs/css/menu.css 2010-02-22 08:12:41 UTC (rev 3359) @@ -0,0 +1,48 @@ +#idMenu { + position: absolute; + left:190px; + top: 140px; + font-size: .6em; + margin:0px; + padding:0px; +} + +#idMenu #idMenuItems { + margin:0px; + padding:0px; +} + +#idMenu #idMenuItems li { + list-style: none; + text-align:left; + float: left; + padding:0px; + margin:0px; +} + +#idMenu #idMenuItems li:first-child { + border-left:none; + list-style: none; + float: left; + text-align:left; + margin-left:-40px; + padding-left:0px; +} + +#idMenu #idMenuItems li a { + padding:4px; + padding-right:10px; + height: 20px; + line-height: 20px; + font-size: 1em; + border: none; + color: #000000; + font-weight: bold; + text-decoration: none; + position: relative; +} + + +#idMenu #idMenuItems li a:hover { + background-color: #9ca6f1; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 08:11:49
|
Revision: 3358 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3358&view=rev Author: hemna Date: 2010-02-22 08:11:42 +0000 (Mon, 22 Feb 2010) Log Message: ----------- menu Modified Paths: -------------- trunk/open2300/lib/core/page/open2300Page.inc Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2010-02-22 08:11:24 UTC (rev 3357) +++ trunk/open2300/lib/core/page/open2300Page.inc 2010-02-22 08:11:42 UTC (rev 3358) @@ -112,6 +112,7 @@ protected function head_content() { $this->add_css_link("/css/main.css"); $this->add_css_link("/css/fonts.css"); + $this->add_css_link("/css/menu.css"); //$this->add_js_link( '/js/scriptaculous-js-1.7.0/lib/prototype.js' ); //$this->add_js_link( '/js/scriptaculous-js-1.7.0/src/scriptaculous.js' ); @@ -125,10 +126,30 @@ $header = new DIVtag(array('id' => 'pageheader')); $header->add( new DIVtag(array('id' => 'idPageHeadText'),"Hemna's Weather Station"), - new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA") ); + new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA"), + new DIVtag(array('id' => self::ID_MENU), $this->menu_block()) ); + return $header; } + + /** + * Returns menu widget object + * to use + * + * @return MenuBarWidget + */ + protected protected function menu_block() { + $div = new DIVtag(array('id' => 'idMenuItems')); + $ul = ULtag::factory( + LItag::factory(Atag::factory(RequestBuilder::build_url('HomePage'), 'Home')), + LItag::factory(Atag::factory(RequestBuilder::build_url('WxDate'), 'Old Data')) + ); + $div->add($ul); + $div->set_collapse(); + return $div; + } + /** * We override this method to automatically * break up the main block into a @@ -139,7 +160,7 @@ protected function main_block() { $main = new DIVtag(); - $main->set_id("maincontent"); + $main->set_id(self::ID_BODY); $table = TABLEtag::factory("100%", 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 08:11:31
|
Revision: 3357 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3357&view=rev Author: hemna Date: 2010-02-22 08:11:24 +0000 (Mon, 22 Feb 2010) Log Message: ----------- menu Modified Paths: -------------- trunk/open2300/lib/modules/home/page/HomePage.inc trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/home/page/HomePage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-22 07:23:50 UTC (rev 3356) +++ trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-22 08:11:24 UTC (rev 3357) @@ -25,9 +25,8 @@ protected function main_block() { - $main = new DIVtag(array("id" => "maincontent", + $main = new DIVtag(array("id" => self::ID_BODY, "style" => "width: 1400px; margin-left: auto; margin-right:auto;")); - $main->set_id("maincontent"); $table = TABLEtag::factory("100%", 0); @@ -51,7 +50,7 @@ $script->add("Event.observe(window, 'load', start_updates);"); $container->add($script); - $this->add_js_link("/js/cal.js"); + //$this->add_js_link("/js/cal.js"); $left_div = new DIVtag(array('id'=> '')); Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 07:23:50 UTC (rev 3356) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 08:11:24 UTC (rev 3357) @@ -27,9 +27,8 @@ protected function main_block() { - $main = new DIVtag(array("id" => "maincontent", + $main = new DIVtag(array("id" => self::ID_BODY, "style" => "width: 810px; margin-left: auto; margin-right:auto;")); - $main->set_id("maincontent"); $table = TABLEtag::factory("100%", 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 07:23:56
|
Revision: 3356 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3356&view=rev Author: hemna Date: 2010-02-22 07:23:50 +0000 (Mon, 22 Feb 2010) Log Message: ----------- fixed centering Modified Paths: -------------- trunk/open2300/lib/modules/home/page/HomePage.inc Modified: trunk/open2300/lib/modules/home/page/HomePage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-22 07:05:20 UTC (rev 3355) +++ trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-22 07:23:50 UTC (rev 3356) @@ -23,6 +23,24 @@ return array(); } + protected function main_block() { + + $main = new DIVtag(array("id" => "maincontent", + "style" => "width: 1400px; margin-left: auto; margin-right:auto;")); + $main->set_id("maincontent"); + + $table = TABLEtag::factory("100%", 0); + + $table->add_row( TDtag::factory("leftblock", "", $this->left_block() ), + TDtag::factory("rightblock", "", $this->content_block() )); + + $table->add_row(new TDtag(array("colspan"=> 2), + $this->footer_block())); + $main->add( $table ); + + return $main; + } + /** * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 07:05:29
|
Revision: 3355 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3355&view=rev Author: hemna Date: 2010-02-22 07:05:20 +0000 (Mon, 22 Feb 2010) Log Message: ----------- picker Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:55:56 UTC (rev 3354) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 07:05:20 UTC (rev 3355) @@ -16,10 +16,10 @@ $this->wxdate = Request::singleton()->get("date", date("Y-m-d")); //make sure we have a valid date here - if (empty($this->date) || is_null($this->date)) { - $this->date = date("Y-m-d"); + if (empty($this->wxdate) || is_null($this->wxdate)) { + $this->wxdate = date("Y-m-d"); } - //Log::singleton()->debug("use date of ".$this->wxdate); + Log::singleton()->debug("use date of ".$this->wxdate); } @@ -53,7 +53,7 @@ //only show the flash overlay if we //have today's video file on disk - $curdate = date("Ymd", strtotime($this->date)); + $curdate = date("Ymd", strtotime($this->wxdate)); $filename = $config->get('videodir')."/".$curdate."/timelapse.flv"; //$cam_title_div->add($filename); if (file_exists($filename)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:56:02
|
Revision: 3354 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3354&view=rev Author: hemna Date: 2010-02-22 06:55:56 +0000 (Mon, 22 Feb 2010) Log Message: ----------- fixed date formatting Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:50:42 UTC (rev 3353) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:55:56 UTC (rev 3354) @@ -53,7 +53,7 @@ //only show the flash overlay if we //have today's video file on disk - $curdate = date("ymd", strtotime($this->date)); + $curdate = date("Ymd", strtotime($this->date)); $filename = $config->get('videodir')."/".$curdate."/timelapse.flv"; //$cam_title_div->add($filename); if (file_exists($filename)) { @@ -64,8 +64,7 @@ "width" => "320", "height" => "240"), '<param name="movie" value="'.$url.'"><param name="allowFullScreen" value="true">'); - $div->add($obj); - + $div->add(BRtag::factory(2),$obj); } return $div; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:50:48
|
Revision: 3353 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3353&view=rev Author: hemna Date: 2010-02-22 06:50:42 +0000 (Mon, 22 Feb 2010) Log Message: ----------- add it in Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:46:13 UTC (rev 3352) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:50:42 UTC (rev 3353) @@ -57,16 +57,14 @@ $filename = $config->get('videodir')."/".$curdate."/timelapse.flv"; //$cam_title_div->add($filename); if (file_exists($filename)) { - $url = '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1'; + $url = '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=0'; $obj = new ObjectTag(array("data" => $url, "type" => "application/x-shockwave-flash", "quality" => "high", "wmode" => "transparent", "pluginspage" => "http://www.adobe.com/go/getflashplayer", "width" => "320", "height" => "240"), '<param name="movie" value="'.$url.'"><param name="allowFullScreen" value="true">'); - $cam_href = new Atag(array('href' => '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1', 'class' => 'lightview', - 'rel' => 'flash', 'title' => 'TimeLapse :: '.$curdate.' :: width:640, height:480'), - "View Timelapse Video"); + $div->add($obj); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:46:22
|
Revision: 3352 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3352&view=rev Author: hemna Date: 2010-02-22 06:46:13 +0000 (Mon, 22 Feb 2010) Log Message: ----------- updates Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:18:53 UTC (rev 3351) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:46:13 UTC (rev 3352) @@ -44,10 +44,32 @@ } protected function left_block() { + global $config; + $div = new DIVtag(array("style" => "margin-top:0px; width: 320px;"), new WxDateCalendar(), BRtag::factory(2), new WxMonthData()); + + //only show the flash overlay if we + //have today's video file on disk + $curdate = date("ymd", strtotime($this->date)); + $filename = $config->get('videodir')."/".$curdate."/timelapse.flv"; + //$cam_title_div->add($filename); + if (file_exists($filename)) { + $url = '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1'; + $obj = new ObjectTag(array("data" => $url, + "type" => "application/x-shockwave-flash", "quality" => "high", + "wmode" => "transparent", "pluginspage" => "http://www.adobe.com/go/getflashplayer", + "width" => "320", "height" => "240"), + '<param name="movie" value="'.$url.'"><param name="allowFullScreen" value="true">'); + + $cam_href = new Atag(array('href' => '/video/player.swf?file=/video/'.$curdate.'/timelapse.flv&autostart=1', 'class' => 'lightview', + 'rel' => 'flash', 'title' => 'TimeLapse :: '.$curdate.' :: width:640, height:480'), + "View Timelapse Video"); + + } + return $div; } Modified: trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc 2010-02-22 06:18:53 UTC (rev 3351) +++ trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc 2010-02-22 06:46:13 UTC (rev 3352) @@ -14,11 +14,11 @@ $this->date = $date; } - $ts = strtotime($this->date); - $this->year = date("Y", $ts); - $this->month = date("m", $ts); - $this->day = date('j',$ts); - $this->year_month = $this->year."-".$this->month; + $this->ts = strtotime($this->date); + $this->year = date("Y", $this->ts); + $this->month = date("m", $this->ts); + $this->day = date('j', $this->ts); + $this->year_month = $this->year."-".$this->month; Log::Singleton()->debug("date=".$this->date." year = ".$this->year." month = ".$this->month." day = ".$this->day); } @@ -32,7 +32,7 @@ $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", array(":date" => $this->year_month.'%')); - $title = DIVtag::factory('cctitle', "Wx conditions on ".$this->year_month); + $title = DIVtag::factory('cctitle', "Wx conditions for ".date("F Y", $this->ts)); $div->add($title); $table = TABLEtag::factory("100%",0,2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:18:59
|
Revision: 3351 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3351&view=rev Author: hemna Date: 2010-02-22 06:18:53 +0000 (Mon, 22 Feb 2010) Log Message: ----------- ems Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-22 06:18:18 UTC (rev 3350) +++ trunk/open2300/htdocs/css/main.css 2010-02-22 06:18:53 UTC (rev 3351) @@ -66,15 +66,16 @@ border: 1px solid #aaaaaa; } -#idCurrentConditions { +#idCurrentConditions, #idWxMonthData { font-size: .6em; } -#idCurrentConditionscontents{ +#idCurrentConditionscontents, #idWxMonthDatacontents { border: 1px solid #000088; } -#idCurrentConditionscontents .cctitle { + +.cctitle { font-size: .8em; font-weight:bold; background-color: #000088; @@ -140,14 +141,14 @@ table.calendar {border: 0; color: black; background-color: #ffeff;} table.calendar td, th {text-align: center; border: 0} -table.calendar th {height: 10px; font-size: 7pt;} -table.calendar td {width: 19px; height: 10px; font-size: 9pt;} -table.calendar .calendar-month {font-weight: bold; margin-top: 3px; font-size: 12pt; text-align: center} +table.calendar th {height: 10px; font-size: .8em;} +table.calendar td {width: 19px; height: 10px; font-size: .8em;} +table.calendar .calendar-month {font-weight: bold; margin-top: 3px; font-size: 1em; text-align: center} table.calendar .calendar-month a{text-decoration: none} table.calendar a.calendar-prev, table.calendar a.calendar-next {font-weight: normal;color:black;} table.calendar th {color: green; text-align: center;} -table.calendar a.linked-day {font-size: 9pt; color: black; font-weight:normal; text-align:center;} -table.calendar td.selected-day {font-size: 9pt; color: red; font-weight:bold;} +table.calendar a.linked-day {font-size: .8em; color: black; font-weight:normal; text-align:center;} +table.calendar td.selected-day {font-size: .9em; color: red; font-weight:bold;} table.prevnext {width: 100%; margin-top: .3em;} table.prevnext td{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:18:26
|
Revision: 3350 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3350&view=rev Author: hemna Date: 2010-02-22 06:18:18 +0000 (Mon, 22 Feb 2010) Log Message: ----------- monthly data Modified Paths: -------------- trunk/open2300/lib/autoload.inc Modified: trunk/open2300/lib/autoload.inc =================================================================== --- trunk/open2300/lib/autoload.inc 2010-02-22 06:17:56 UTC (rev 3349) +++ trunk/open2300/lib/autoload.inc 2010-02-22 06:18:18 UTC (rev 3350) @@ -1,7 +1,7 @@ <?php /** * This is an auto-generated file. Please do not modify! - * Generated on 2010-02-21T16:06:59-08:00 by AutoloadGenerator + * Generated on 2010-02-21T20:41:36-08:00 by AutoloadGenerator * * @package open2300 */ @@ -252,6 +252,7 @@ 'WXDataList'=>'modules/home/datalist/WXDataList.inc', 'WxDate'=>'modules/wxdate/page/WxDate.inc', 'WxDateCalendar'=>'modules/wxdate/widgets/WxDateCalendar.inc', +'WxMonthData'=>'modules/wxdate/widgets/WxMonthData.inc', 'XMLDocument'=>'external/phphtmllib/src/xml/XMLDocument.inc', 'XMLTagClass'=>'external/phphtmllib/src/core/XMLTagClass.inc' ); @@ -323,6 +324,7 @@ 'wx-date'=>'WxDate', 'wx-date-calendar'=>'WxDateCalendar', 'wx-dl'=>'WXDataList', +'wx-month-data'=>'WxMonthData', 'xml-document'=>'XMLDocument', 'xml-tag-class'=>'XMLTagClass' ); @@ -403,6 +405,7 @@ 'WxDate'=>'wx-date', 'WxDateCalendar'=>'wx-date-calendar', 'WXDataList'=>'wx-dl', +'WxMonthData'=>'wx-month-data', 'XMLDocument'=>'xml-document', 'XMLTagClass'=>'xml-tag-class' ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 06:18:02
|
Revision: 3349 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3349&view=rev Author: hemna Date: 2010-02-22 06:17:56 +0000 (Mon, 22 Feb 2010) Log Message: ----------- month data Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc Added Paths: ----------- trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 04:33:50 UTC (rev 3348) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 06:17:56 UTC (rev 3349) @@ -23,32 +23,31 @@ } - /** - * We override this method to automatically - * break up the main block into a - * left block and a right block - * - * @param TABLEtag object. - */ -// protected function main_block() { -// -// $main = new DIVtag(array("id" => "centercontent", -// "style" => "width: 510px; margin-left: auto; margin-right:auto;")); -// -// -// $table = TABLEtag::factory("100%", 0); -// -// $table->add_row( TDtag::factory("rightblock", "", $this->content_block() )); -// -// $table->add_row(new TDtag(array("colspan"=> 2), -// $this->footer_block())); -// $main->add( $table ); -// -// return $main; -// } + + protected function main_block() { + + $main = new DIVtag(array("id" => "maincontent", + "style" => "width: 810px; margin-left: auto; margin-right:auto;")); + $main->set_id("maincontent"); + + $table = TABLEtag::factory("100%", 0); + + $table->add_row( TDtag::factory("leftblock", "", $this->left_block() ), + TDtag::factory("rightblock", "", $this->content_block() )); + + $table->add_row(new TDtag(array("colspan"=> 2), + $this->footer_block())); + $main->add( $table ); + + return $main; + } + protected function left_block() { - $div = new DIVtag(array("style" => "margin-top:0px"), new WxDateCalendar()); + $div = new DIVtag(array("style" => "margin-top:0px; width: 320px;"), + new WxDateCalendar(), + BRtag::factory(2), + new WxMonthData()); return $div; } Modified: trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:33:50 UTC (rev 3348) +++ trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 06:17:56 UTC (rev 3349) @@ -12,6 +12,7 @@ private $cur_month = null; public function __construct($date = null) { + parent::__construct(); $this->current_date = date("Y-m-d"); if ($date == null) { $this->date = Request::singleton()->get("date", date("Y-m-d")); Added: trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc (rev 0) +++ trunk/open2300/lib/modules/wxdate/widgets/WxMonthData.inc 2010-02-22 06:17:56 UTC (rev 3349) @@ -0,0 +1,80 @@ +<?php + + +class WxMonthData extends AjaxableHTMLWidget { + + public function __construct($date = null) { + parent::__construct(); + if ($date == null) { + $this->date = Request::singleton()->get("date", date("Y-m-d")); + if (empty($this->date) || is_null($this->date)) { + $this->date = date("Y-m-d"); + } + } else { + $this->date = $date; + } + + $ts = strtotime($this->date); + $this->year = date("Y", $ts); + $this->month = date("m", $ts); + $this->day = date('j',$ts); + $this->year_month = $this->year."-".$this->month; + + Log::Singleton()->debug("date=".$this->date." year = ".$this->year." month = ".$this->month." day = ".$this->day); + } + + + public function get_content() { + $div = new DIVtag(array('id'=>$this->get_ajax_replacement_divid().'contents')); + + $db = open2300DB::singleton(); + + $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", + array(":date" => $this->year_month.'%')); + + $title = DIVtag::factory('cctitle', "Wx conditions on ".$this->year_month); + $div->add($title); + + $table = TABLEtag::factory("100%",0,2); + + $table->add_row("Temp Month", "High/Low : ".$stmt->high." F /".$stmt->low." F" ); + + $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", + array(":date" => $this->date.'%')); + + $table->add_row("Temp Day", "High/Low : ".$stmt->high." F /".$stmt->low." F" ); + + + $sql = "select datetime,wind_speed, wind_angle, wind_direction from weather where ". + "wind_speed = (select max(wind_speed) from weather where datetime like :date) ". + "and datetime like :date2"; + $stmt = $db->queryBindOneRowCache($sql, array(":date" => $this->year_month.'%', ":date2" => $this->year_month.'%')); + + //var_dump($stmt); + $this->peak_wind['speed'] = $stmt->wind_speed; + $this->peak_wind['angle'] = $stmt->wind_angle; + $this->peak_wind['direction'] = $stmt->wind_direction; + $this->peak_wind['time'] = substr($stmt->datetime,8); + + $table->add_row("Peak Wind Month", $this->peak_wind['direction']." ".$this->peak_wind['speed'].'mph@'.$this->peak_wind['angle']." ".$this->peak_wind['time']); + + $sql = "select datetime,wind_speed, wind_angle, wind_direction from weather where ". + "wind_speed = (select max(wind_speed) from weather where datetime like :date) ". + "and datetime like :date2"; + $stmt = $db->queryBindOneRowCache($sql, array(":date" => $this->date.'%', ":date2" => $this->date.'%')); + + //var_dump($stmt); + $this->peak_wind['speed'] = $stmt->wind_speed; + $this->peak_wind['angle'] = $stmt->wind_angle; + $this->peak_wind['direction'] = $stmt->wind_direction; + $this->peak_wind['time'] = substr($stmt->datetime,10); + + $table->add_row("Peak Wind Day", $this->peak_wind['direction']." ".$this->peak_wind['speed'].'mph@'.$this->peak_wind['angle']." ".$this->peak_wind['time']); + + $div->add($table); + return $div; + } + +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:33:56
|
Revision: 3348 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3348&view=rev Author: hemna Date: 2010-02-22 04:33:50 +0000 (Mon, 22 Feb 2010) Log Message: ----------- pulled header Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 04:29:36 UTC (rev 3347) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 04:33:50 UTC (rev 3348) @@ -48,7 +48,7 @@ // } protected function left_block() { - $div = new DIVtag(array("style" => "margin-top:20px"), new WxDateCalendar()); + $div = new DIVtag(array("style" => "margin-top:0px"), new WxDateCalendar()); return $div; } @@ -84,8 +84,9 @@ $c = new Container(); - $c->add( H3tag::factory("Weather on ".date("l M d, Y", strtotime($this->wxdate))), - Brtag::factory(1), $right_div ); + $c->add( //H3tag::factory("Weather on ".date("l M d, Y", strtotime($this->wxdate))), + //Brtag::factory(1), + $right_div ); return $c; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:29:42
|
Revision: 3347 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3347&view=rev Author: hemna Date: 2010-02-22 04:29:36 +0000 (Mon, 22 Feb 2010) Log Message: ----------- fixed days Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc Modified: trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:18:27 UTC (rev 3346) +++ trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:29:36 UTC (rev 3347) @@ -82,7 +82,7 @@ if ($x == $this->day) { $days[$x] = array(null, "selected-day"); } else { - $date = $this->year."-".$this->month."-".$x; + $date = $this->year."-".$this->month."-".sprintf("%02d", $x); $url = RequestBuilder::build_url("WxDate", array("date" => $date)); $days[$x] = array($url, "linked-day"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:18:33
|
Revision: 3346 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3346&view=rev Author: hemna Date: 2010-02-22 04:18:27 +0000 (Mon, 22 Feb 2010) Log Message: ----------- fixed month Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc Modified: trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:14:25 UTC (rev 3345) +++ trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:18:27 UTC (rev 3346) @@ -24,7 +24,7 @@ $ts = strtotime($this->date); $this->year = date("Y", $ts); - $this->month = date("n", $ts); + $this->month = date("m", $ts); $this->day = date('j',$ts); Log::Singleton()->debug("date=".$this->date." year = ".$this->year." month = ".$this->month." day = ".$this->day); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:14:31
|
Revision: 3345 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3345&view=rev Author: hemna Date: 2010-02-22 04:14:25 +0000 (Mon, 22 Feb 2010) Log Message: ----------- calendar Modified Paths: -------------- trunk/open2300/htdocs/css/main.css Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2010-02-22 04:13:09 UTC (rev 3344) +++ trunk/open2300/htdocs/css/main.css 2010-02-22 04:14:25 UTC (rev 3345) @@ -138,8 +138,26 @@ +table.calendar {border: 0; color: black; background-color: #ffeff;} +table.calendar td, th {text-align: center; border: 0} +table.calendar th {height: 10px; font-size: 7pt;} +table.calendar td {width: 19px; height: 10px; font-size: 9pt;} +table.calendar .calendar-month {font-weight: bold; margin-top: 3px; font-size: 12pt; text-align: center} +table.calendar .calendar-month a{text-decoration: none} +table.calendar a.calendar-prev, table.calendar a.calendar-next {font-weight: normal;color:black;} +table.calendar th {color: green; text-align: center;} +table.calendar a.linked-day {font-size: 9pt; color: black; font-weight:normal; text-align:center;} +table.calendar td.selected-day {font-size: 9pt; color: red; font-weight:bold;} +table.prevnext {width: 100%; margin-top: .3em;} +table.prevnext td{ + font-size: smaller; +} +table.prevnext td a{text-decoration: none} + + + .datalist_col_head { font-family: arial, helvetica, sans-serif; font-size: .8em; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:13:15
|
Revision: 3344 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3344&view=rev Author: hemna Date: 2010-02-22 04:13:09 +0000 (Mon, 22 Feb 2010) Log Message: ----------- calendar Modified Paths: -------------- trunk/open2300/lib/autoload.inc Modified: trunk/open2300/lib/autoload.inc =================================================================== --- trunk/open2300/lib/autoload.inc 2010-02-22 04:12:47 UTC (rev 3343) +++ trunk/open2300/lib/autoload.inc 2010-02-22 04:13:09 UTC (rev 3344) @@ -1,7 +1,7 @@ <?php /** * This is an auto-generated file. Please do not modify! - * Generated on 2010-02-21T13:44:14-08:00 by AutoloadGenerator + * Generated on 2010-02-21T16:06:59-08:00 by AutoloadGenerator * * @package open2300 */ @@ -42,6 +42,7 @@ 'Cache'=>'external/phphtmllib/src/cache/Cache.inc', 'Cacheable'=>'external/phphtmllib/src/cache/Cacheable.inc', 'CacheException'=>'external/phphtmllib/src/cache/CacheException.inc', +'Calendar'=>'core/widgets/Calendar.inc', 'Config'=>'external/phphtmllib/src/config/Config.inc', 'Container'=>'external/phphtmllib/src/core/Container.inc', 'Controller'=>'external/phphtmllib/src/mvc/Controller.inc', @@ -250,6 +251,7 @@ 'WXConversion'=>'core/data/WXConversion.inc', 'WXDataList'=>'modules/home/datalist/WXDataList.inc', 'WxDate'=>'modules/wxdate/page/WxDate.inc', +'WxDateCalendar'=>'modules/wxdate/widgets/WxDateCalendar.inc', 'XMLDocument'=>'external/phphtmllib/src/xml/XMLDocument.inc', 'XMLTagClass'=>'external/phphtmllib/src/core/XMLTagClass.inc' ); @@ -319,6 +321,7 @@ 'wind-speed-line-graph'=>'WindSpeedLineGraph', 'wml-document'=>'WMLDocument', 'wx-date'=>'WxDate', +'wx-date-calendar'=>'WxDateCalendar', 'wx-dl'=>'WXDataList', 'xml-document'=>'XMLDocument', 'xml-tag-class'=>'XMLTagClass' @@ -398,6 +401,7 @@ 'WindSpeedLineGraph'=>'wind-speed-line-graph', 'WMLDocument'=>'wml-document', 'WxDate'=>'wx-date', +'WxDateCalendar'=>'wx-date-calendar', 'WXDataList'=>'wx-dl', 'XMLDocument'=>'xml-document', 'XMLTagClass'=>'xml-tag-class' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:12:54
|
Revision: 3343 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3343&view=rev Author: hemna Date: 2010-02-22 04:12:47 +0000 (Mon, 22 Feb 2010) Log Message: ----------- added Added Paths: ----------- trunk/open2300/lib/core/widgets/ trunk/open2300/lib/core/widgets/Calendar.inc Added: trunk/open2300/lib/core/widgets/Calendar.inc =================================================================== --- trunk/open2300/lib/core/widgets/Calendar.inc (rev 0) +++ trunk/open2300/lib/core/widgets/Calendar.inc 2010-02-22 04:12:47 UTC (rev 3343) @@ -0,0 +1,59 @@ +<?php +# PHP Calendar (version 2.3), written by Keith Devens +# http://keithdevens.com/software/php_calendar +# see example at http://keithdevens.com/weblog +# License: http://keithdevens.com/software/license + +class Calendar { + + public static function factory($year, $month, $days = array(), + $day_name_length=3, $month_href=NULL, + $first_day = 0, $pn = array()) { + + $first_of_month = gmmktime(0,0,0,$month,1,$year); + #remember that mktime will automatically correct if invalid dates are entered + # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998 + # this provides a built in "rounding" feature to generate_calendar() + + $day_names = array(); #generate all the day names according to the current locale + for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday + $day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name + + list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); + $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day + $title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names + + #Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03 + @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable + if($p) $p = '<span class="calendar-prev">'.($pl ? '<a class="calendar-prev" href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> '; + if($n) $n = ' <span class="calendar-next">'.($nl ? '<a class="calendar-next" href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>'; + $calendar = '<table class="calendar">'."\n". + '<caption class="calendar-month">'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n."</caption>\n<tr>"; + + if($day_name_length){ #if the day names should be shown ($day_name_length > 0) + #if day_name_length is >3, the full name of the day will be printed + foreach($day_names as $d) + $calendar .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>'; + $calendar .= "</tr>\n<tr>"; + } + + if($weekday > 0) $calendar .= '<td colspan="'.$weekday.'"> </td>'; #initial 'empty' days + for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ + if($weekday == 7){ + $weekday = 0; #start a new week + $calendar .= "</tr>\n<tr>"; + } + if(isset($days[$day]) and is_array($days[$day])){ + @list($link, $classes, $content) = $days[$day]; + if(is_null($content)) $content = $day; + $calendar .= '<td'.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>'). + ($link ? '<a class="linked-day" href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>'; + } + else $calendar .= "<td>$day</td>"; + } + if($weekday != 7) $calendar .= '<td colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days + + return $calendar."</tr>\n</table>\n"; + } +} +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-22 04:12:28
|
Revision: 3342 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3342&view=rev Author: hemna Date: 2010-02-22 04:12:22 +0000 (Mon, 22 Feb 2010) Log Message: ----------- new dates Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Added Paths: ----------- trunk/open2300/lib/modules/wxdate/widgets/ trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-21 22:23:15 UTC (rev 3341) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-22 04:12:22 UTC (rev 3342) @@ -30,21 +30,26 @@ * * @param TABLEtag object. */ - protected function main_block() { +// protected function main_block() { +// +// $main = new DIVtag(array("id" => "centercontent", +// "style" => "width: 510px; margin-left: auto; margin-right:auto;")); +// +// +// $table = TABLEtag::factory("100%", 0); +// +// $table->add_row( TDtag::factory("rightblock", "", $this->content_block() )); +// +// $table->add_row(new TDtag(array("colspan"=> 2), +// $this->footer_block())); +// $main->add( $table ); +// +// return $main; +// } - $main = new DIVtag(array("id" => "centercontent", - "style" => "width: 510px; margin-left: auto; margin-right:auto;")); - - - $table = TABLEtag::factory("100%", 0); - - $table->add_row( TDtag::factory("rightblock", "", $this->content_block() )); - - $table->add_row(new TDtag(array("colspan"=> 2), - $this->footer_block())); - $main->add( $table ); - - return $main; + protected function left_block() { + $div = new DIVtag(array("style" => "margin-top:20px"), new WxDateCalendar()); + return $div; } /** @@ -78,7 +83,8 @@ $this->add_css_link('/css/lightview/lightview.css'); $c = new Container(); - $c->add( H3tag::factory("Weather on ".date("l M d, Y", strtotime($this->wxdate))), + + $c->add( H3tag::factory("Weather on ".date("l M d, Y", strtotime($this->wxdate))), Brtag::factory(1), $right_div ); return $c; Added: trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc (rev 0) +++ trunk/open2300/lib/modules/wxdate/widgets/WxDateCalendar.inc 2010-02-22 04:12:22 UTC (rev 3342) @@ -0,0 +1,118 @@ +<?php + +class WxDateCalendar extends AjaxableHTMLWidget { + + protected $date = null; + protected $year = null; + protected $month = null; + protected $day = null; + + protected $current_date; + + private $cur_month = null; + + public function __construct($date = null) { + $this->current_date = date("Y-m-d"); + if ($date == null) { + $this->date = Request::singleton()->get("date", date("Y-m-d")); + if (empty($this->date) || is_null($this->date)) { + $this->date = date("Y-m-d"); + } + } else { + $this->date = $date; + } + + $ts = strtotime($this->date); + $this->year = date("Y", $ts); + $this->month = date("n", $ts); + $this->day = date('j',$ts); + Log::Singleton()->debug("date=".$this->date." year = ".$this->year." month = ".$this->month." day = ".$this->day); + } + + + public function get_content() { + $div = new DIVtag(array('id'=>$this->get_ajax_replacement_divid().'contents')); + + $days = $this->get_days(); + + $pn = array('«'=>'/weblog/archive/2004/Jul', '»'=>'/weblog/archive/2004/Sep'); + $pn = $this->get_prev_next_urls(); + + $div->add(Calendar::factory($this->year, $this->month, $days, 3, null, 0, $pn)); + + return $div; + } + + + protected function get_prev_next_urls() { + + $next_month_ts = strtotime("+1 month", strtotime($this->date)); + $prev_month_ts = strtotime("-1 month", strtotime($this->date)); + + $prev = RequestBuilder::build_url("WxDate", array("date" => date("Y-m-d", $prev_month_ts))); + $next = RequestBuilder::build_url("WxDate", array("date" => date("Y-m-d", $next_month_ts))); + + Log::singleton()->debug("date = ".$this->date." prev = ".$prev." next=".$next); + + if (!$this->is_current_month()) { + return $pn = array("«" => $prev, "»" => $next ); + } else { + return $pn = array("«" => $prev); + } + } + + protected function get_days() { + $dt = new DateTime(); + $days = array(); + + $cur_ts = strtotime($this->current_date); + $ts = strtotime($this->date); + + $cur_month = $this->is_current_month(); + $cur_day = date("d"); + + $num_days = $this->get_days_in_month($this->month, $this->year); + + if ($cur_month) { + $num_days = $cur_day; + } + + for ($x=1; $x<=$num_days; $x++) { + + if ($x == $this->day) { + $days[$x] = array(null, "selected-day"); + } else { + $date = $this->year."-".$this->month."-".$x; + $url = RequestBuilder::build_url("WxDate", array("date" => $date)); + $days[$x] = array($url, "linked-day"); + } + } + return $days; + } + + private function is_current_month() { + if (!is_null($this->cur_month)) { + return $this->cur_month; + } + + $date = date("Y-m"); + $cur_ts = strtotime($date."-01"); + $ts = strtotime($this->year."-".$this->month."-01"); + + if ($cur_ts == $ts) { + $this->cur_month = true; + } else { + $this->cur_month = false; + } + + return $this->cur_month; + } + + private function get_days_in_month($month, $year) { + $ts = strtotime("-1 day", strtotime($year."-".$month."-01")); + return date("d", $ts); + } + + +} +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-21 22:23:28
|
Revision: 3341 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3341&view=rev Author: hemna Date: 2010-02-21 22:23:15 +0000 (Sun, 21 Feb 2010) Log Message: ----------- changed the cache key to include the date Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-21 22:21:32 UTC (rev 3340) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-21 22:23:15 UTC (rev 3341) @@ -87,5 +87,13 @@ // $table->add_row(new TDtag(array('style' => 'vertical-align:top;width:510px;'),$right_div)); // return $table; } + + public function get_cache_key() { + return get_class($this).$this->wxdate; + } + + public function get_cache_lifetime() { + return 60; + } } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-21 22:21:41
|
Revision: 3340 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3340&view=rev Author: hemna Date: 2010-02-21 22:21:32 +0000 (Sun, 21 Feb 2010) Log Message: ----------- test for date Modified Paths: -------------- trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-21 22:17:29 UTC (rev 3339) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-21 22:21:32 UTC (rev 3340) @@ -15,6 +15,10 @@ parent::__construct('Hemna WX Station'); $this->wxdate = Request::singleton()->get("date", date("Y-m-d")); + //make sure we have a valid date here + if (empty($this->date) || is_null($this->date)) { + $this->date = date("Y-m-d"); + } //Log::singleton()->debug("use date of ".$this->wxdate); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-02-21 22:17:35
|
Revision: 3339 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3339&view=rev Author: hemna Date: 2010-02-21 22:17:29 +0000 (Sun, 21 Feb 2010) Log Message: ----------- fixed date string in the title of the image Modified Paths: -------------- trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc Modified: trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc =================================================================== --- trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc 2010-02-21 22:12:06 UTC (rev 3338) +++ trunk/open2300/lib/modules/graphs/TempDewPointLineGraph.inc 2010-02-21 22:17:29 UTC (rev 3339) @@ -74,7 +74,7 @@ $graph->Add($lineplot); $graph->Add($lineplot2); - $graph->title->Set("Temperature ".date("D, M d Y H:i:s")); + $graph->title->Set("Temperature ".date("D, M d Y H:i:s", strtotime($this->date))); //$graph->title->SetPos(300,100); $graph->yaxis->title->Set("Farhenheit"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |