Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Home

ms-studio edited this page · 23 revisions

What the plugin does

This plugin (MEM or Minimalistic Event Manager) is intended for theme authors and developers, who want a simple, robust and flexible solution for managing event dates.

Basic functionality

The plugin offers the following functionality:

  • Dates can be attached to any post type: Posts, Pages, Custom Post Types... (optionally, they can be restricted to specific content types).
  • Dates can be of three types: start dates, end dates, repeating dates.
  • There is no mandatory date format: Time, Day, and Month are optional. An event date could be "January 1969", or just "1969".

Note: we are talking about event dates, but it could be any type of date - publication dates, product release dates, birth dates...

Technical implementation

Technically, the MEM plugin stores the dates as ordinary Custom Fields, in a "machine-readable" format (such as "2012-11-23 13:37"). This gives you absolute freedom for displaying your events in your theme:

  • You can query for specific date ranges by using the meta_key / meta_compare parameters.
  • You can use the php date function to display the date in any possible manner (or date_i18n to localize it properly).

Plugin options

The plugin has two settings that can be modified with a few lines in your functions.php file:

  • You can limit it to specific post types.
  • You can use an "alpha" mode, which means that you won't have the dropdown menus, just a blank input field for each date. This can be useful if you prefer to enter 2012-01-31 strings manually rather using the dropdown, or if you need to enter dates that don't fit the predefined format.

See the plugin options page for the full instructions.

Other details

  • The plugin uses the generic WordPress date picker (same as for the post publication date).
  • The plugin comes with a .po file, so it can be easily localized into your language.
  • The saving of the fields is ajaxified (just like the normal custom fields), so the dates are saved immediately, you don't even need to update the post.

What the plugin doesn't do

The MEM plugin works as a simple interface for entering those dates into custom fields, but it won't do anything on the public side of your theme. What happens with the dates on the public side is entirely up to you. You must decide how to display the dates, and you will have to edit your theme files for that.

If you aren't sure how to achieve this, this wiki will provide a collection of examples to get you started.

Usage:

Code examples:

Miscellaneous links:

Something went wrong with that request. Please try again.