This Day In History

Description

This Plugin allows you to enter and manage different kinds of historical events that you then display in via a This Day In History widget or shortcodes.

Shortcodes

There are two shortcodes. tdih shows output as a list similar to the widget and tdih_tab shows output as a table.

tdih

You can add a tdih shortcode to any post or page to display a list of events as per the widget.

There are ten optional attributes for this shortcode

  • show_age (0, 1) – 1 shows the age in years of the event in brackets after the title and 0 does not (default).
  • show_link (0-2) – 0 shows a more link if there is more to show, 1 links the title if there is more to show and 2 always links the title.
  • show_type (0, 1) – 1 shows event types (default) and 0 does not.
  • show_year (0, 1) – 1 shows the year of the event (default) and 0 does not.

  • type – enter a type to show only events of that type. Shows all types by default.

  • day (1-31) – enter a day to show only events on that day. Shows all days by default.
  • month (1-12, c) – enter a month to show only events in that month. Shows all months by default.
  • year (-9999 to 9999, 0) – enter a year to show only events in that year. Shows all years by default.
  • period (t, m, y) – show events for today, tomorrow and yesterday. Shows today’s events by default.
  • classes – enter one or more space separated classes which will be added to the table tag.

Example use:

  • [tdih] – This shows year and event types for all event types for today’s events.
  • [tdih show_type=0 type=birth] – This shows year and event but not type for the event type (slug) of birth.

tdih_tab

You can add a tdih_tab shortcode to any post or page to display a table of events.

There are eleven optional attributes for this shortcode:

  • show_date (0, 1) – 1 shows the date (default) and 0 does not.
  • show_dow (0, 1) – 1 shows the day of the week and 0 does not (default).
  • show_head (0, 1) – 1 shows a header row (default) and 0 does not.
  • show_link (0, 1, 2) – 0 shows a more link if there is more to show, 1 links the title if there is more to show and 2 always links the title.
  • show_type (0, 1) – 1 shows event types (default) and 0 does not.

  • type – enter a type to show only events of that type. Shows all types by default.

  • day (1-31) – enter a day to show only events on that day. Shows all days by default.
  • month (1-12, c) – enter a month to show only events in that month. Shows all months by default.
  • year (-9999 to 9999, 0) – enter a year to show only events in that year. Shows all years by default.
  • period (a, c, l, m, n, t, w, y) – t, m, y show events for today, tomorrow and yesterday. c, l, n, w show events for current, last, next and ISO week. a show all events. Shows today’s events by default.
  • classes – enter one or more space separated classes which will be added to the table tag.

NB:

  • day of the week will never be shown if the date is not shown.
  • Setting period will override and values for day, month and year.
  • day, month and year can be combined.
  • year=0 will display events with no year
  • month=c will display the current month
  • period=c, l or n show a seven day period with the current day as the middle, last, first day.

Example use:

  • [tdih_tab] – This shows a full list of events in date order and includes the event type.
  • [tdih_tab show_types=0 type=birth classes=’content dark’] – This shows events but not type for the event type (slug) of birth. ” content dark” will be added to the table’s class.
  • [tdih_tab day=20 month=8] – This shows events on 20th August in any year.

Installation

Installing is pretty easy takes only a minute or two.

  1. Upload ‘this-day-in-history’ directory to your ‘/wp-content/plugins/’ directory.

  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

  3. On the ‘Widgets’ sub-menu of ‘Appearance’ you will find a new widget type called ‘This Day In History’; alternatively use a shortcode in a post or page.

  4. Add this widget, to your themes widget display areas, select a title and click Save.

  5. Enter historic events via the new ‘Historic Events’ admin page. These will be automatically displayed by the widget on the anniversary of the day that they occurred.

Reviews

Great Plug In

This was exactly what I was looking for for my baseball historical site. It makes it easy to add events. Thank you.

Basic

The plugin does what is says and that is it. Some more functionality or design would be nice. Maybe import/export database could be very nice to quickly backup or update the plugin. Also navigation like what happend yesterday or tomorrow would also be nice.

Read all 18 reviews

Contributors & Developers

“This Day In History” is open source software. The following people have contributed to this plugin.

Contributors

Translate “This Day In History” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

3.1.4

Fixed issue when filtering widget by type (bug fix)

3.1.3

  • Fixed issue with view link in admin screen (bug fix)

3.1.2

  • Fixed issue choosing only one event in the widget (bug fix)
  • Fixed checkboxes not saving correctly in the widget (bug fix)

3.1.1

  • Fixed issue with admin order by when not using DD-MON-YYYY (bug fix)
  • Minor CSS update for the admin screen (bug fix)

3.1

  • Added period type a to list all events
  • Fixed issue with a php7.2 depreciation during plugin activation (bug fix)

3.0

  • Updated admin screens and added a column showing last modified date
  • Fixed issue with list urls after editing an event (bug fix)
  • Added default template for showing an event
  • Added ability to use the more tag to have an extended event desciption
  • Removed no event message from shortcodes if not set in settings (bug fix)
  • Added class option to tdih shortcode (renamed classes option to class in tdih_tab shortcode)
  • Added support for BC dates (range is now 9999 BC until 9999 AD)
  • Events are now optionally searchable
  • Event ordering in the admin screens in now fixed to year and so the date order option has been removed
  • Added ISO week as a period to the tdih_tab shortcode
  • Added day of week as an option to the tdih_tab shortcode
  • Added the day and month parameters to the tdih shortcode to allow choosing any day of the year
  • Added max_rows option to tdih shortcode and widget to limit the number of events shown

2.2.1

  • Fixed Issue with current month in the shortcode (bug fix)

2.2

  • Added the ability to use c for the current month in the tdih_tab shortcode
  • Added the option to include the event age (useful for birthdays)
  • Fixed the date sorting issue in the admin screen (bug fix)

2.1.2

  • Updated for 4.5 compatibility (add_menu_page)

2.1.1

  • Fixed issue with accessing Event Types in WordPress 4.4

2.1

  • Added support for entry of early dates without leading zeros (e.g. 4-10-20 becomes 0004-10-20)
  • Updated shortcode help screen text

2.0

  • The shortcode table date format is set via the TDIH option (bug fix)
  • Updated shortcode help screen to remove commas from the example (bug fix)
  • Split the shortcode into two (tdih) like the widget and (tdih_tab) table format
  • It is now possible to enter a date without a year (enter 0000 for the year)
  • Added option to show events for yesterday or tomorrow instead of today
  • Added an option to allow sorting of the administration table of events by day, month or year first

1.1

  • Fixed pagination issues with WordPress 4.0
  • Moved number of events shown to a screen option
  • Overhaul of admin screens
  • Removed custom table migration code for early versions

1.0

  • First production release
  • Added show_all to the shortcode
  • Added Option for the text displayed when there are no events

0.9.3

  • Fixed Admin Bar bug in 3.6

0.9.2

  • Improved function naming for cross plugin compatibility
  • Fixed html5 date input issue with Chrome

0.9.1

  • Fixed bug with search on admin list

0.9

  • tdih shortcode added
  • help updated

0.8.2

  • Fix for duplicate events when using post types

0.8.1

  • Fix for activation hook not firing on upgrade

0.8

  • Added event types
  • Events now stored as posts

0.7

  • Added widget option to show or not show the year

0.6

  • Added options page
  • Added option for events per page and date format
  • Removed 255 character limit for event names
  • Change event name input to a textarea
  • Some minor html bug fixes

0.5

  • Fix for editing entries with double quotes (like some html code) – more magic quotes misery

0.4

  • Fix for local (blog time) rather than server time

0.3

  • Fix for miserable magic quotes

0.2

  • Name changed from Today In History
  • CSS layout updated
  • Help text updated
  • Fixed sorting after edit issue

0.1

  • Initial Release