More than one Scheduler in Joomla

Hi all “Scheduler” users, I just have a small question.
Is it possible to have more than one Scheduler in Joomla portal? As I can see in Scheduler settings, I can set the “table name”. If I could somehow duplicate Scheduler, I should be able to create new table in database and set the table name in settings.
Thank u all for any ideas!
Regards, Gulliver

It’s quite problematic to update module for multi-user usage. But if you know a bit of PHP you can try to use standalone scheduler ( full package of scheduler contains sample of multi-user implementation )

Well, I know a bit PHP. Is there any instruction manual or I have to improvize? :neutral_face:

a) Grab scheduler’s package dhtmlx.com/docs/products/dhtmlxS … eduler.zip
b) import dhtmlxScheduler\samples\common\dump_shared.sql in the test DB
c) set DB setttings in the dhtmlxScheduler\samples\common\config.php
d ) check samples\02_customization\shared_events\user_1.html

basically you will need to show similar content on the joomla’s page ( simplest solution - through an iframe ), the only change - in the next line 1 need to be replaced with php code , which will output ID of your current user.

scheduler.load("events.php?user=1");

well, i think i am close, but can u pleaseplease help me, which files form Standard Edition i can use or edit and apply in Joomla component?
as i can see, must be definitely 02_units_view.html (i am not sure where to copy the content), than probably codebase/ext/dhtmlxscheduler_units.js than codebase/dhtmlxscheduler.js and dhtmlxscheduler.css.
thank u !
Gulliver

ou, u were first. i am gonna try this. so forget what i just wrote :smiley:

Sample with “unit view” allows to show events-per-person inside the single view.
But if you just need to show a separate calendar for each person - it can be done without any custom views.

yes yes, that would be much better, see one day (today) and 5 columns (names) on it. :stuck_out_tongue:

well, i know it must me boring to explain all details, but please… :neutral_face:

  1. first of all i thought, it must be composed into joomla component, so i installed it into Joomla, works fine and tried to create database as u wrote.
  2. than i realized, that they r probably 2 different things so i create new database “sampledb”, import dump_shared.sql, hm, with many errors and without table “tevents” - table hasnt been created.
  3. than i tried to open samples\02_customization\shared_events\user_1.html

WHAT I EXACTLY NEED IS THIS: When u unpack Stnadard Edition (dhtmlx.com/docs/products/dhtmlxS … eduler.zip) and OPEN samples/03_extensions/02_units_view.html (that view with Sections A, B, C, D, …).

Any ideas?

Thank u very much for your time!

Gulliver

Client
com_scheduler\site\models\scheduler.php , getScheduler method
This one contains the client side code of scheduler.

You need to do 3 things

a) locate
“scheduler.init” line and add any custom init code before it.
In case of init view it will be code from 02_units_view.html , lines 24-29, 43-47
be sure to replace " with "

b) locate

<script src="'.JURI::root().'components/com_scheduler/codebase/dhtmlxscheduler.js" and add after that one more script tag with path to dhtmlxscheduler_units.js ( file need to be taken from scheduler's package and copied to any place on your site ) c) locate
and add after it
[b]DB[/b] add field "section_id" to the table, where events stored [b]Server[/b] com_scheduler\site\events_rec.php locate $scheduler->render_table($table_name,"event_id","start_date,end_date,text,rec_type,event_pid,event_length"); and replace with $scheduler->render_table($table_name,"event_id","start_date,end_date,text,rec_type,event_pid,event_length,section_id"); After such steps you must have working unit-view in your scheduler's installation.

Almost DONE :unamused:

DONE

  1. Find file in component com_scheduler\site\models\scheduler.php

(not sure what do u mean “with “)
2. Locate “scheduler.init” line and add code from: 02_units_view.html - lines 24-29, 43-47
that means:

if ($options[‘12hr’] == ‘1’) {
$scheduler .= 'scheduler.config.hour_date=”%h:%i %A”;’;
}

--------START
var sections=[
{key:1, label:“Section A”},
{key:2, label:“Section B”},
{key:3, label:“Section C”},
{key:4, label:“Section D”}
];
scheduler.createUnitsView({
name:“unit”,
property:“section_id”,
list:sections
});
--------END
$scheduler .= ‘scheduler.init(“scheduler_here”,null,"’.$options[‘default_mode’].’");…

ERROR: Parse error: syntax error, unexpected T_VAR in components\com_scheduler\models\scheduler.php on line 86 (line where var sections start)

DONE
3. Locate

and after it

COPY dhtmlxscheduler_units.js from Standard edition and paste it into the same path as dhtmlxscheduler.js.

DONE
4. Locate

and add after it

DONE
5. Add field “section_id” to the table, where events stored (that must be table: jos_events_rec)
CREATE field “section_id” like i see other fileds “event_id, start_date, end_date, text…”

that means: section_id int(11) NOT NULL,

DONE
6. Locate com_scheduler\events_rec.php find

$scheduler->render_table($table_name,“event_id”,“start_date,end_date,text,rec_type,event_pid,event_length”);

and replace with

$scheduler->render_table($table_name,“event_id”,“start_date,end_date,text,rec_type,event_pid,event_length,section_id”);

Kind Regards, Gulliver

AAA, before “scheduler.init” :smiley:

$scheduler .= ’
var sections=[
{key:1, label:“Section A”},
{key:2, label:“Section B”},
{key:3, label:“Section C”},
{key:4, label:“Section D”}
];
scheduler.createUnitsView({
name:“unit”,
property:“section_id”,
list:sections
});
THAN “scheduler.init”

NOW IT WORKS, ONE LAST THING…HOW TO SET THIS NEW UNIT VIEW AS DEFAULT…
:smiley:
Gulliver

In scheduler.php replace

scheduler.init("scheduler_here",null,"'.$options['default_mode'].'");

with

scheduler.init("scheduler_here",null,"unit");