Action: Scheduler

Compatible with: R6.x
Current version: 0.5
Credits: AhA, WikiAdmin

{{scheduler}}

1. Description

Scheduler is an action which allows a person to keep a day calendar (or diary for that matter). Although the entry formatting is simple, at the same time it provides flexibility. A user can enter a day schedule.....


8:00 am - meeting with joe
9:00 am - coffee with angie
10:00 am - clients from budapest	

or use it to keep a to-do list, or even a diary for the day. The schedule for a day can be viewed with the entry tool, in the monthly view, or in the day view. The day viewer is formatted for printing out usable schedules, & you can designate a specific user with it and see somebody else's schedule (I intend on modifying this so that there will be an easy-to-use text entry box for entering user names).

2. Download

  1. Repo for R6.1 (switch branch for previous versions)
    1. action/scheduler.php (add here: action/)
    2. action/template/scheduler.tpl (add here: action/template/)

3. Installation

To install the scheduler system, the existing database must be extended by 1 table and the following PHP file must be copied to the /action folder.

3.1. Action

This script must be saved under the name scheduler.php and copied to the /action folder.

3.2. Template

This script must be saved under the name scheduler.tpl and copied to the /action/template folder.

3.3. Database

The existing Wacko MySQL database must be extended with the following table. Change the prefix for the tables accordingly if necessary.


create extra table:


CREATE TABLE IF NOT EXISTS wacko_scheduler (
    scheduler_id INT(10) NOT NULL AUTO_INCREMENT,
    user_id INT(10) UNSIGNED NOT NULL DEFAULT '0',
    date VARCHAR(10) NOT NULL DEFAULT '',
    schedule TEXT,
PRIMARY KEY (scheduler_id),
KEY idx_user_id (user_id),
KEY idx_date (date),
UNIQUE KEY idx_time (user_id, date)
);

3.4. Message sets

Add the message sets to your lang/custom.<lang>.php file.


en


<?php

$custom_translation 
= [

    
'SchedMustLogin'                    => 'The calendar works only for logged in users.',
    
'SchedNoEntries'                        => 'There are no entries on this day.',
    
'SchedLabel'                            => 'Appointments and tasks for ',
    
'SchedCommentsNote'                => 'Preface comments with @.',

    
'SchedMonthlyView'                    => 'Monthly view',
    
'SchedDailyView'                        => 'Daily view',
    
'SchedMonthlyCalendar'                => 'Monthly Calendar',
    
'SchedCalendarLabel'                    => 'Calendar for',
    
'SchedDayLabel'                        => 'Entry for the',
];

de


<?php

$custom_translation 
= [

    
'SchedMustLogin'                    => 'Der Kalender funktioniert nur bei angemeldeten Nutzern.',
    
'SchedNoEntries'                        => 'Es gibt keine Einträge an diesem Tag.',
    
'SchedLabel'                            => 'Termine und Aufgaben für ',
    
'SchedCommentsNote'                => 'Kommentare mit @ einleiten.',

    
'SchedMonthlyView'                    => 'Monatsübersicht',
    
'SchedDailyView'                        => 'Tagesansicht',
    
'SchedMonthlyCalendar'                => 'Monatskalender',
    
'SchedCalendarLabel'                    => 'Kalender für',
    
'SchedDayLabel'                        => 'Eintrag für den',
];

3.5. local usage of repository

symlink the gallery action from community action folder in wacko/action and wacko/action/template folder in repo

ln -s ../../community/action/scheduler.php scheduler.php
ln -s ../../../community/action/template/scheduler.tpl scheduler.tpl	

4. Documentation

How can I use this Calendar for group events?


Note:
By default only events of the (one) logged in person respectivly his actual account will be shown.


work around:
Share an account. Eg. "GroupXYAccount" which will be used for event accord only.


Login: GroupXYAccount
Password: onepasswordforallgroupmembers

5. Changelog

0.1 Intitial version
0.2 Ported to WackoWiki
0.3 Ported to R6.0
0.4 Added template
0.5 Replaced year, month and day parameter with date

6. To Do

  • localization
  • how to [doc]
  • month, week, day
  • refactor
  • add template
    • further cleanup: styles, tags and time format

Referring pages:

  1. Dev/PatchesHacks