New Version – 0.3.1
Older Version – 0.3
The jmc_event_manager is a plugin/hack for textpattern created to allow users to create events at various venues. It has been done so completely by ‘ju:femaiz @ euphemize.net. Any comments or suggestions would be appreciated and the support thread at forum.textpattern.com is available here. While this help file has attempted to be as thorough as possible, things do fall through the cracks. Since jmc_event_manager is (still) in a beta stage, there may exist some bugs in the operation. Additionally, the plugin/hack is an ongoing project and may be updated from time to time. To ensure that you have the most up to date version, please ensure you visit the support forum thread regularly.
jmc_event_manager is distributed under the GNU General Public License. For more information please visit GNU General Public License.
The installation package is a simple process. For those of you upgrading, there are additional requirements on your behalf due to the addition of categories to jmc_event_manager.
For those undergoing a fresh install, please go through the following steps:
- Turn the plugin to active
- Go to Content and Event Manager tabs
- Do a little dance and you’ll find that you’re ready to go!
Upgrade on Past Version
As with all updates, please backup your database, then go through the following steps:
- Through your database admin, add the following columns to the
set as NULL (or equivalent on your Textpattern installation)
- Activate plugin
- Go to Content and then Event Manager tab
- Do a little jig and you should be right + ready to go!
Introduction to the Event Manager
The event manager has two components – the admin side controls and the public side output. On installation it will ensure that a database exists, the tables exist, installing if they’re missing, and that an entry exists in the tables associated with the event manager (in this way I consider it a hack).
Event Manager Tab
When you go to the event manager tab you will be presented with a list of events that have been entered. Currently, the “events per page” is a mirror of that used on the article page, and any alteration to the “events per page” will also alter the “articles per page” under the “articles tab”.
There are currently four top level buttons for the Event Manager:
- Event Manager – Manages the actual events
- Venue Manager – Manages the venues for the events. Each event must be “at” a venue
- Category Manager – Manages the new categories available for the plugin
- RSS Feed – For future versions will allow access to alterations to the RSS format
The default page of the plugin’s tab. Gives two options:
- Add Event
- Event Listing (default)
- Event Name
- Other Bands
- Other Info
- Start Date + Time
- Finish Date + Time
Note: Event must Finish after it begins.
Basic listing of all events past, present and future.
Gives two options:
- Add Venue
- Venue Listing (default)
Basic listing of all venues.
Gives two options:
- Add Category
- Category Listing (default)
Allows the administrator to add an category. Only the category name is required.
Basic listing of all categories.
Still to come in future updates. Unsure as of yet as to the design, layout and options. If you have ideas, please contact me through the jmc_event_manager plugin forum thread.
Creating Event Manager Output
The jmc_event_manager uses the forms in textpattern to create the template for the output. You may use any form you like, providing that it has the relevant details, i.e. you can call it from within an article, from a page or even from a form itself (yet to be tested).
Calling the Event Manager
In order to call the event manager, a simple Textpattern style tag is used:
< txp :jmc_events form="form_name" />
The form_name is the name of the form you would like to call as the template. jmc_events cycles through all events answering its restrictions, that is it cycles through each relevant entry.
There are many options as to how to limit the number and type of events being called. The following are the options, given with details also of the default (if any).
Formatting for venues is done independently of, or within, the event form.
Used to restrict the number of events.
- Limit to ten events:
< txp :jmc_events form="form_name" limit="10" />
Used to restrict the events to those that will start in the future.
- Limit to future:
< txp :jmc_events form="form_name" future="1" />
Used to restrict the events to those that will start in the past.
- Past only:
< txp :jmc_events form="form_name" past="1" future="0" />
- Past and future:
< txp :jmc_events form="form_name" past="1" future="0" />
Used to restrict the events to those that will have started, but have not yet finished.
- Current only:
< txp :jmc_events form="form_name" current="1" future="0" />
- Current and Future:
< txp :jmc_events form="form_name" current="1" future="1" />
- Current and Past:
< txp :jmc_events form="form_name" current="1" past="1" future="0" />
- Current, Past and future:
< txp :jmc_events form="form_name" current="1" past="1" future="1" />
Used to restrict the events to those of a particular category or categories.
- Single category (where category’s ID=2):
< txp :jmc_events form="form_name" category_id="2" />
- Multiple categories (where category’s ID is in array(2,4)):
< txp :jmc_events form="form_name" category_id="2,4" />
Valid ID from txp_jmc_event_category
Used to restrict the events to those that will occur at a specified venue or venues.
- Single venue (where venueâ€™s ID=2):
< txp :jmc_events form="form_name" venue_id="2" />
- Multiple venues (where venueâ€™s ID is in array(2,4)):
< txp :jmc_events form="form_name" venue_id="2,4" />
Valid ID from txp_jmc_event_venue
Used to restrict the events to a particular event or group of events. Please note that this overrides all other variables!
- Single event (where eventâ€™s ID=2):
< txp :jmc_events form="form_name" event_id="2" />
- Multiple events (where eventâ€™s ID is in array(2,4)):
< txp :jmc_events form="form_name" event_id="2,4" />
Valid ID from txp_jmc_event
Puts in place the MySQL sort by a variable name. Used in conjunction with sort_order.
ID | name | start_DateTime | finish_DateTime | AuthorID | LastModID | VenueID | Price | OtherBands | OtherBands_html | OtherInfo |OtherInfo_html | CategoryID
Determings the order in which the events will be displayed.
Events and venues each have their own forms with their own variables.
<txp :jmc_event_name />
<txp :jmc_event_id />
<txp :jmc_event_price />
Inserts the html for other band information.
<txp :jmc_event_otherbands />
<txp :jmc_event_otherinfo />
Venue form options can be called either from the event form directly, or from a separate form using the tag: <txp :jmc_venue form=“form_name” />
<txp :jmc_venue_name />
<txp :jmc_venue_id />
Venue Address 1
<txp :jmc_venue_address1 />
Venue Address 2
<txp :jmc_venue_address2 />
<txp :jmc_venue_suburb />
<txp :jmc_venue_state />
<txp :jmc_venue_country />
<txp :jmc_venue_postcode />
<txp :jmc_venue_phone />
<txp :jmc_venue_url />
<txp :jmc_venue_email />
Venue Other Information
<txp :jmc_venue_otherinfo />
In order to execute a few more options, there is a requirement to manipulate things such as dates.
Event times give output of either the start or finish date and time of an event and uses the PHP DateTime functionality for formatting.
< txp :jmc_event_time php_date="phpDateFunction" />
start (if start=0 then gives finish time)
Checks to see if a variable exists. If it does not, then deletes what the tags enclose.
< txp :jmc_if_variable variable="variableName">< / txp :jmc_if_variable>Options:
any in the database for a particular event or venue
The following future updates are being considered or worked on:
- RSS feed for the Event Manager (many of you will find this a big bonus!)
- Proper Admin Panel (this will deal with some time issues, where currently have allowed only 00, 15, 30 and 45 minutes for the time, future options will allow the administrators to decided how they want the minutes to be limited).
- Venue dropdown and lists by country then state (where applicable).
- Dropdown in Add Venue to use country codes
- Install pack(s) with New South Wales and Victorian live music venues (I’m an aussie after all!).
Additional Features and Bug Fixes
The following bugs have been fixed and features added:
- Current event option for calling of