Giter Site home page Giter Site logo

us-tides's Introduction

us-tides

  • Contributors: bobbingwide, vslgloik
  • Donate link: http://www.oik-plugins.com/oik/oik-donate/
  • Tags: shortcode, shortcodes, tides, US, heights and times, [us_tides], saltwater
  • Requires: 4.3
  • Tested up to: 4.4
  • Stable tag: 0.3.0

Tide heights and times for US tidal stations

Description

us-tides displays saltwater tide times and heights for a particular location in the US. The information that is displayed is obtained from the NOAA Tides and Currents website You find the station id for your nearest station and use this in the [us_tides] shortcode.

So for, Threemile Cut entrance, Darien River, GA the StationId is 8675843

[us_tides station=8675843]

The shortcode will display the tide times and heights for the current date.

  • [us_tides] with no parameters will display the tide times and heights for Portsmouth, New Hampshire (station id: 8423745 )

Installation

  1. Upload the contents of the us-tides plugin to the `/wp-content/plugins/us-tides' directory
  2. Activate the us-tides plugin through the 'Plugins' menu in WordPress
  3. Whenever you want to produce some 'us-tides'ed text use the [us-tides] shortcode.

Frequently Asked Questions

What is the shortcode syntax?

[us_tides station="8423745|StationId - StationId for tide information" link="y|n - Include a link to Tides and Currents website" date_format="M d,Y|date format - PHP date format"]

How do I find the value for station?

Visit the NOAA Tides and Currents website and drill down.

What is the default station?

The default is for Portsmouth, New Hampshire... because the author comes from Portsmouth, Hampshire, UK

What if I don't live in the US?

If you live in the UK then you can use the uk-tides WordPress plugin If you can point us to a resource for other locations then it should be possible to develop a very similar solution.

How does it work?

  1. The plugin will look for an XML file with the station id in the name
  2. If not present, or it's out of date it downloads a new Annual XML file
  3. It loads the XML file and finds the matching records - high and low times and heights

How big is each XML file?

Between 250 and 300K

Can I use the shortcode more than once in a page?

Yes. Just use a different station ID parameter.

Can I theme the output?

Yes. Each field is wrapped in XHTML tags

Screenshots

  1. Sample output for Portsmouth, New Hampshire
  2. Sample output for Gosport, Isles of Shoals

Upgrade Notice

0.3.0

  • Tested with WordPress 4.4. Depends on oik v2.5 or higher

0.2.0120

  • Dependent upon oik v1.17

0.2

  • Initial version. Requires oik v1.13 or higher

Changelog

0.3.0

  • Fixed: Remove extraneous text displayed for tide lines. github issues 1
  • Changed: Update sample XML files. github issues 2

0.2.0120

  • Changed: Includes default XML file for Portsmouth, NH for 2013
  • Added: Dependency logic on oik

0.2

  • initial version. Works with oik version 1.13

Further reading

If you want to read more about the oik plugins then please visit the oik plugin "the oik plugin - for often included key-information"

us-tides's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar  avatar

us-tides's Issues

Test with WordPress 4.4

US-tides plugin was last updated in 2013. It doesn't appear to be working - producing Simple XML element messages where the tide information is supposed to be displayed.

Check and update accordingly.

This plugin hasn't worked for ages

Warning: simplexml_load_file(http://tidesandcurrents.noaa.gov/noaatidepredictions/NOAATidesFacade.jsp?datatype=Annual+XML&Stationid=8423745): failed to open stream: Connection timed out in /home/customer/www/oik-plugins.uk/public_html/wp-content/plugins/us-tides/shortcodes/us-tides.php on line 38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.