UK Tides Component and Module

Module v3.3.0 8th August 2014

Component v2.5.1 8th June 2013

Module v2.5.1 8th June 2013

8th August 2014 Module updated to work with Joomla 3
New version 3.3.0 includes various minor improvements

Low waterThe parameters for the module allow selection of main tidal port (from NTSLF list), specification of an offset time, text to appear before and after the table, and how many days to include in the table. If showing only today's tides then you can select either high or low or both tdes.

A default stylesheet is installed in the media folder and is referenced by a style prefix (default = 'moduktides_') specified in the parameters. This can either be edited directly (it is in [siteHome]/media/mod_uktides/css/mod_uktides.css ) or overridden in the normal way.

The following classes are used with the prefix: table, td, oddrow, evenrow, pretext, date, posttext, footer.

This is the display code to show how the styling works with the default class prefix:

<div class="moduktides_">
    <div class="moduktides_pretext">Text before table
        <div class="moduktides_date ">Sun 10 Aug</div>
    </div>
    <div style="width:150px; margin-left:auto; margin-right:auto; ">
        <table style="width:150px;">
            <tr class="oddrow">
                <td>HW</td><td>05:00</td><td>5.42m</td>
            </tr>
            <tr class="evenrow">
                <td>LW</td><td>11:19</td><td>0.81m</td>
            </tr>
            <tr class="oddrow">
                <td>HW</td><td><b>17:22</b></td><td>5.76m</td>
            </tr>
        </table>
    </div>
    <div class="moduktides_posttext">Text after table</div>
    <div class="moduktides_footer">Footer text</div>
</div>

You can see a Joomla 3 example here


8th June 2013 Component & Module update v2.5.1 Compatible
Now correctly adjusting for BST

UKTides is a simple component and module to display the times of high and/or low water for a UK port. Tide times and heights are taken from the NTSLF website and an average difference in minutes can be added to give local times. Heights are not corrected but are taken from the reference port.

The module displays either just today's tide times (high and/or low water) or a table of up to 28 days high water.

The component can display up to 28 days ahead in a table. It can also display the 7 day graph from the NTSLF website either above or below the table.

Optional text and date can be displayed above and below the times. Either high, or low, or both high and low water times can be shown. A list of the reference ports is provided to select your nearest.

Data is taken from the NTSLF page for your port - and if this is unavailable then an error message will display. A link to NTSLF is provided at the bottom of the module and component - please do not remove this.

Times are automatically corrected for BST - during the early morning of clock change night there will a BST time displayed before GMT technically starts (and vice versa).

Component has its own Style Sheet installed in /components/com_uktides/assets/css/uktides.css - edit this to customise your tide table.

Styling the Module

The Module v2.5.0 can use its own stylesheet at modules/mod_uktides/style/mod_uktides.css or styles added to the template stylesheets. To use the module stylesheet enter "moduktides_" for the css class parameter in the module options.

The following classes are defined and all will be prefixed by whatever you enter in the css parameter field for the module. Supposing you enter 'MyStyle_' as the prefix the layout looks like this:

<div class="MyStyle_">
<div class="MyStyle_pretext"> The text before the table </div>
The tide table with <table> <td> tags styled by .MyStyle table{} .MyStyle td{}
and alternate rows with class .oddrow and .evenrow
<div class="MyStyle_pretext"> The text after the table </div>
<div class="MyStyle_footer">the footer text and link</div>
</div>

The example on the left uses the default module stylesheet by setting the css parameter to "moduktides_". Looks blooming horrible, but hopefully you can see what is going on Smile. You can either edit the module stylesheet or use a different prefix or no prefix to use your default template styles.


NB Earlier versions will no longer work since NTSLF revamped their website