RS Event 0.6.1

A WordPress plugin by Robert Sargant

What is it? ^

RS Event is a WordPress plugin that makes it quick and easy to tag your posts with dates and times that can be displayed on your blog sidebar as a list of "upcoming events".

RS Event adds a simple panel to the posting sidebar of WordPress 2.0.1 and above, allowing a date and time to be quickly attached as metadata.

0.6 now also includes widget functionality! If you don't know what a widget is, go check out WordPress Widgets.

Easy install ^

RS Event is now even easier to use through WordPress Widgets. If you haven't got it installed, go get it now. If you can't or don't want to install it, skip to the advanced instructions.

There are three very easy steps to installing RS Event as a widget:

  1. Upload the file rs-event.php to your /wordpress/wp-content/plugins/ directory.
  2. Go to the WordPress Plugins page, and activate RS Event.
  3. Go to the Presentation » Sidebar Widgets page*, and drag the RS Event widget into your sidebar.

* If this page does not appear, make sure you have the Sidebar Widgets plugin activated. If it still doesn't appear, then your WordPress theme is not widgets compatible. You can upgrade the theme to accept widgets yourself by following these instructions (harder) or using the advanced install instructions (easier).

A sample output in the blog sidebar

The default RS Event display in the blog sidebar

Advanced install ^

Calling it an "advanced install" is a bit of a lie, as it's still pretty easy. There are still just three small steps, but one involves fiddling directly with the template.

  1. Upload the file rs-event.php to your /wordpress/wp-content/plugins/ directory.
  2. Go to the WordPress Plugins page, and activate RS Event.
  3. Go to the Presentation » Theme Editor page, open up the Sidebar file and make the following change:
After this text: <li><h2>Categories</h2>
  <ul>
    <?php wp_list_cats('sort...
  </ul>
</li>
Insert this: <li><h2>Events</h2>
  <?php rs_event_list() ?>
</li>

If your theme's sidebar file does not look anything like this, then you're going to have to poke about and work out how to insert it yourself. Sorry, I can't help on a theme-by-theme basis.

Using it ^

To add events to the list, simply add a date to a post in the RS Event sidebar box when editing or creating a post.

The interface in the WordPress post editor

The RS Event tag editor

The Day, Month and Year fields are mandatory, while the Hour and Minute fields are optional. However, if you use any time-related formating details when customizing the output, dates without hours and minutes set will appear as 12 midnight.

Customizing it ^

If you installed RS Event as a widget, everything is customizable through the widget options panel. If you used the advanced install, jump to advanced customizing

The widget options panel

The RS Event widget options panel

These are the meanings of the various options you can set:

Customizing it (advanced) ^

If you aren't using it as a widget, you're going to need a tiny bit of PHP knowledge for this, but copying and pasting the code below should work just fine :)

The rs_event_list function accepts a single optional argument, an associative array of various things you want to customize. All of these array elements are also optional.

To customize the output, call rs_event_list like this:

$rs_event_arg = array
(
  "timespan"      => 28,
  "date_format"   => "jS M 'y",
  "time_format"   => "g:i A",
  "group_by_date" => true,
  "event_html"    => "<a href='%URL%'>%TITLE% (%TIME%)</a>",
  "max_events"    => 0,
);

rs_event_list($rs_event_arg);
The array key names that you can use to customize it are listed above, in brackets after the option's name.

Update history ^

Who is this by? ^

RS Event was written by Robert Sargant, a Physics undergraduate with a bit too much free time.

RS Event is licenced under the GPL (GNU Public License) Version 2.

Comments and suggestions are appreciated. As are donations :P

For more plugins, odds and sods, go to www.sargant.com