Simple Calendar Wordpress plugin

Simple Calendar allows you to add, manage and show events on your blog in a really simple way. The goal was to make a calendar plugin that doesn’t requires endless setup or 10 minutes for every event you add. I know there are more advanced plugins that offer full customization and advanced layouts. Simple Calendar will not give you that. Simple Calendar was made to be simple. It’s as simple as that.

Simple Calendar for Wordpress

Go ahead and download Simple Calendar now! Or continue reading about the features.

Why should I use Simple Calendar?

Are you looking for a calendar plugin that is actually usable? A plugin that doesn’t try to cram in every imaginable feature in a too cluttered interface? Do you want nothing more than to add an event on a certain date and time, and then it’s done?

If so, the Simple Calendar Wordpress plugin is made for you. Simple Calendar was created to make it as easy as possible to add events to a calendar and show them on your blog. By default you may simply use the widget to show upcoming events. If you’re more into programming you can use call the function ahsc_show_events($args) as described below.

Features

  • A really simple interface for adding events
  • A widget listing upcoming events
  • Internationalization
  • Possible to show events on a single page

Localization

Simple Calendar fully supports localization. Simple Calendar is currently translated to the following languages:

  • (Swedish is coming)

If you have made a translation, you’re free to send me an email and you will be featured as a contributor and listed on this page.

Note: the POT file is coming as soon as the plugin is accepted into the Wordpress plugin respiratory

How to use Simple Calendar

For use in e.g. a sidebar there is a widget that shows upcoming events. Just drag it to where you want it, chose a title and number of events to show and you’re done! If you are displaying all events on a single page you may also want to paste the url in last field.

Simple Calendar - add event

If you want to show the calendar on any page, just write <?php echo ahsc_show_events($args); ?> in a template file.

Parameters in ahsc_show_events()

The following is a list of parameters and values allowed when calling the ahsc_show_events() function.

  • before_list
    Default: <ul class=”ahsc_calendar”>
    Usage: What should be written before the list of events
  • after_list
    Default: </ul>
    Usage: What should be written after the list of events.
  • before_event
    Default: <li>
    Usage: What should be written before each event.
  • after_event
    Default: </li>
    Usage: What should be written after each event.
  • before_event_title
    Default: <h4>
    Usage: What should be written before the title of each event.
  • after_event_title
    Default: </h4>
    Usage: What should be written after the title of each event
  • before_event_date
    Default: <span class=”date”>
    Usage: What should be written before the date of each event.
  • after_event_date
    Default: </span>
    Usage: What should be written after the date of each event.
  • before_event_desc
    Default: none
    Usage: What should be written before the content of each event.
  • after_event_desc
    Default: none
    Usage: What should be written after the content of each event.
  • begin
    Default: current_date()
    Usage: The oldest date any returned event may occur on.
    Allowed values: date formatted as YYYY-MM-DD or ‘current_date()’.
  • end
    Default: 2100-01-01
    Usage: Events may occur on any date before, but not including, this date.
    Allowed values: date formatted as YYYY-MM-DD or ‘current_date()’.
  • number
    Default: 5
    Usage: Maximum number of events to be shown.
    Allowed values: any integer. 0 (zero) will return unlimited number of events.
  • order
    Default: ASC
    Usage: In which order the events should be sorted in.
    Allowed values: ASC or DESC
  • orderby
    Default: ‘Begin’
    Usage: Which column the events should be sorted by.
    Allowed values: Id, Begin, Begin_time

Parameters syntax

The syntax for the parameters is based on the wp_parse_args() function which means you add arguments in the same way as in for example a query_string().

<?php echo ahsc_show_events(‘number=10&order=DESC’); ?>

Please note that the parameters currently are NOT sql-escaped (because I see no security issue as long as the plugin is used as intended). Thus, if you use data in the parameters sent by a user, make sure the input is secure.

Examples

Show a list of all events that occurred in the past:

<?php echo ahsc_show_events(‘number=0&begin=2000-01-01&end=current_date()&order=DESC’); ?>

Show today’s events (not actually tested):

<?php
    $args = 'end=' . date('Y-m-d',strtotime('+1 day'));
    echo ahsc_show_events($args);
?>

Show upcoming events with h2 instead of h4 headers:

<?php echo ahsc_show_events(‘before_event_title=<h2>&after_event_title=</h2>’); ?>

Changelog

0.20 The first public release

Download Simple Calendar Now!

Ettiketter: , , ,

Jul 12 2010

0

Kommentera

Andreas Hultgren | andreas@andreashultgren.se | 0768 - 63 03 09