Changeset 222263
- Timestamp:
- 03/28/2010 06:30:18 AM (16 years ago)
- Location:
- zmanim-widget
- Files:
-
- 9 edited
- 23 copied
-
tags/0.9 (copied) (copied from zmanim-widget/trunk)
-
tags/0.9/config.php (copied) (copied from zmanim-widget/trunk/config.php) (1 diff)
-
tags/0.9/dictionary (copied) (copied from zmanim-widget/trunk/dictionary)
-
tags/0.9/dictionary/ashkenaz.php (copied) (copied from zmanim-widget/trunk/dictionary/ashkenaz.php)
-
tags/0.9/dictionary/fullkriyah.csv (copied) (copied from zmanim-widget/trunk/dictionary/fullkriyah.csv)
-
tags/0.9/dictionary/sephard.php (copied) (copied from zmanim-widget/trunk/dictionary/sephard.php)
-
tags/0.9/functions.php (copied) (copied from zmanim-widget/trunk/functions.php) (1 diff)
-
tags/0.9/hdate (copied) (copied from zmanim-widget/trunk/hdate)
-
tags/0.9/hdate/hdate.php (copied) (copied from zmanim-widget/trunk/hdate/hdate.php) (4 diffs)
-
tags/0.9/hdate/hebrewdate.inc (copied) (copied from zmanim-widget/trunk/hdate/hebrewdate.inc)
-
tags/0.9/hdate/hol.php (copied) (copied from zmanim-widget/trunk/hdate/hol.php) (2 diffs)
-
tags/0.9/hdate/holidays.inc (copied) (copied from zmanim-widget/trunk/hdate/holidays.inc)
-
tags/0.9/hdate/holidays.php (copied) (copied from zmanim-widget/trunk/hdate/holidays.php)
-
tags/0.9/hdate/today.php (copied) (copied from zmanim-widget/trunk/hdate/today.php) (2 diffs)
-
tags/0.9/img (copied) (copied from zmanim-widget/trunk/img)
-
tags/0.9/lib (copied) (copied from zmanim-widget/trunk/lib)
-
tags/0.9/localization (copied) (copied from zmanim-widget/trunk/localization)
-
tags/0.9/localization/zmanim-ru_RU.mo (copied) (copied from zmanim-widget/trunk/localization/zmanim-ru_RU.mo)
-
tags/0.9/localization/zmanim-ru_RU.po (copied) (copied from zmanim-widget/trunk/localization/zmanim-ru_RU.po)
-
tags/0.9/message.php (copied) (copied from zmanim-widget/trunk/message.php) (1 diff)
-
tags/0.9/readme.txt (copied) (copied from zmanim-widget/trunk/readme.txt) (2 diffs)
-
tags/0.9/weeklytorah.php (copied) (copied from zmanim-widget/trunk/weeklytorah.php) (1 diff)
-
tags/0.9/zmanim-widget.php (copied) (copied from zmanim-widget/trunk/zmanim-widget.php) (1 diff)
-
trunk/config.php (modified) (1 diff)
-
trunk/functions.php (modified) (1 diff)
-
trunk/hdate/hdate.php (modified) (4 diffs)
-
trunk/hdate/hol.php (modified) (2 diffs)
-
trunk/hdate/today.php (modified) (2 diffs)
-
trunk/message.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/weeklytorah.php (modified) (1 diff)
-
trunk/zmanim-widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zmanim-widget/tags/0.9/config.php
r186558 r222263 27 27 <p><label>UTC Offset<input name="zmanim_widget_offset" class="zmanim" 28 28 type="text" value="<?php echo $data['offset']; ?>" /></label></p> 29 <p><label>DST<input name="zmanim_widget_dst" class="zmanim" 30 type="checkbox" value="true" <?php if($data['dst']=='true') echo 'checked="checked"'; ?> /></label></p> 29 31 <?php 30 32 foreach ($_POST as $opt=>$val){ 31 33 $data[preg_replace('/zmanim_widget_/','',$opt)] = attribute_escape($val); 32 34 } 35 if ($_POST['zmanim_widget_dst']=='') $data['dst'] = "false"; 33 36 update_option('zmanim_widget', $data); 34 37 ?> -
zmanim-widget/tags/0.9/functions.php
r203456 r222263 28 28 return preg_replace("/[\n\r]/","",$word_trans); 29 29 } 30 31 function dstWindow ($ts) 32 { 33 $in_dst="false"; 34 $week_day=date("w",$ts); 35 $sunday_ts=$ts-(60 * 60 * 24*($week_day)); 36 $month=date("m",$ts); 37 $sunday_month=date("m",$sunday_ts); 38 $sunday=date("j", $sunday_ts); 39 $hour=date("H",$sunday_ts); 40 $day=date("j",$ts); 41 if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF APRIL->OCT WINDOW? 42 { 43 $in_dst="true"; 44 if($sunday_month=="4") //IS IT APRIL? 45 { 46 if ($sunday<=7) //IS IT THE FIRST SUN OF THE MONTH? 47 { 48 $in_dst="true"; 49 }else{ 50 $in_dst="false"; 51 } 52 53 } 54 elseif($sunday_month=="3") //IS IT MARCH? 55 { 56 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH? 57 { 58 $in_dst="true"; 59 }else{ 60 $in_dst="false"; 61 } 62 } 63 elseif($sunday_month=="10") //IS IT OCT? 64 { 65 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH? 66 { 67 $in_dst="false"; 68 }else{ 69 $in_dst="true"; 70 } 71 } 72 } 73 return $in_dst; 74 75 } 30 76 ?> -
zmanim-widget/tags/0.9/hdate/hdate.php
r211459 r222263 1 1 <? 2 $weekday = date("w", $ts);2 $weekday = 7;//date("N", $ts); 3 3 $leftshabat = (5 - $weekday); 4 4 $endshabat = (6 - $weekday); 5 if ($weekday == 7) 6 { 7 $leftshabat = 5; 8 $endshabat = 6; 9 } 5 10 6 11 $ts_start = ($ts + (60 * 60 * 24 * $leftshabat)+(60 * 60 *$shoffset)); … … 8 13 9 14 $tslocal = date("Z", $ts_start); 10 /*if ($tslocal == "7200"){ 11 $timediff = "0"; 12 }else{ 13 $timediff = "1"; 14 }*/ 15 $timediff_end=0; 16 if (dstWindow($ts)=="true" && $data['dst']=='true'){ 17 $timediff_end++; 18 } 15 19 16 20 $resultStr = date_sunset($ts_start, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); 17 21 list($resultHour, $resultMin) = split(':', $resultStr); 18 //$resultHour += $timediff;22 $resultHour += $timediff; 19 23 $resultMin -= 18; 20 24 … … 25 29 26 30 $tslocal = date("Z", $ts_end); 27 $timediff_end = "1"; 28 /*if ($tslocal == "7200"){ 29 }else{ 30 $timediff_end = "2"; 31 }*/ 31 $timediff_end=1; 32 if (dstWindow($ts_end)=="true" && $data['dst']=='true'){ 33 $timediff_end++; 34 } 32 35 33 36 $resultStr_end = date_sunset($ts_end, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); … … 64 67 if ($weekday == 6 && "$currentHour$currentMin" < "$resultHour_end$resultMin_end") $nday=translate_z('Shabbat',$data['accent']); 65 68 elseif ($weekday == 5 && "$currentHour$currentMin" > "$resultHour$resultMin") $nday=translate_z('Shabbat',$data['accent']); 66 elseif ($weekday >= 6 && $leftHour < 0 ) $nday=__("It remains 6days","zmanim");69 if ($weekday > 6 ) $nday=__("It will come in","zmanim").' 6 '.__("days","zmanim"); 67 70 68 71 print '<ul><li><b>'.translate_z('Shabbat',$data['accent'])."</b></li>"; -
zmanim-widget/tags/0.9/hdate/hol.php
r211460 r222263 4 4 //if ($lang == yd) include("holidays.inc"); 5 5 6 $ts = mktime();7 6 $isDiaspora = true; 8 7 $postponeShushanPurimOnSaturday = true; … … 24 23 $lastGDay = cal_days_in_month(CAL_GREGORIAN, $gmonth, $gyear); 25 24 for ($gday; $gday <= $lastGDay; $gday++) { 26 $jdCurrent = gregoriantojd($gmonth, $gday +1, $gyear);25 $jdCurrent = gregoriantojd($gmonth, $gday, $gyear); 27 26 $jewishDate = jdtojewish($jdCurrent); 28 27 list($jewishMonth, $jewishDay, $jewishYear) = split('/', $jewishDate); -
zmanim-widget/tags/0.9/hdate/today.php
r211459 r222263 3 3 4 4 //timestamp according to UTC offset 5 if (dstWindow($ts)=="true" ){ 6 if ($data['dst'] == true) 7 $shoffset++; 8 } 5 9 $ts_t = ($ts +(60 * 60 *$shoffset)); 6 10 … … 10 14 $sunsetStr_t = date_sunset($ts_t, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); 11 15 list($sunsetHour_t, $sunsetMin_t) = split(':', $sunsetStr_t); 12 13 16 14 17 $time_s = "$sunsetHour_t:$sunsetMin_t"; -
zmanim-widget/tags/0.9/message.php
r215266 r222263 16 16 if($data['offset']) $shoffset=$data['offset']; 17 17 else $shoffset=2; 18 if($data['dst']) $dst=$data['dst']; 19 else $dst=''; 18 20 endif; 19 21 -
zmanim-widget/tags/0.9/readme.txt
r215266 r222263 4 4 Requires at least: 2.7 5 5 Tested up from : 2.9 6 Stable tag: 0. 8.16 Stable tag: 0.9 7 7 8 8 Displays Jewish calendar information in a widget. … … 24 24 25 25 == Changelog == 26 = 0.9 = 27 - DayLightSaving setting and functionality is added 28 - freeing from Hametz 26 29 = 0.8.1 = 27 30 - Added updated file -
zmanim-widget/tags/0.9/weeklytorah.php
r215247 r222263 19 19 print "</b></li>"; 20 20 echo "<li><ul><li>"; 21 print __('Chapter','zmanim').": ".$weekly_portion_name.'</li><li>'; 22 print __('Haftara','zmanim').": ".$weekly_havtara_name; 21 if ($weekly_portion_name != '') { 22 print __('Chapter','zmanim').": ".$weekly_portion_name.'</li><li>'; 23 print __('Haftara','zmanim').": ".$weekly_havtara_name; 24 }else{ 25 _e('This week there is a differet order of reading Torah','zmanim'); 26 } 23 27 print "</li></ul></li></ul>"; 24 28 -
zmanim-widget/tags/0.9/zmanim-widget.php
r215266 r222263 4 4 Plugin URI: http://kosherdev.com/category/zmanim-widget/ 5 5 Description: Allows to turn off the Wordpress site, while Shabat of High Holidays are going on in your area. 6 Version: 0. 8.16 Version: 0.9 7 7 Author: Misha Beshkin 8 8 Author URI: http://kosherdev.com/ -
zmanim-widget/trunk/config.php
r186558 r222263 27 27 <p><label>UTC Offset<input name="zmanim_widget_offset" class="zmanim" 28 28 type="text" value="<?php echo $data['offset']; ?>" /></label></p> 29 <p><label>DST<input name="zmanim_widget_dst" class="zmanim" 30 type="checkbox" value="true" <?php if($data['dst']=='true') echo 'checked="checked"'; ?> /></label></p> 29 31 <?php 30 32 foreach ($_POST as $opt=>$val){ 31 33 $data[preg_replace('/zmanim_widget_/','',$opt)] = attribute_escape($val); 32 34 } 35 if ($_POST['zmanim_widget_dst']=='') $data['dst'] = "false"; 33 36 update_option('zmanim_widget', $data); 34 37 ?> -
zmanim-widget/trunk/functions.php
r203456 r222263 28 28 return preg_replace("/[\n\r]/","",$word_trans); 29 29 } 30 31 function dstWindow ($ts) 32 { 33 $in_dst="false"; 34 $week_day=date("w",$ts); 35 $sunday_ts=$ts-(60 * 60 * 24*($week_day)); 36 $month=date("m",$ts); 37 $sunday_month=date("m",$sunday_ts); 38 $sunday=date("j", $sunday_ts); 39 $hour=date("H",$sunday_ts); 40 $day=date("j",$ts); 41 if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF APRIL->OCT WINDOW? 42 { 43 $in_dst="true"; 44 if($sunday_month=="4") //IS IT APRIL? 45 { 46 if ($sunday<=7) //IS IT THE FIRST SUN OF THE MONTH? 47 { 48 $in_dst="true"; 49 }else{ 50 $in_dst="false"; 51 } 52 53 } 54 elseif($sunday_month=="3") //IS IT MARCH? 55 { 56 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH? 57 { 58 $in_dst="true"; 59 }else{ 60 $in_dst="false"; 61 } 62 } 63 elseif($sunday_month=="10") //IS IT OCT? 64 { 65 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH? 66 { 67 $in_dst="false"; 68 }else{ 69 $in_dst="true"; 70 } 71 } 72 } 73 return $in_dst; 74 75 } 30 76 ?> -
zmanim-widget/trunk/hdate/hdate.php
r211459 r222263 1 1 <? 2 $weekday = date("w", $ts);2 $weekday = 7;//date("N", $ts); 3 3 $leftshabat = (5 - $weekday); 4 4 $endshabat = (6 - $weekday); 5 if ($weekday == 7) 6 { 7 $leftshabat = 5; 8 $endshabat = 6; 9 } 5 10 6 11 $ts_start = ($ts + (60 * 60 * 24 * $leftshabat)+(60 * 60 *$shoffset)); … … 8 13 9 14 $tslocal = date("Z", $ts_start); 10 /*if ($tslocal == "7200"){ 11 $timediff = "0"; 12 }else{ 13 $timediff = "1"; 14 }*/ 15 $timediff_end=0; 16 if (dstWindow($ts)=="true" && $data['dst']=='true'){ 17 $timediff_end++; 18 } 15 19 16 20 $resultStr = date_sunset($ts_start, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); 17 21 list($resultHour, $resultMin) = split(':', $resultStr); 18 //$resultHour += $timediff;22 $resultHour += $timediff; 19 23 $resultMin -= 18; 20 24 … … 25 29 26 30 $tslocal = date("Z", $ts_end); 27 $timediff_end = "1"; 28 /*if ($tslocal == "7200"){ 29 }else{ 30 $timediff_end = "2"; 31 }*/ 31 $timediff_end=1; 32 if (dstWindow($ts_end)=="true" && $data['dst']=='true'){ 33 $timediff_end++; 34 } 32 35 33 36 $resultStr_end = date_sunset($ts_end, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); … … 64 67 if ($weekday == 6 && "$currentHour$currentMin" < "$resultHour_end$resultMin_end") $nday=translate_z('Shabbat',$data['accent']); 65 68 elseif ($weekday == 5 && "$currentHour$currentMin" > "$resultHour$resultMin") $nday=translate_z('Shabbat',$data['accent']); 66 elseif ($weekday >= 6 && $leftHour < 0 ) $nday=__("It remains 6days","zmanim");69 if ($weekday > 6 ) $nday=__("It will come in","zmanim").' 6 '.__("days","zmanim"); 67 70 68 71 print '<ul><li><b>'.translate_z('Shabbat',$data['accent'])."</b></li>"; -
zmanim-widget/trunk/hdate/hol.php
r211460 r222263 4 4 //if ($lang == yd) include("holidays.inc"); 5 5 6 $ts = mktime();7 6 $isDiaspora = true; 8 7 $postponeShushanPurimOnSaturday = true; … … 24 23 $lastGDay = cal_days_in_month(CAL_GREGORIAN, $gmonth, $gyear); 25 24 for ($gday; $gday <= $lastGDay; $gday++) { 26 $jdCurrent = gregoriantojd($gmonth, $gday +1, $gyear);25 $jdCurrent = gregoriantojd($gmonth, $gday, $gyear); 27 26 $jewishDate = jdtojewish($jdCurrent); 28 27 list($jewishMonth, $jewishDay, $jewishYear) = split('/', $jewishDate); -
zmanim-widget/trunk/hdate/today.php
r211459 r222263 3 3 4 4 //timestamp according to UTC offset 5 if (dstWindow($ts)=="true" ){ 6 if ($data['dst'] == true) 7 $shoffset++; 8 } 5 9 $ts_t = ($ts +(60 * 60 *$shoffset)); 6 10 … … 10 14 $sunsetStr_t = date_sunset($ts_t, SUNFUNCS_RET_STRING, $shlat, $shlong, 90+50/60, $shoffset); 11 15 list($sunsetHour_t, $sunsetMin_t) = split(':', $sunsetStr_t); 12 13 16 14 17 $time_s = "$sunsetHour_t:$sunsetMin_t"; -
zmanim-widget/trunk/message.php
r215266 r222263 16 16 if($data['offset']) $shoffset=$data['offset']; 17 17 else $shoffset=2; 18 if($data['dst']) $dst=$data['dst']; 19 else $dst=''; 18 20 endif; 19 21 -
zmanim-widget/trunk/readme.txt
r215266 r222263 4 4 Requires at least: 2.7 5 5 Tested up from : 2.9 6 Stable tag: 0. 8.16 Stable tag: 0.9 7 7 8 8 Displays Jewish calendar information in a widget. … … 24 24 25 25 == Changelog == 26 = 0.9 = 27 - DayLightSaving setting and functionality is added 28 - freeing from Hametz 26 29 = 0.8.1 = 27 30 - Added updated file -
zmanim-widget/trunk/weeklytorah.php
r215247 r222263 19 19 print "</b></li>"; 20 20 echo "<li><ul><li>"; 21 print __('Chapter','zmanim').": ".$weekly_portion_name.'</li><li>'; 22 print __('Haftara','zmanim').": ".$weekly_havtara_name; 21 if ($weekly_portion_name != '') { 22 print __('Chapter','zmanim').": ".$weekly_portion_name.'</li><li>'; 23 print __('Haftara','zmanim').": ".$weekly_havtara_name; 24 }else{ 25 _e('This week there is a differet order of reading Torah','zmanim'); 26 } 23 27 print "</li></ul></li></ul>"; 24 28 -
zmanim-widget/trunk/zmanim-widget.php
r215266 r222263 4 4 Plugin URI: http://kosherdev.com/category/zmanim-widget/ 5 5 Description: Allows to turn off the Wordpress site, while Shabat of High Holidays are going on in your area. 6 Version: 0. 8.16 Version: 0.9 7 7 Author: Misha Beshkin 8 8 Author URI: http://kosherdev.com/
Note: See TracChangeset
for help on using the changeset viewer.