User guide for scheduler ?

Sorry if this is already somewhere else but everywhere i look here I just seem to find people asking the same question … Is there a user guide ?
I am not to up on the code side of things but I find it very confusing trying to get scheduler working with all the available extensions . Is there ONE page with scheduler for joomla instructions with all the available extensions with links on how to implement those extensions?
Sorry but I cant find one .

I will give you a quick run down of what I am trying to achieve .

I am running a Standard setup of joomla 1.5.20 with the com_scheduler.zip
I have no template and am just using a Highslide Log in box
( Bare bones so as to get scheduler working the way i want it )

ilya has been helping me and has helped me correct some layout issues
but I cant seem to work out how to do a few things .

What I Need :-

1:- Instructions on the mod_scheduler -

If I search the site I get one result which takes me to a doesn’t exist page>?
click the topic here :- docs.dhtmlx.com/doku.php?do=sear … eduler.zip

I found a post that says to download from here :-
support.dhtmlx.com/x-files/sched … eduler.zip
But I cant seem to find one anywhere for 2.3
Is their a site map on this site or a download page with all the files listed?

I need instructions on how to set this module up as it is showing on my site but with errors .
I have searched the forums but cant seem to find a users guide to install properly with scheduler 2.3 Joomla component
error example from my sidebar
( The thing is my upcoming schedules are showing underneath all these errors ):-

[code]Scheduler sidebar
Warning: Missing argument 8 for SchedulerConfig::__construct(), called in /home/showerr1/public_html/work/modules/mod_scheduler/mod_scheduler.php on line 37 and defined in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 16

Warning: Missing argument 9 for SchedulerConfig::__construct(), called in /home/showerr1/public_html/work/modules/mod_scheduler/mod_scheduler.php on line 37 and defined in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 16

Warning: Missing argument 10 for SchedulerConfig::__construct(), called in /home/showerr1/public_html/work/modules/mod_scheduler/mod_scheduler.php on line 37 and defined in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 16

Notice: Undefined variable: prefix in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 22

Notice: Undefined variable: userLoginField in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 25

Notice: Undefined variable: tableUsers in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 26

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 35

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 37

Notice: Undefined index: scheduler_xml_version in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 39

Notice: Undefined index: scheduler_php_version in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 41

Notice: Undefined index: scheduler_xml_version in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 41

Notice: Undefined index: scheduler_xml_version in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 41

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 45

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 105

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 221

Notice: Undefined index: scheduler_xml_version in /home/showerr1/public_html/work/components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php on line 80[/code]

Then it displays my upcoming schedules . If I disable the mod_scheduler the errors go away
So does anyone have instructions on how to get this to work ?

2:- I would like to add a custom field into the scheduler manager in admin which will link to maps . Is this possible?
I saw in this post here :- dhtmlx.com/blog/?p=95
That the drop down from google comes up . Thats exactly what I need except linked with a map
For example :- If I set an event … And say I need to display a map to the address of that event , The event poster can select from a drop down like at dhtmlx.com/blog/?p=95 and the map will self populate in another unit box ?
I can find no instructions on how to get the maps to work in joomla scheduler . Let alone to do what I am saying above .
Can anyone tell me how to get the google maps to show in joomla scheduler ?
And possibly show me how to get them to load from the dropdown list from the above blog page?

3:- This last one is a bit tricky
I have run this past ilya and I will post the reply .
What I need is :-

Super Administrator posts events in custom fields on the front end
named for example in a tab called customers

tom
mary
harold
james
martha


Then the Super Administrator would create these user accounts in Joomla as authors with identical names
eg
users created

tom
mary
harold
james
martha


Now , I know that if the admin creates the event and is set to ‘private mode’ in the back end
He has the ability in the admin panel ( scheduler manager )
to click on the user column in the event
under Event Administration and change the author of that event
(for example from Admin to tom)


Then allowing tom to see the events allocated to him when he log in and no-one elses .

Thats great and works great . But what I need is a way to AUTOMATICALLY associate the field name with the user
example
Admin posts an event in User toms column
Upon save/event update TOM becomes the author instead of the admin
So anything posted in toms column will make him the author instead of the event poster
( in this case it was the Admin )
ilya sent me a message on how this can be achieved
But I cant work out how .

I have looked in my dhtmlxSchedulerConfigurator.php and it is exactly what ilya posted .

public function set_event_user($action) { $status = $action->get_status(); if ($status == "inserted") { $action->set_value("user", $this->userid); } else { if ($this->settings["privatemode"] == "ext") { $user = $action->get_value('user'); if ($user != $this->userid) { $action->error(); }

So if anyone can help me on what to add in that code to achieve my result ( “User column name” becomes “User Author” )I would be very thankful . As I have been struggling with this for five days now .

Or if anyone can just point me to the right directions here as I am finding it very hard to navigate this site as everything pertaining to the scheduler is very scattered
Thankyou in advance

Hello,

Currently we do not provide manual for mod_scheduler.

  1. We will look into this issue and post update.

2, 3. Though we try to be as helpful as possible here on the forums yet not every task is easy enough to be written fast from the scratch. These requests are such cases. It can be done as custom development for you but for an additional fee. If you are interested, please send your request to sales [at] dhtmlx.com

Best regards,
Ilya

Great sent Email .
So there is no version of the mod_scheduler for version 2.3 of the component as the only one I can find is tagged 2.2 ?
And from those errors above , Can you tell me why that is happening? Is it something to do with the version?
Thanks

Missing arguments I got rid off by changing line 37 in mod_scheduler from :-

$cfg = new SchedulerConfig('scheduler_config_xml', $db->_resource, $table, $fieldName, $fieldValue, $tableEvents, $prefix);

To

$cfg = new SchedulerConfig('scheduler_config_xml', $db->_resource, $table, $fieldName, $fieldValue, $tableEvents, $prefix, $hiddenName, $connection, $userIdField, $userLoginField, $tableUsers);

I don’t know if its going to effect anything but the first errors are gone now .

Still struggling with the next bit . As the module is working but these errors are above the new events .


So I take it the support.dhtmlx.com/x-files/sched … eduler.zip file is not compatible with the latest com_scheduler.zip?

As I said , It seems to be working ( Although only 2 of 3 events are shown in the sidebar )
Anyone got any idea on how to get rid of them
This is the second time I have installed this on a fresh install of joomla 1.5.20 and fresh install of com_scheduler.zip and the errors are always the same .

One thing i noticed is its calling up

		$version = mysql_fetch_assoc($res);

In the first error
Seems like its in the dhtmlxSchedulerConfigurator.php file twice ???
Any reason ?
( I commented the 2nd one out and it made no difference , The errors were the same )
This is the section im talking about

private function parseConfig() { $query = "SELECT `".$this->fieldName."`, `".$this->fieldValue."` FROM ".$this->prefix.$this->table." WHERE `".$this->fieldName."`='scheduler_xml_version' OR `".$this->fieldName."`='scheduler_php_version' LIMIT 2"; $res = mysql_query($query, $this->connection); $version = mysql_fetch_assoc($res); /* FIRST ERROR IS THIS LINE? */ $versions[$version[$this->fieldName]] = $version[$this->fieldValue]; /*commented out as double up by me */ /* $version = mysql_fetch_assoc($res); $versions[$version[$this->fieldName]] = $version[$this->fieldValue]; */

So I ask again , Is there a mod_scheduler.zip file for the latest version of com_scheduler.zip?
( 2.3. I think )
OR
Can anyone tell him how to get rid of those errors listed in the picture
Cheers

Hello,

I have attached updated mod_scheduler, check attachment.

Best regards,
Ilya
mod_scheduler.zip (16.4 KB)

FANTASTIC ilya …!!!
Only prob … Can It return more than two results???
I am still only getting two results?
Seems its 2 out of a custom field but the other custom fields arent showing
BUT CHEERS!!! It works now with no errors !!
Thanks!
( BTW you still have the site details to take a look if you want :wink: )

  1. Open
    /your_joomla/components/com_scheduler/codebase/iframes/settings.html file.

  2. Locate and comment following line:

document.getElementById('wp_specific').style.display = 'none';

So it should be

//document.getElementById('wp_specific').style.display = 'none';

After this you will find option Number of events in widget in Settings tab in admin panel.
Be sure to clear your browser cache first.

Hope this helps.

Best regards,
Ilya

Thanks ilya , Didn’t have to comment out that line as I could see the number of events in widget setting already . Changed it to 100 ( for a test ) , I can see the missing ones now :smiley:
I didn’t realise that WIDGET setting was part of the module_sidebar .
Is there a way just to show for example :- todays date and tomorrows date?
Instead of cutting it off with an amount ?
I need it to show current day and tomorrows events and thats all ( in the module area )
Otherwise it may cut out events i need to show if i set it to say 20
thanks in Advance :sunglasses:

Quick update . My events stayed in the module for about 20 minutes
( about 12 of them )
Now it is only displaying 1 .
Yet the rest are there in the calander and are after the date of the one displayed ( time wise )
Any ideas?

Hello,

  1. Is there a way just to show for example :- todays date and tomorrows date? Instead of cutting it off with an amount ?
    All logic how events are fetched is in the get_events function in the mod_scheduler.php file. There you can edit or add your custom logic.

  2. Yet the rest are there in the calander and are after the date of the one displayed ( time wise ) Any ideas?
    Earlier you PMed me with the link to your website. I can not find sidebar there, can you specify where can i find it?

Best regards,
Ilya

I disabled it for now as it wasn’t working
I moved it from the sidebar to the footer
I will re-enable it now

I also created 12 events for tomorrow
Seems that if I move some to the next day it makes others disappear as well
Dont know why

Sorry, still can’t find sidebar. Can you specify on what page and where exactly? (PM me)

Best regards,
Ilya

In regards to this ilya ?

I think i follow where you were going with this

Say i had a custom field with the database column named ‘techs’
Which returned eg techs_0, techs_1,techs_2 etc etc depending on what i chose on creation of an event
How would I associate say ‘tech_0’ PERMANENTLY with the user ‘64’ ?
As I am using the custom field techs to chose a technician for the job
lets say user 64 is Alan
And the custom field is also named Alan ( Which in the database is tech_0 )
How would I write this

if ($status == "inserted") { $action->set_value("user", $this->userid)
To do what I want
Im not to great at php thats why im asking

My first thought was something like this

if ($status == "inserted" && "techs" == techs_0) { $action->set_value("user", 64)
The code is obviously wrong but you understand what i’m saying?

If I did the above somehow I would have to do it for every user
Do you see what I am trying to do?
Thanks :smiley:

Hello,

I’d say we better make section ids = user ids in your case. Though there are plenty of flaws in the following solution it should give us something to move forward with.

dhtmlxSchedulerConfigurator.php
line 298

$fieldString .= '{key:"'.$fieldName."_".$j.'", label:"'.$field['options'][$j]['name'].'"},';

Now what we want to do here is
if the field name is ‘tech’ and option name is Alan then let’s give him another key - same one with the user id. Now you can either query your database to check out actual Alan user id or simply keep them up to date in the configurator file.

if($fieldName == 'tech') { $section_key = $fieldName."_".$j; $section_name = $field['options'][$j]['name']; switch ($section_name) { case 'Alan': $section_key = '64'; case 'Andrew': $section_key = '65'; } $fieldString .= '{key:"'.section_key.'", label:"'.$section_name.'"},'; } else $fieldString .= '{key:"'.$fieldName."_".$j.'", label:"'.$field['options'][$j]['name'].'"},';
Now back to

public function set_event_user($action) {

Logic should be changed the following way:

if ($status == "inserted") { if(substr($action->get_value('tech'), 0, 4) == 'tech') // key is 'tech_0' $user_id = $action->set_value("user", $this->userid); else $user_id = $action->get_value('tech'); // key is the real user id, e.g. 65 $action->set_value("user", $user_id)

Note that you will have to update your events as their current section key will not match new ones.

Best regards,
Ilya

Ok Line 298 down to 319 now says

[code] $fieldString .= ‘{key:"’.$fieldName."".$j.’", label:"’.$field[‘options’][$j][‘name’].’"},’;
if($fieldName == ‘techs’) {
$section_key = $fieldName."
".$j;
$section_name = $field[‘options’][$j][‘name’];
switch ($section_name) {
case ‘Alan’:
$section_key = ‘63’;
case ‘Mark’:
$section_key = ‘64’;
case ‘Simon’:
$section_key = ‘65’;
case ‘Stuart’:
$section_key = ‘66’;
case ‘Tyson’:
$section_key = ‘67’;
}
$fieldString .= ‘{key:"’.section_key.’", label:"’.$section_name.’"},’;
}
else
$fieldString .= ‘{key:"’.$fieldName."_".$j.’", label:"’.$field[‘options’][$j][‘name’].’"},’;

					$optionsList .= $fieldName."_".$j.':'.$field['options'][$j]['name'].',';[/code]

I changed fieldname to techs as that what it is in the database .

And changed line 985 to this

[code] public function set_event_user($action) {
$status = $action->get_status();
if ($status == “inserted”) {
if(substr($action->get_value(‘techs’), 0, 4) == ‘techs’) // key is ‘tech_0’
$user_id = $action->set_value(“user”, $this->userid);
else
$user_id = $action->get_value(‘tech’); // key is the real user id, e.g. 65
$action->set_value(“user”, $this->userid);

	} else {
		if ($this->settings["privatemode"] == "ext") { .....etc etc[/code]

No errors but it didnt make the admin event the techs event after the admin saved it
Did I do something wrong in the above code ?
Cheers :smiley:

  1. There is a mistake in your listing:

$user_id = $action->get_value('tech'); // key is the real user id, e.g. 65 $action->set_value("user", $this->userid);
Should be:

$user_id = $action->get_value('tech'); // key is the real user id, e.g. 65 $action->set_value("user", $user_id);

  1. And here:

[code] $fieldString .= ‘{key:"’.$fieldName."".$j.’", label:"’.$field[‘options’][$j][‘name’].’"},’;
if($fieldName == ‘techs’) {
$section_key = $fieldName."
".$j;
$section_name = $field[‘options’][$j][‘name’];
switch ($section_name) {
case ‘Alan’:
$section_key = ‘63’;
case ‘Mark’:
$section_key = ‘64’;
case ‘Simon’:
$section_key = ‘65’;
case ‘Stuart’:
$section_key = ‘66’;
case ‘Tyson’:
$section_key = ‘67’;
}
$fieldString .= ‘{key:"’.section_key.’", label:"’.$section_name.’"},’;
}
else
$fieldString .= ‘{key:"’.$fieldName."_".$j.’", label:"’.$field[‘options’][$j][‘name’].’"},’;

                  $optionsList .= $fieldName."_".$j.':'.$field['options'][$j]['name'].',';[/code]

Should be (removed first line):

[code]
if($fieldName == ‘techs’) {
$section_key = $fieldName."".$j;
$section_name = $field[‘options’][$j][‘name’];
switch ($section_name) {
case ‘Alan’:
$section_key = ‘63’;
case ‘Mark’:
$section_key = ‘64’;
case ‘Simon’:
$section_key = ‘65’;
case ‘Stuart’:
$section_key = ‘66’;
case ‘Tyson’:
$section_key = ‘67’;
}
$fieldString .= ‘{key:"’.section_key.’", label:"’.$section_name.’"},’;
}
else
$fieldString .= ‘{key:"’.$fieldName."
".$j.’", label:"’.$field[‘options’][$j][‘name’].’"},’;

                  $optionsList .= $fieldName."_".$j.':'.$field['options'][$j]['name'].',';[/code]

Then go to the admin’s back end and change any settings. Save changes. After that you can change it back.
This way all settings should be reconfigured and (most importantly) techs id should change too.

Note that you will lose your ‘lat’ and ‘lng’ fields in the database though you know it already.

Best regards,
Ilya

ok fixed the code and went to the admin panel and changed my widget amount , Saved , then recreated the lat,lng then dragged and dropped the current events to redo the co-ordinates .

My edits read like this now

first edit ( Line 297 to 318 Just to show where it is )

[code] $optionsArr[] = $field[‘options’][$j];
if($fieldName == ‘techs’) {
$section_key = $fieldName.““.$j;
$section_name = $field[‘options’][$j][‘name’];
switch ($section_name) {
case ‘Alan’:
$section_key = ‘63’;
case ‘Mark’:
$section_key = ‘64’;
case ‘Simon’:
$section_key = ‘65’;
case ‘Stuart’:
$section_key = ‘66’;
case ‘Tyson’:
$section_key = ‘67’;
}
$fieldString .= '{key:”‘.section_key.’“, label:”‘.$section_name.’“},';
}
else
$fieldString .= '{key:”'.$fieldName."
”.$j.‘“, label:”’.$field[‘options’][$j][‘name’].‘"},’;

					$optionsList .= $fieldName."_".$j.':'.$field['options'][$j]['name'].',';[/code]

2nd edit ( Line 980 - 994 to show where it is )

[code] return $row;
}

public function set_event_user($action) {
	$status = $action->get_status();

if ($status == “inserted”) {
if(substr($action->get_value(‘techs’), 0, 4) == ‘techs’) // key is ‘tech_0’
$user_id = $action->set_value(“user”, $this->userid);
else
$user_id = $action->get_value(‘techs’); // key is the real user id, e.g. 65
$action->set_value(“user”, $user_id);

	} else {
		if ($this->settings["privatemode"] == "ext") {[/code]

After this I created 2 events which you can see in the database below

  1. When admin creates an event now from drop down custom field select in lightbox
    it always stays as Stuart . Even if I select ,Mark Alan etc etc when its saved


So Any other thoughts?
Cheers

Hi,

  1. $fieldString .= '{key:"'.section_key.'", label:"'.$section_name.'"},';
    should be:
$fieldString .= '{key:"'.$section_key.'", label:"'.$section_name.'"},';
  1. if(substr($action->get_value('techs'), 0, 4) == 'techs') // key is 'tech_0' $user_id = $action->set_value("user", $this->userid);
    should be:

if(substr($action->get_value('techs'), 0, 5) == 'techs') // key is 'techs_0' $user_id = $this->userid;
Best regards,
Ilya

Getting some really weird results now
You would have to log in to see what I mean
All the code is the same as what you posted and I did the admin save etc
Database shows on creation of an event by admin that the techs field and id field is 67 no matter what you select from your custom field dropdown list (ie Alan , Mark etc ).
It shows in the calendar as Stuart (id = 65 No matter who you pick ) for some reason
But 67 is Simons user id
If I log in as Simon I can see the event but its in Stuarts Column .
If I drag the event Anywhere ( Different Day , User or time etc ) It reverts the id back to 62 ( admin ) in the database and renames the techs field to who ever the tech was on creation
Eg. techs_0 .
So it just seems to be upsetting to many values .
I appreciate all your help ilya . I created a PHP file linked to a menu button which updates them when pressed . Just thought there must be a way to allocate the author ID via the custom techs field .
Here is my php file for reference

[code]

<?php defined('_JEXEC') or die( 'Restricted access' ); $db =& JFactory::getDBO(); echo "Job Updating in Progress ........ "; $query = "UPDATE `jos_events_rec` SET `user` = '63' WHERE `user` = '62' AND `techs` = 'techs_2'"; echo "Alan's Jobs have been Updated "; $db->setQuery($query); $result = $db->query(); $query = "UPDATE `jos_events_rec` SET `user` = '64' WHERE `user` = '62' AND `techs` = 'techs_1'"; echo "Mark's Jobs have been Updated "; $db->setQuery($query); $result = $db->query(); $query = "UPDATE `jos_events_rec` SET `user` = '65' WHERE `user` = '62' AND `techs` = 'techs_0'"; echo "Stuart's Jobs have been Updated "; $db->setQuery($query); $result = $db->query(); $query = "UPDATE `jos_events_rec` SET `user` = '66' WHERE `user` = '62' AND `techs` = 'techs_3'"; echo "tyson's Jobs have been Updated "; $db->setQuery($query); $result = $db->query(); $query = "UPDATE `jos_events_rec` SET `user` = '67' WHERE `user` = '62' AND `techs` = 'techs_4'"; echo "Simon's Jobs have been Updated "; $db->setQuery($query); $result = $db->query(); ?>[/code]

I know its not too tidy but it does the job .
Just have to remember to basically “publish” the jobs after they are entered
Thanks again for your help :smiley: