OfficeTrio: The Integrated ECommerce Solution OfficeTrio: The Integrated ECommerce Solution OfficeTrio: Features OfficeTrio: User Manual OfficeTrio: Testimonials OfficeTrio: The Demo is Offline! OfficeTrio: Order O3 Now
EWS is no longer available


Notice: Undefined variable: us_name in /homepages/6/d168803796/htdocs/officetrio.com/right-menu.php on line 35

Notice: Undefined variable: us_email in /homepages/6/d168803796/htdocs/officetrio.com/right-menu.php on line 35
U:
P:

Login Page

Introduction
Payments
Users
Login
Access
Categories
Products
Downloads
Deliveries
Containers
Catalog
Cart
Search
Orders
Emails
IPN
Stats

Modules
Affiliates
Content
Types
List Items
Image Upload
Scheduler
File Browser
Stock Control

Appendices
Settings
Functions
Actions
Caching



Forums
Members Area
Customers Area
Affiliates

Contribute
Installation
Contact Details
Terms
FAQ
Testimonials

Free Tutorials
Free EBooks
Free Scripts

PayPal - Accept Credit Cards Online

StormPay - Accept Credit Cards Online

PHP: Open-Source Server-Side Scripting Language

MySQL: Fast Relational Database



O3 comes with a full 30-day, no-quibble money back guarantee.



The thing always happens that you really believe in; and the belief in a thing makes it happen.
    Frank Loyd Wright




Schedules

Introduction | Settings | Creating | Updating | Events
Options | Functions | Container
Appendix: MySQL Date-Format Specifiers

Introduction

O3's Scheduler module is primarily designed for use as a bookings management system, but it can be used as a general scheduler, and is extensible through the use of Types. Schedules can be created associated with items, products or the website as a whole. Events can be added to or removed from schedules.

You can show a schedule in the catalog by passing in the parameter sitm=ScheduleName.

Schedules can be contained within content items. There are macros for displaying all O3 things within content items - so you can format them however you like. This means you can put text and formatting around a schedule, like we've done on the demo website with the 'Audio-Room Bookings' example.

You can define a set of Opening Hours for your business in the Settings. If these are defined, and the schedule is set the 'Use Opening Hours', then an additional parameter is available to your container: 'isopen' - which takes the values 'Y' or 'N'. You can use this to display different things if the store is open or closed using the O3IF macro.

O3 does not restrict placing events outside opening hours - it just gives you the mechanism to not give the option (i.e. you don't show the 'Book' button).


Settings

The settings are listed under 'Scheduler'. The sections are:

  1. Displaying Schedules - Text / Headings and Containers.
  2. Updating Schedules - Create, Update and Delete forms for Schedules & Events. Event Approve form. Schedule Add permissions. Default Schedule Status.
  3. Default View - This defines the default start & end times, & the interval duration for displaying schedules.
  4. Opening Hours - This info can be used to restrict when events may be placed - i.e. only when the business is open.

Creating Schedules

You can create schedules in the Schedules manager, or from the front end using a Create Schedule form.

In addition, schedules can be created automatically when a product is purchased - if the appropriate Create Options are set in the product definition. This is how you create booking schedules for premium list items. In this case the schedule can be copied from a template - so you can set the correct defaults, permissions etc on the schedule prior to your customer getting their hands on it.


Updating Schedules

Schedules can be updated from the front end using an Update Schedule form. You can opt to give your users access to as many of the fields as you want - you just include them in the update form. If fields aren't included in the form, they don't get updated. Note, it's not possible to blank any fields from the front-end!

Commonly, access to the Schedule Start & End times, and the Interval are required by users, although you can define a type for the schedule, and hence add any type-data fields that you want to a schedule.

Schedules can be deleted and approved, just like items and event, from the front-end - using the forms defined in the settings.


Events

Events must belong to schedules. They can be added and deleted from schedules, and they can be updated, and approved. You can define the default Status for events in the settings & if set to 'Pending' you can then have an 'Approval' step to confirm the event. This approval can be done by whoever has the permission to do it - as defined in the Schedule.

Events can be added from the front end using a Create Event form. This is defined in the settings, and can be overridden in the CREATE-EVENT# macro you use to show the form. This macro appears in the Interval section of the Schedule container and is replaced by the Create Event form...

If the schedule is set to allow 'Multiple Bookings in the same interval - the Create Event form is always displayed by the CREATE-EVENT# macro, else nothing is displayed if the interval already contains an event.

When events are added to a schedule, or changed, you can opt to send out notification emails to the schedule and event creators. This is set up in the Schedules Manager.

Important Note: When admins change events and schedules - no emails are sent out!

When updating, you can opt to give your users access to as many of the fields as you want - you just include them in the update form. If fields aren't included in the form, they don't get updated. Note, it's not possible to blank any fields from the front-end! See Appendix C for more info on actions.


Schedule Options

There are quite a few options for schedules:

General Settings
Name & Descr.Name & description
CategoryThe schedule's category - optional.
StatusThe schedule's status
StartThe schedule's start date/time
EndThe schedule's end date/tim
IntervalThe schedule's display interval (i.e. 1 HOUR, 1 DAY, 7 DAY)
Multi BookingsAre multiple events allowed in the save interval?
Default Event StatusDefault status when events are created
Event ProductTo place an event the customer buys this product
TypeThe Schedule's type & type data.
Display / Update
Schedule Update FormThe form used to update a schedule
Schedule Delete FormThe form used to delete a schedule
Schedule Approve FormThe form used to approve a schedule
Event Create FormThe form used to create an event
Event Update FormThe form used to update an event
Event Delete FormThe form used to delete an event
Event Approve FormThe form used to approve an event
Add Confirm TextIf placing the event requires confirmation, a form is placed in the $o3msg variable - so it's always displayed at the top of the page (IF you've put it there or are using the catalog page). This is the text displayed
Confirm Button TextThe confirm button text.
Permissions
Schedule UpdateThe Access Rule used to determine if the user has access to this function. See the page on Permissions and Access for details of valid values.
Schedule DeleteThe Access Rule
Schedule ApproveAccess Rule
Event CreateAccess Rule
Event UpdateAccess Rule
Event DeleteAccess Rule
Event ApproveAccess Rule
Notification Emails
Event Add Notify (S)?Inform the schedule owner when an event is added to the schedule?
Event Add Notify (E)?Inform the event owner when the event is added to the schedule?
Event Change Notify (S)?Inform the schedule owner when an event is changed (updated or deleted)?
Event Change Notify (E)?Inform the event owner when the event is changed (updated or deleted)?
Add Notify SubjectEmail subject text
Add Notify BodyEmail body text. Can contain the following macros:
  • EV-NAME - The event name
  • SC-NAME - The schedule name
  • SC-OWNER - The schedule name
  • USER-EMAIL - The current user...
  • USER-NAME
  • SC-URL - The URL of the schedule.
Change Notify SubjectEmail subject text
Change Notify BodyEmail body text. Can contain the same macros as above


Functions

  • show_schedule(schedule, container). Container is optional.
  • show_schedules(namelike, categorylike, type, starttime, endtime, ownerlike, container, statuslike, incols).
    • All parameters are optional
    • namelike - A case-insensitive regular expression matching the item name (i.e. 'exactname' or 'part' or 'item1|item2|item3' etc)
    • categorylike - A case-insensitive regular expression matching the item category.
    • ownerlike - A regular expression matching the item creator.
    • type - A single type, or a list of pipe-delimited types (i.e. 'type1|type2...').
    • starttime - A Select schedules which start after this date/time.
    • endtime - A Select schedules which end before this date/time.
    • order - a list of columns to order the results by. Can include columns for the item's Type! (i.e. 'it_type ASC, it_type DESC, size')
    • typedata - an SQL expression to be included in the WHERE clause specifying Type data. (i.e. 'AND size>100 AND color=`blue`')
    • container - the container the results should be displayed in.
    • incols - the number of columns to show the list in (overrides the default set for the container)

Container

The schedule container is the most complex of O3's containers because it has to handle lines of intervals - with lines of events within them.

To do this it uses 3 special delimiters...

  • #LINE# - delimits the INTERVAL part of the container - i.e. the bit which must be repeated for each interval
  • #EVENT# - delimits the EVENTs - i.e. the bit which must be repeated for each event
  • #EVTITLE# - delimits the event titles. This is then displayed once in each interval as the titles for the events list. It's only shown in intervals with events.

Macros which are relevant to the EVENT are only processed within the #EVENT# delimiters. If you put macros outside their area of context - they will not be parsed. This applies to INTERVALS as well.

This is an example schedule container:

DATE-FORMAT%M-%d %Y %H:%i:%s#
<!-- Bookings Schedule -->
<table width='100%'>
<tr><th colspan=3>
  <h2>Schedule For O3VARit_title#<br>
    <span style='font-size:xx-small'>
    <a href='catalog.php?iitm=O3VARit_name#'>(O3VARit_name#)</a><br>
    Displaying: INT-VISIBLEs (PG-START-PG-END)<br>
    UPDATE-SCHEDULE
    </span>
  </h2>
</th></tr>
<tr class=heading>
  <th style='background:#EEF; text-align:center'>Start Date</th>
  <th style='background:#EEF; text-align:center'>End Date</th>
  <th style='background:#EEF; text-align:center'>Bookings</th>
</tr>
#LINE#
<tr style='background:ROWCOLOR'>
  <th style='font-size:xx-small'>INT-START</th><th style='font-size:xx-small'>INT-END</th>
  <td>CREATE-EVENTCreateBooking#
    <table width='100%'>
#EVENT#
      <tr>
        <th style='font-size:xx-small' colspan=2>
UPDATE-EVENT#
        </th>
        
      </tr>
      <tr>
        <td class='eventO3VARev_status#'>Status: EV-STATUS</td>
        <td class='eventO3VARev_status#'>Booked By: EV-CREATOR</td>
       </tr>
      <tr>
        <td colspan=2 class='eventO3VARev_status#' style='text-align:right'>
 DELETE-EVENT# APPROVE-EVENT#
        </td>
       </tr>
      <tr>
#EVENT#
    </table>
  </td>
</tr>
#LINE#
</table>

Schedule Macros

MacroIs Replaced By
General Macros Replaced Within The Whole Container
ROWCOLORWhen displaying lists, this alternates between the colors defined in the Search Settings.
TITLESA list of all the Type data descriptions, for all events in the schedule. It's intended to be used to dynamically generate the titles for an event list
DATE-FORMATThis macro specifies the date format to be used througout the container. All the dated below will be shown in this format. It uses the standard MySQL DATE_FORMAT specification which can be found here: http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html and is repeated below
SC-NAMEThe schedule name.
SC-TYPEThe schedule type.
SC-CREATORThe schedule creator.
SC-CREATEDThe schedule created date.
SC-UPDATORThe schedule updator.
SC-UPDATEDThe schedule updated date.
SC-STARTThe schedule start date/time.
SC-ENDThe schedule end date/time.
INT-VISIBLEThe visible period on the page - i.e. from the beginning of the first interval to the end of the last. (as the schedule may be paginated - the whole lot may not be visible at once.
PG-STARTThe first start date/time on the page.
PG-ENDThe last end date/time on the page.
CALENDARDisplay a calendar for the current schedule...
CREATE-SCHEDULE#The schedule create form specified in the settings.
UPDATE-SCHEDULE#The schedule update form specified in the settings.
'Local' Macros Replaced Within The Body & #LINE# Separately
O3VAR#Any internal value from the item's data or type data (i.e. O3VARsize#)
O3USR#Any value from the current user's data or type data (i.e. O3USRus_email#)

SHOW-FORMform#Display the (mandatory) form. Used for remove/change qty etc.
O3IFa|b|c|dO3ENDIFA simple comparison operator. If a=b then c is output, else d. The contents can contain other macros as all others are parsed first. Note this macro has a different terminator to the others to allow you to embed them within an O3IF.
INTERVAL Macros Only Available Within The #LINE# delimiters
INT-STARTThe interval start date/time.
INT-ENDThe interval start date/time.
ROWCOLORAn alternating color - as specified in the settings.
CREATE-EVENTA create event form.
isopenThis is a variable (Not a macro!) that's available within an O3IF which defines if the store is open of closed during that interval (Y|N).
EVENT Macros Only Available Within The #EVENT# delimiters
EV-NAMEThe interval start date/time.
EV-DESCThe interval start date/time.
EV-TYPEThe event type.
EV-STARTThe event start date/time.
EV-ENDThe event end date/time.
EV-CREATORThe event creator.
EV-CREATEDThe event created date.
EV-UPDATORThe event updator.
EV-UPDATEDThe event updated date.
EV-STATUSThe event status.
CREATE-EVENTA create event form.
UPDATE-EVENTAn update event form.
DELETE-EVENTA delete event form.
APPROVE-EVENTAn approve event form.
EV-STARTA create event form.
EV-STARTA create event form.
TYPEDATAA list of all the Type data values, for all items - in the same order as the TITLES

MySQL Date Format Specifiers

You can use any of these symbols in the DATE-FORMAT macro to customise your schedules' display...

Specifier Description
%a Abbreviated weekday name (Sun..Sat)
%b Abbreviated month name (Jan..Dec)
%c Month, numeric (0..12)
%D Day of the month with English suffix (0th, 1st, 2nd, 3rd, ...)
%d Day of the month, numeric (00..31)
%e Day of the month, numeric (0..31)
%f Microseconds (000000..999999)
%H Hour (00..23)
%h Hour (01..12)
%I Hour (01..12)
%i Minutes, numeric (00..59)
%j Day of year (001..366)
%k Hour (0..23)
%l Hour (1..12)
%M Month name (January..December)
%m Month, numeric (00..12)
%p AM or PM
%r Time, 12-hour (hh:mm:ss followed by AM or PM)
%S Seconds (00..59)
%s Seconds (00..59)
%T Time, 24-hour (hh:mm:ss)
%U Week (00..53), where Sunday is the first day of the week
%u Week (00..53), where Monday is the first day of the week
%V Week (01..53), where Sunday is the first day of the week; used with %X
%v Week (01..53), where Monday is the first day of the week; used with %x
%W Weekday name (Sunday..Saturday)
%w Day of the week (0=Sunday..6=Saturday)
%X Year for the week where Sunday is the first day of the week, numeric, four digits; used with %V
%x Year for the week, where Monday is the first day of the week, numeric, four digits; used with %v
%Y Year, numeric, four digits
%y Year, numeric, two digits
%% A literal '%'.


Powered By OfficeTrio