WPListCal allows you to list upcoming events on your blog in a list or table format.
WPListCal allows you to list upcoming events on your blog in a list or table format. It plugs straight into the WordPress admin pages to let you keep track of events just like posts and pages. You can then list events on a page or post using a shortcode, show events in your sidebar with a widget, or incorporate events into your theme files using a PHP function call.
wplistcal
folder to the /wp-content/plugins/
directorywplistcal
folder to the wp-content/plugins/
directoryIf you want to list your events on a page or post, use the [wplistcal] shortcode. Use the parameters in the example below. Leave out parameters to default to the options defined in the WPListCal settings page. (1.2 or later only)
Example:
[wplistcal display_mode="list", event_format="%NAME%", date_format="M j, Y g:ia", max_events="-1", show_past_events="false", advance_days="-1", event_order="asc", hide_same_date="true", date2_time_format="g:ia", no_events_msg="No events!"]
If you want to list your events on a page or post, insert the tag <!--wplistcal-->
in the body of the page/post
If you want to list your events somewhere in your theme files, insert <?php echo wplc_show_events(); ?>
You can set special parameters to overwrite the default options if you use the PHP function call.
All parameters are optional, but you must preserve the ordering by passing in
null
for options that you want to use defaults for.Display Mode (string):
'list'
or'table'
Event Format (string): The format of the list entries if Display Mode is set to
'list'
. You can use the following variables: %NAME%, %LINK%, %LINKEDNAME%, %START%, %END%, %DESCRIPTION%, %AUTHOR%, and %EXPORTURL%. You can also make statements dependent on a variable by wrapping them in curly brackets (ex. {Date: %START%}). See "Dependent Statements" below for more information.Date Format (string): The format to display the start and end date and time. Uses the same date formatting that WordPress uses.
Max. Events (int): The maximum number of events to display, -1 for unlimited.
Show Past Events (boolean): true to show all events, false to show only current and future events
Maximum Advanced Notice (int): How many days in advance to display events, -1 for unlimited.
Event Order (string):
'asc'
to show the closest event first or'desc'
to show the furthest event first.Hide Same Date (bool): Format the end date with the format string defined in the next parameter if it is on the same day as the start date.
Date 2 Time Format (string): If Hide Same Date is enabled, use this format string for the end date.
No Events Message (string): If there are no events, show this string instead, leave blank for none.
Example:
<?php echo wplc_show_events('list', '%LINKEDNAME%: %START% - %END%{<br />%DESCRIPTION%} <a href="%EXPORTURL%">(export)</a>', 'M j, Y g:ia', -1, false, 30, 'asc', true, 'g:ia', 'Sorry, no events'); ?>
You can make a statement dependent on the existence of a variable by wrapping it in curly brackets. By default, the statement will only print if the first variable in the statement is not empty. You cannot have nested dependent statements.
Example 1:
The statement in the curly brackets won’t print if %LOCATION% is empty
%TITLE%{ at %LOCATION%} on %START%
Example 2:
To print a literal curly bracket, escape it with ‘^’
%TITLE%{ at %LOCATION} ^{new^}
Example 3:
To skip a variable when determining the dependent variable, escape its ‘%’ characters with ‘^’. This method also works to print a literal ‘%’ inside a dependent statement. In this example, the statement in the curly brackets will print if %LOCATION% is not empty. Note that %AUTHOR% will be properly substituted even though it is escaped.
%TITLE%{ hosted by ^%AUTHOR^% at %LOCATION%}
Example 4: (invalid)
This example is invalid. You cannot have nested dependent statements.
%TITLE{ at %LOCATION%{ on %START%}}
Example 5:
However, you can have multiple dependent statements in a format.
%TITLE%{ hosted by %AUTHOR%}{ at %LOCATION} on %START%
On activation time, the plugin adds a table called <prefix>_wplistcal that stores all your events.
Before version 1.0.6, on deactivation, the events table is dropped, so if you want to save your event data, back up the table before deactivating the plugin.
As of 1.0.6, deactivating the plugin has no effect on your data. When upgrading to 1.0.6, DO NOT deactivate the plugin until you have uploaded the new version of wplistcal.php
WPListCal is specialized to provide clean list or table based output for you to style or reparse any way you’d like. Other calendar plugins force you to use a gregorian calendar view which may be inappropriate for many applications.
Events created before upgrading to version 1.1 did not have those values set, therefore WPListCal marks them as N/A.
This is a known bug in PHP (id# 44209) and was fixed in version 5.2.6. The specific issue was that strtotime() did not support 64-bit timestamps.
Yes, WPListCal is packaged with iCalcreator which is released under the GNU LGPL
Go to WordPress General settings and reset your timezone to a city rather than a manual UTC offset.
Great, I’m glad to hear feature requests. Just post a comment on the plugin’s homepage.
htmlspecialchars_decode
function threw errorshort_open_tag
disabledwplistcal.php
is in a subfolderswitcheditors not defined
error)wplc_alt
applied to it to allow alternating row formattingwplc_show_events
was brokenstr_ireplace()
for servers not running PHP5