=== RS EVENT multiday ===
Contributors: wp-lefty
Donate link: http://dalking.de/rs-event-multiday/
Tags: widget, plugin, manage events, event widget, events, event, rs event, multiday
Requires at least: 2.7
Tested up to: 3.0
Stable tag: 1.2
== Description ==
"RS EVENT multiday" is a modification of "RS EVENT" by Robert Sargant.
The plugin offers the possibility to add a "RS EVENT multiday" widget to the sidebar of your blog.
It allows you to show a list of upcoming and/or past events.
"RS EVENT multiday" includes three different functions, which can be used in templates.
rs\_event\_list(), rs\_event\_post(), rs\_event\_id()
**FUNCTIONS**
1. rs\_event\_list()
This is the function used for the widget. Of course, it can be used in templates as well.
It prints an unordered list of events according to the parameters given to it (see below).
Both, the `
` and the `- ` include class="rsevent", so you can costumize the output with stylesheets.
Furthermore, the output can be customized with the parameters "html\_list\_v1", "html\_list\_v2", "html\_list\_v3" and "html\_list\_v4".
For details see the parameters-section below.
1. rs\_event\_post()
This function should be used in the single-post-template (usually the file single.php of your theme).
It prints the date of the event.
The output can be customized with the parameters "html\_post\_v1", "html\_post\_v2", "html\_post\_v3" and "html\_post\_v4".
For details see the parameters-section below.
Note: If you just want to get the return values from rs\_event\post(), so they do not get printed, you should use the function rs\_event\_post\_return(). (This might be useful for e.g. Thematic themes.)
1. rs\_event\_id()
This function returns an array with IDs of posts, which include event-data. This array of IDs can then be used in other functions.
Each function can be customized by parameters.
**PARAMETERS**
**title**
*(string)* The widget-title in your sidebar. Not used, when the function is added to a template.
*default value: 'Upcoming Events'*
**timespan**
*(integer)* The maximum distance into the future events will be retrieved for, in days.
*default value: 365*
**history**
*(integer)* The maximum distance into the past that events will be retrieved for, in days. This can also be set to a negative negative number, e.g. -2 to prevent events that are occuring in the next two days from appearing.
*default value: 0*
**date\_format\_1**
*(string)* The style in which the date is formatted. date\_format\_1 is used for single-day events, for the end date of multi-day events, and for the start date of multi-day events if the two dates are NOT within the same year.
*default value: 'd.m.Y'*
**date\_format\_2**
*(string)* The style in which the date is formatted. date\_format\_2 is used for the start date of multi-day events if the two dates are within the same year.
*default value: 'd.m.'*
**time\_format**
*(string)* The style in which the time is formatted.
Note: 'second' cannot be entered for event time and must not be used because of variable $fake\_second (used to mark empty time value.)
*default value: 'H:i'*
**html\_list\_v1**
*(string)* Used for rs\_event\_list(). Formats the output, if first date and time of an event is entered with "multi-day"-option off.
*default value:*
' `
%DATE% @ %TIME%
%TITLE%
» read more «` '
**html\_list\_v2**
*(string)* Used for rs\_event\_list(). Formats the output, if first date but no time is entered with "multi-day"-option off; if %TIME% is used here anyway (which usually does not make any sense), output of %TIME% equals "--:--".
*default value:*
' `
%DATE%
%TITLE%
» read more «` '
**html\_list\_v3**
*(string)* Used for rs\_event\_list(). Formats the output, if "multi-day"-option is on and first date and end date is entered.
*default value:*
' `
%DATE% - %ENDDATE%
%TITLE%
» read more «` '
**html\_list\_v4**
*(string)* Used for rs\_event\_list(). Formats the output, if "multi-day"-option is on but no end date is entered.
*default value:*
' `
%DATE% (multi-day)
%TITLE%
» read more «` '
**html\_post\_v1**
*(string)* Used for rs\_event\_post(). Formats the output, if first date and time of an event is entered with "multi-day"-option off.
*default value:*
' `%DATE% @ %TIME%
` '
**html\_post\_v2**
*(string)* Used for rs\_event\_post(). Formats the output, if first date but no time is entered with "multi-day"-option off; if %TIME% is used here anyway
(which usually does not make any sense), output of %TIME% equals "--:--".
*default value:*
' `%DATE%
` '
**html\_post\_v3**
*(string)* Used for rs\_event\_post(). Formats the output, if "multi-day"-option is on and first date and end date is entered.
*default value:*
' `%DATE% - %ENDDATE%
` '
**html\_post\_v4**
*(string)* Used for rs\_event\_post(). Formats the output, if "multi-day"-option is on but no end date is entered.
*default value:*
' `%DATE% (multi-day event)
` '
**max\_events**
*(integer)* The maximum number of events to show. If this is set to 0, then all events will be shown.
*default value: 0 (i.e. show all)*
**group\_by\_date**
*(integer)* If this is set to No (value: 0), then each event will be separated into individual list element ` - `. If this is set to Yes (value: 1), then the Date Formatting is checked for each post. Events with the same Date Formatting value are grouped together in a single `
- ` element, with the date first and subsequent posts separated by break rules `
`.
By setting the Date Formatting to different values, you can group by different date properties, e.g. use "Y" to group by year, or "W Y" to group by week.
*default value: 0 (i.e. "no")*
**no\_events\_msg**
*(string)* The output when the are no events within the set timespan.
*default value: 'no upcoming events'*
**sort\_order**
*(string)* Whether to list the events in ascending (value: 'ASC') or descending (value: 'DESC') date order.
*default value: 'ASC'*
**category**
*(integer)* Show only events listed against posts in the category with this ID number. If this is set to 0, then all events will be shown.
*default value: 0 (i.e. show all)*
**Customizing the html-output**
The values "html\_list\_vX" and "html\_post\_vX" can be styled both for the widget and within templates.
Simply use html-code and the following parameters:
**%URL%**
the URL of the post with the event
**%DATE%**
the start-date of the event, formatted as date\_format\_1 in \_v1, \_v2 and \_v4 and as date\_format\_2 in \_v3.
**%ENDDATE%**
the end-date of the event, formatted as date\_format\_2
**%TIME%**
the event time, formatted as time\_format
**%LOCATION%**
an ordinary text value which might be used to enter e.g. the location of the event
**%TITLE%**
the title of the post.
**%FULLTEXT%**
the entire text of the post.
**%EXCERPT%**
the post excerpt.
**%ID%**
the ID of the post.
**How to pass on parameters to one of the functions**
Here is an example of how to pass on some parameters to the function rs\_event\_list(), when used within a template.
It works similar with rs\_event\_post() [and rs\_event\_post\_return()], just use the html\_post\_vX parameters instead of the html\_list\_vX parameters.
Note: Parameters for the widget can be simply passed via the Widget-Panel of your blog-backend.
` 60,
'date_format_1' => 'm|d|Y',
'date_format_2' => 'm|d',
'html_list_v1' => '%DATE%, %TIME%
%TITLE%',
'html_list_v2' => '%DATE%
%TITLE%',
'html_list_v3' => '%DATE% to %ENDDATE%
%TITLE%',
'html_list_v4' => '%DATE% (multiday!!!)
%TITLE%',
'max_events' => 4,
);
rs_event_list($argsevent);
?>`
== Installation ==
This section describes how to install the plugin and get it working.
1. Download the zip-file and unpack it.
1. Upload the folder `rs-event-multiday` to the `/wp-content/plugins/` directory of your blog.
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Add the Widget "RS EVENT multiday" to your sidebar and customize it AND/OR
1. Place the function rs\_event\_list(), rs\_event\_post() and/or rs\_event\_id() in your template(s) and customize it.
See "Description" for details.
== Frequently Asked Questions ==
Q: Is an event nothing else then an ordinary post with some (hidden) meta values?
A: Yes, it is this simple!
Please see/search/use the comments on http://dalking.de/rs-event-multiday/
A lot of questions are answered there already (including the one above).
== Screenshots ==
1. Customization of the Widget RS EVENT multiday.
2. Add event data to your post at the edit-post-panel.
3. This is how the widget might look like in your sidebar.
== Changelog ==
Update History by Florian Meier for RS EVENT multiday
= 1.2 (26th May 2010) =
* major changes
* $query_string completely renewed in functions rs_event_list() and rs_event_id()
in order to improve performance
* Javasript removed in widget control panel (did not really work anyway)
* Norwegian translation added (thanks to Barbara)
= 1.1beta (22nd April 2010) =
* some major changes
* intruduction of the function rs_event_post_return()
in order to make it compatible to Thematic themes
(thanks to Michelle McGinnis, www.thefriendlywebconsultant.com)
* the possibility to mark pages as events is added
i.e. the RS EVENT multiday custom box is now visible on the edit-pages page
* the possibility to add a location to the event is added
* a tiny facelift to the custom box
* Romanian translation added (thanks to Horia)
= 1.0.1 (26th May 2009) =
* bugfixes
* bugfix of function rs_event_save()
* bugfix of function rs_event_list(); ORDER BY-clause added at $query_string1
= 1.0 (20th April 2009) =
* initial release of RS EVENT multiday
* function rs-event-delete() removed
* option "remove from list with start- or end-date" added
meta_keys _rs_event_ts and _rs_event_start added with option "remove from list"
* event data is put in an array and stored with the meta-key _rs_event_array
(data stored with RS EVENT <= v.0.9.8 is still recognized)
* meta_keys are no longer visible in "edit post"-panel
= 0.9.8 (14th April 2009) =
* first beta release of RS EVENT multiday
* function rs-event-post() added
* function rs-event-id() added
* option "multiday" added
== Upgrade Notice ==
= 1.2 =
Version 1.2 includes the location(info) feature. Please upgrade, if you want to add a location or any other info to an event.
= 1.1beta =
BETA version only. Includes location(info) feature.
= 1.0.1 =
Version 1.0.1 includes two bugfixes.
= 1.0 =
Initial release of multiday version. Please upgrade, if you want to use multiday feature.