Plugin Directory

Changeset 808859


Ignore:
Timestamp:
11/22/2013 01:45:54 PM (12 years ago)
Author:
adatosystems
Message:

1.7 update

Location:
adatosystems-friday-zmanim/trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • adatosystems-friday-zmanim/trunk/readme.txt

    r807212 r808859  
    55Requires at least: 3.3
    66Tested up to: 3.7.1
     7<<<<<<< .mine
     8Stable tag: 1.7
     9=======
    710Stable tag: 1.6
     11>>>>>>> .r808858
    812License: GPLv2 or later
    913License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6771Check the "debug" option at the bottom of the widget to get some of the initial calculations that are coming in. Otherwise, contact the developer. I hear he's a great guy.
    6872
     73<<<<<<< .mine
    6974= I put in my zipcode but I'm not getting the right location. =
    7075Get the latitude/longitude for your location and use that instead.
    7176
     77= I put in the latitude/longitude but it's showing the completely wrong city =
     78The chances are when you googled "latitude longitude for xxxx" it gave you two regular numbers. What you need to pay attention to is the North/South and East/West items. If the number is South or West, then you need to make the number negative. Example: San Francisco is 37.7833 N, 122.4167 W. But if you leave the longitude as 122.4167 you'll get Weihai, China.
     79
     80
     81=======
     82= I put in my zipcode but I'm not getting the right location. =
     83Get the latitude/longitude for your location and use that instead.
     84
     85>>>>>>> .r808858
    7286== Screenshots ==
    7387
     
    7892== Changelog ==
    7993
     94<<<<<<< .mine
     95= 1.7 =
     96* Fixed issues with Plag and Shema, proving yet again that developers should not QA their own code.
     97
    8098= 1.6 =
    8199* Added options for Latitude/Longitude for those locations where the postal code doesn't work.
    82100* If using Lat/Long, returns location name in that location's language (if possible)
    83101
     102=======
     103= 1.6 =
     104* Added options for Latitude/Longitude for those locations where the postal code doesn't work.
     105* If using Lat/Long, returns location name in that location's language (if possible)
     106
     107>>>>>>> .r808858
    84108= 1.5 =
    85109* Using sunrise/sunset (instead of calculating it within the code) because of mis-matches in DST (daylight savings time) calculations.
  • adatosystems-friday-zmanim/trunk/zmanfriday.php

    r807212 r808859  
    66 *   Uses the inimitable Hebcal.com site for parsha and other information,
    77 *   as well as Google Maps API for geographic and sunrise/sunset information.
     8<<<<<<< .mine
     9 * Version: 1.7
     10=======
    811 * Version: 1.6
     12>>>>>>> .r808858
    913 * Author: Leon Adato
    1014 * Author URI: http://www.adatosystems.com/
     
    1721 * 2013-10-24 - changed Lat/Long call to use geocoder.us, timezone to use
    1822 * 2013-11-13 - more changes to fix up time zone and dst stuff.
     23<<<<<<< .mine
     24 * 2013-11-15 - add option for latitude/longitude instead of postal code; also returns location in that locale's language if possible
     25 * 2013-11-22 - fixed more calculatings, proving once again that developers should not QA their own code.
     26=======
    1927 * 2013-11-22 - add option for latitude/longitude instead of postal code; also returns location in that locale's language if possible
     28>>>>>>> .r808858
    2029 *
    2130 *   This program is free software: you can redistribute it and/or modify
     
    143152        $frisunrise = $tzjd['dates'][0]['sunrise'];
    144153        $frisunset = $tzjd['dates'][0]['sunset'];
     154        //***Gives "2013-11-22 17:01". Now convert to date, and set the text to something readable
     155        $frisunrisedatetime = strtotime($frisunrise);
     156        $frisunsetdatetime = strtotime($frisunset);
    145157
    146158$saturl = "http://api.geonames.org/timezoneJSON?lat=".$lat."&lng=".$long."&date=".$saturday_txt."&username=adatosystems";
     
    155167        $satsunrise = $tzjd['dates'][0]['sunrise'];
    156168        $satsunset = $tzjd['dates'][0]['sunset'];
     169        $satsunrisedatetime = strtotime($satsunrise);
     170        $satsunsetdatetime = strtotime($satsunset);
    157171
    158172        // Get Hebrew Date from HebCal
     
    198212        } //end get Parsha reading
    199213
     214//**DO YOU NEED TO FIX THIS?!?!**
    200215        // Calculate Plag haMincha
    201216        if($instance['showplag']) {
    202             $sunrisesec = $frisuninfo['sunrise']+$offset;
    203             $sunsetsec = $frisuninfo['sunset']+$offset;
     217            $sunrisesec = $frisunrisedatetime+$offset;
     218            $sunsetsec = $frisunsetdatetime+$offset;
    204219            if($instance['plagmethod'] == "gra") {
    205220                $halachichour = ($sunsetsec - $sunrisesec)/12;
     
    219234        // Calculate Shema
    220235        if($instance['showshema']) {
    221             $sunrisesec = $frisuninfo['sunrise']+$offset;
    222             $sunsetsec = $frisuninfo['sunset']+$offset;
     236            $sunrisesec = $frisunrisedatetime+$offset;
     237            $sunsetsec = $frisunsetdatetime+$offset;
    223238            if($instance['shemamethod'] == "gra") {
    224239                $halachichour = ($sunsetsec - $sunrisesec)/12;
     
    237252
    238253        // Calculate Candles & havdalah
    239         if($instance['showcandles']) { $candletime = date($timedisplay, strtotime($frisunset)-($instance['cmin']*60 ) ); }
    240         if($instance['showhavdalah']) {$havdalahtime = date($timedisplay, strtotime($satsunset)+($instance['m']*60) ); }
     254        if($instance['showcandles']) { $candletime = date($timedisplay, $frisunsetdatetime-($instance['cmin']*60 ) ); }
     255        if($instance['showhavdalah']) {$havdalahtime = date($timedisplay, $satsunsetdatetime+($instance['m']*60) ); }
    241256
    242257        // Display the widget already!
     
    250265        if($instance['showplag'] ) {echo $plagtext.'<br />'; }
    251266        if($instance['showcandles'] ) {echo '<span id="zmantitle">Candle Lighting Time: </span>'.$candletime.'<br />'; }
    252         if($instance['showfrisunset'] ) {echo '<span id="zmantitle">Sunset Friday: </span>'.$frisunset.'<br />';}
    253         if($instance['showsunrise'] ) {echo '<span id="zmantitle">Sunrise: </span>'.$frisunrise.'<br /> ';}
     267        if($instance['showfrisunset'] ) {echo '<span id="zmantitle">Sunset Friday: </span>'.date($timedisplay,$frisunsetdatetime).'<br />';}
     268        if($instance['showsunrise'] ) {echo '<span id="zmantitle">Sunrise: </span>'.date($timedisplay, $frisunrisedatetime).'<br /> ';}
    254269        if($instance['showshema'] ) {echo $shematext.'<br />'; }
    255         if($instance['showsatsunset'] ) {echo '<span id="zmantitle">Sunset Saturday: </span>'.$satsunset.'<br />';}
     270        if($instance['showsatsunset'] ) {echo '<span id="zmantitle">Sunset Saturday: </span>'.date($timedisplay, $satsunsetdatetime).'<br />';}
    256271        if($instance['showhavdalah'] ) {echo $titlehavdalah.' ('.$instance['m'].' min): '.$havdalahtime.'<br />'; }
    257272        if($instance['love'] ) {echo $lovetext.'<br />'; }
     
    335350        <p>
    336351        <label for="<?php echo $this->get_field_id('zip'); ?>">Zip code:</label>
     352<<<<<<< .mine
     353        <input id="<?php echo $this->get_field_id('zip'); ?>" name="<?php echo $this->get_field_name('zip'); ?>" value="<?php echo $instance['zip']; ?>" size="5" maxlength="5" /><br />
     354        Or provide the latitude/Longitude<br />
     355        <label for="<?php echo $this->get_field_id('userlat'); ?>">Latitude:</label>
     356        <input id="<?php echo $this->get_field_id('userlat'); ?>" name="<?php echo $this->get_field_name('userlat'); ?>" value="<?php echo $instance['userlat']; ?>" size="15" maxlength="15" /><br />
     357        <label for="<?php echo $this->get_field_id('userlong'); ?>">Longitude:</label>
     358        <input id="<?php echo $this->get_field_id('userlong'); ?>" name="<?php echo $this->get_field_name('userlong'); ?>" value="<?php echo $instance['userlong']; ?>" size="15" maxlength="15" />
     359=======
    337360        <input id="<?php echo $this->get_field_id('zip'); ?>" name="<?php echo $this->get_field_name('zip'); ?>" value="<?php echo $instance['zip']; ?>" size="5" maxlength="5" /><br />
    338361        Or provide the latitude/Longitude<br />
     
    341364        <label for="<?php echo $this->get_field_id('userlong'); ?>">Longitude:</label>
    342365        <input id="<?php echo $this->get_field_id('userlong'); ?>" name="<?php echo $this->get_field_name('userlong'); ?>" value="<?php echo $instance['userlong']; ?>" size="7" maxlength="7" />
     366>>>>>>> .r808858
    343367        </p>
    344368
Note: See TracChangeset for help on using the changeset viewer.