On the right is the display of sunrise and sunset for various locations using the v3.3.0 module.
You need to know the latitude and longitude of the location you want the times for. West of Greenwich or South of the equator are entered as negative values. Google is your friend to find coordinates for a location.
This should now be working correctly for all timezones and locations - except inside the Arctic or Antarctic circle where the sun doesn't set or rise sometimes so it might throw an error. If you really want it do display times near the poles then it'll probably only be one line of code to trap the error and return an appropriate message - but right now I can't be arsed.
The text above and below the times is set in the module parameters. The styling is set in the module stylesheet mond_sunupdown.css found in the media/mod_sunupdown/css/ folder.
The times will be local time adjusted for daylight saving according to the time zone set in the parameters. If you want to display GMT then select London as the timezone.
NB - the optional display of time at the location is the time at the moment the module was last refreshed - it is NOT a clock
- Category: Joomla 3 Demos
UPDATE 27 Nov 2014 for UK Tides
New version 3.4.0 now has the correct default parameters for the current NTSLF website. Also you can now select whether the curl library or the file_get_contents() function is used to fetch the data from the NTSLF site.
Some hosts are blocking use of file_get_contents() for remote URLs because of (arguably spurious) security concerns. If this affects you then you might find curl works instead. On the other hand if your php installation does not have the curl library included then you will need to select fopen in the module paramters to use file_get_contents().
Programmers argue about which is faster or better to use. I'm not convinced there is a significant speed difference - caching and network delays will be more significant. curl is a lot more powerful like a handle with interchangeable screwdriver bits, but file_get_contents is a simple screwdriver for the this job
This page provides a demo of the Joomla 3 version of UK and US Tides modules.
UPDATE 27th NOV - there seems to be some problems with the NOAA Tides website - it is being very slow so the USTides demos have been disabled as they were causing the page to fail to load. It may just be a local problem on this server
Each module is displayed on the left twice with different display settings. The styling used is the default stylesheet provided with the module. This can either be edited directly (it is in [siteHome]/media/mod_uktides/css/mod_uktides.css ) or overridden in the normal way.
The class prefix for styling is specified in the parameters ( 'moduktides_' to use the built in style ) and the following classes are used with the prefix:
table, td, oddrow, evenrow, pretext, date, posttext, footer
The setup parameters for the modules allow you to specify the base tidal port (for the US you need to get the port number from the NOAA site), the text that appears above and below the table, what days and tides to include in the table, whether to show times in GMT or local time with or without daylight saving, and for the USA a choice between metres or feet for heights.
The module install files can be download here:
The Joomla Extensions Directory pages are here: