Module v1.0.1 3rd Dec 2016  

SunClock is a novel clock. Rather than displaying the time since midnight, it displays the time since the last sunrise.

Midnight as the start point for timing a new day is a bit arbitrary and doesn't easily relate to anything you can simply detect in the real world. Notionally 12 hours after the sun reaches its zenith in the sky - you could determine midday using a sextant or similar instrument and start a timer to count 12 hours from then. But midnight itself is not something you can directly observe.

Much more natural to use sunrise as the defining point for the start of a new day and then count time from that point.

Of course you can define sunrise in different ways, but at least it is something you can directly observe.

One consequence of this is that the length of the day varies slightly throughout the year, during spring when the sun rises earlier each day the length of the day will be slightly less than 24 hrs, correspondingly during autumn it will be a few minutes more than 24 hrs. The precise amount will depend on your latitude and the time of year.

As well as displaying the time since the last sunrise you can also optionally show the time until sunset, or since the sun set if it has already gone down.

You can also display the duration of the sun being up and down and the total length of the day between sunrises.

In addition you can display a count of days since the Winter Solstice or from the previous or until the next solstice or equinox. You can also display the calendar dates of the next four equinox & solstice events.

All of these options are shown in the example on the right. The simplest use just shows the hours, minutes and seconds since sunrise.

You need to set your latitude and longitude in the parameters (simple way to find the lat/long for any location is to drop a marker on Google Maps and copy down the numbers it gives you). You can also set various other options - additional text to be displayed in the module, layout options etc.

If you want to change the names used for the solstices, eg Alban Arthan for the winter solstice, then you can find them and edit in the language file (language/en-GB/en-GB.mod_sunclock.ini)

There is a style sheet (found after installation in media/mod_suntime/css/suntime.css). Classes in this sheet are prefixed with "sut_". Set the prefix to a space in the options to use any corresponding template class names, or to "xyz" to disable the style sheet. More simply you can override the style sheet colours in the module settings (Styling tab)

NB The time is updated by a javascipt window timer. Hence you can only display one instance of the module on a page or the 1 sec timer gets confused and the clocks get updated wrong.


v1.1.0 30th Dec 2016
Added solstice and equinox dates. Improved timing routines.
v1.0.0 8th Dec 2016
    First release version
Component v0.3.0.1 6th July 2018   

PD-Addon is an extension to the PhocaDownload (PD) component. It is only of any use if you are using PhocaDownload and it has been built to my specific requirements for the Green-History site so you might need to at least edit the stylesheet (/media/com_pdaddon/css/pdaddon.css) for your own use.

It adds two new elements to the PhocaDownload data - a 'slug' or short description for the files and categories for the tags.

I use the standard description field for a full abstract, the features field for a contents list and the notes field for details of the original format. The slug provides a short text (160 chars) summary for display with the title.

Categories for the tags allow you to group them together according to different characteristics - for example I have sets of tags for different types of documents, for events, for sources, for campaigns and so on. 

Front-end Views

In the front end PDaddon provides five new views:

  • Files Table. Provides a table of files. Optional default category and tag. 
  • Single Category Files Table. Provides a table of files in a single category with option to include sub-categories.
  • Single Tag Files Table. Provides a table files with a specific tag. 

These three file table views offer options to search the title text and filter by tag or category as appropriate. The tables have columns for Title, Year (from the PD Date column), Category, Tags and optionally an icon image which may be linked to a modal pop-up of the preview image.
A slug (short description) can optionally be displayed either as a tooltip on the title or as text beneath the title.
File titles, category names and tags can be optionally linked to other views including the relevant PhocaDownload views.

  • File Tags Table. Provides a list of all the file tags in a specified tag category with their descriptions and a count of the files so tagged. The titles optionally link to either the Single Tag View from PDaddon or the Category Tag view from PhocaDowload.
  • File Categories Table. Provides a list of all of the PhocaDownload file categories with description and file count. Also gives the parent category and a list of sub-categories for each category.

In the backend it makes two additions to the PD data tables and provides five new management views:

Data tables:

  • #__phocadownload adds column 'slug' (varchar(160)) to provide short text only description for file
  • #__phocadownload_tags adds column 'catid' (int(10)) to reference a category for the tag in the Joomla categories system.

Uninstalling the component drops the tags.catid column as the system automatically deletes the entries in the categories table when it is uninstalled. It also drops the slug column, though this may become optional.

Back-end Views:

  • File Tags view provides a table of all the PhocaDownload tags and descriptions. Toolbar provides batch updating of tag categories.
    Columns: Status, Title, Descriptions, ID, Category
    • Title links to Tag Edit view
  • Tag Edit view provides simple editing of tag including the new Category column
    • Does not yet fully replace PD version - no editing of alias, PD category link, PD Ext Link, Ordering.
  • Tag Categories view. Table of the Tag Categories defined with options to create new and edit categories.
    • Title links to Category edit view from Joomla Category Manager.
  • Files List view. Table of all files with search and filtering
    Columns: Status, Title & Alias, Tags, Date, Category, Path, Filename, ID
    • Path and filename are broken out into separate columns for easy of sorting and finding 
    • Title links to simple edit view and toolbar buttons to access PhocaDownload full editing and new file creation.
  • Simple File Edit view. Simplified file details editing presenting only the fields that I use (including the new 'slug' field)
    • Fields: Title, Alias, Access, Slug, Category, Original Date (Date), Author/Source (Author), Description, Contents (Features), Format (Notes)
      Read-only display of Tags, Filename, Preview Filename, Icon (Special 1)
    • Cross link to the full PhocaDownload file edit view.


Improvements and bug fixes

  • alternate modal pop-ups on icons (currently using Regular Labs modals, need to provide SigPlus at least as alternative for my own purposes plus possibly a native one)
  • add all columns to back-edit tag edit view as additional tabs
  • new backend view to manage slugs for files

Possible New features

  1. Provide front-end view for tree of categories. Replacement for the PD categories view with better layout for including sub-categories and count of files
  2. Provide front-end view for lists of files to replace PD versions using my layout overrides and improved styling
  3. Provide front-end view for individual files with better layout for my purposes than can be achieved within PD

At this point it would effectively replace the need to use PD for the front-end in my case.

  1. Implement editing of tags in back-end file edit view
  2. Implement batch update of tags in backend file list view

From here we are really moving to a replacement DocLib component to replace PD for my specific needs.
NB This is not going to happen from me for a long while - first I want to develop ImgLib and finish RevewIt components. See blog posts for ideas on spec etc.



v0.3.0 6th July 2018
alpha version - test _very_ carefully before using for production sites
initial frontend table views working
v0.2.1 26th June 2018
frontend proof of concept
v0.2.0 24th June 2016
    backend proof of concept

Module v4.0.0 29th March 2015


New version 4.0.0 New version 4.0.0 now saves tide times to database on first call of day, thus speeding subsequent page loads. Also implemented update server.

The 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 tides.

You can also set text to appear above and below the tide times and optionally show the date.

Some hosts block use of file_get_contents() - if you get an error 'NTSLF Page Not Found' try selecting curl instead of fopen in the parameter.

Conversely some hosts do not load the curl library with php - in this case try selecting fopen instead.


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 style="width:150px; margin-left:auto; margin-right:auto; ">
<table style="width:150px;">
<tr class="oddrow">
<tr class="evenrow">
<tr class="oddrow">
<div class="moduktides_posttext">Text after table</div>
<div class="moduktides_footer">Footer text</div>



v4.0.0 29th March 2015
    saving data in database so only one call to NTSLF per day
    update server implemented
v3.4.0 27th Nov 2014
    option to select curl or fopen to get table
v3.3.1 25th Sep 2014
    strict standards compliance
v3.3.0 6th August 2014
    Version for Joomla 3.x based on v2.5.1
Module v3.3.1 25th Sept 2014  

SunUpDown is a module to display the time of sunrise and sunset today anywhere in the world.

You set the latitude and longitude of your location, and you can have an optional line of text before and after the times.

Select timezone in the parameters and the sun rise, sunset, and optional local time and date will be displayed adjusted for daylight saving.

Multiple instances can be displayed on the same page with different locations - simply in Module Manager click New and select SunUpDown and set new location parameters.

NB The optional time display is NOT a clock and the times for clock, sunrise and sunset are for the selected timezone at the moment that the module was loaded. Hence on the right the North Cornwall sunrise and sunset is 17 minutes after Greenwich, but the current time is the same. If you wait on this page for a minute the time will not change, if you leave the page displayed overnight it will show yesterday's sunrise and sunset until you refresh it.


v3.3.1 25th Sept 2014
    J3 compliance fixes
v3.3.0 17th August 2014
    First version for Joomla 3.x as minimal simple conversion from v1.7.0