Map Extension :- How to get it to work with joomla

ok third time lucky
Does anyone know how to get the Map Extension to work with Joomla?
I have stripped the standalone version bare and uploaded all the files but the
best i can do is get Google to say it wants to know my location .
I have looked up and down the standalone Code but I still cant work out how to get it to work with joomla . Anyone got any idea as this would make my little project complete :smiley:
Cheers

Still struggling with this
The only instructions I can find are located here
docs.dhtmlx.com/doku.php?id=dhtm … r:map_view
I have a few questions as I dont want any customization etc
I just want it to work like the sample out of the standalone version
( The sample is already perfect for what I want )

Can someone please tell me what I need to upload to my server and where?

Also I Ask , Where it says steps to enable
Include

[code]

[/code]

In what file and where would I put that in the joomla version?

And the next section ( as I am not using a template )
under
TEMPLATE

<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> <div class="dhx_cal_navline"> ... <div class="dhx_cal_tab" name="map_tab" style="right:280px;"></div>
Same again . Where and what file?
Im sorry if I am being dumb but as this is for the standalone which I am not using
I would really love to get this to work in my joomla version of Scheduler .
OR if it can’t be done can someone please tell me so I can look at other avenues
Thanks :smiley:

Hello,

For now plugins functionality doesn’t support map extension or creating any other custom views which are not supported natively. We plan to implement it in one of the upcoming versions.

Best regards,
Ilya

Fair enough then . Shame …Would have capped off my scheduler perfectly .
Any idea which version?

I actually got the sample ( 19_map_view ) there by using a wrapper ( iframe )
works but wont retrieve the events from the database or save them .
As I have no idea how to
I added the 3 fields ( location , lang , ltd ) to my database and set the config.php up with my DB details . I linked the wrapper to a menu button so its actually called seperately

So if this can’t work with joomla , Can anyone explain how to get it working in a frame
Using the same table joomla uses? ( events_rec )

I Know how to get it into the frame for joomla , just need the info on which files i need on the server and what to alter to pull the right data from the database
Thanks

a) copy the next files from standalone scheduler package
/codebase/connector/
/samples/01_initialization_loading/php/events.php
/samples/01_initialization_loading/php/config.php

b) adjust db settings in config.php
c) adjust paths to config and connector at top of events.php
d) in events.php, locate render_table command and change names of db table , and add all necessary db fields ( use samples\03_extensions\php\events_map_view.php as a sample )

e) in html page change script name in load and dataProcessor commands to events.php

Thanks Stanislav for the quick guide .
Got it working except IE7 and 8 dont want to load
error= Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Thu, 4 Nov 2010 14:17:13 UTC
Message: Invalid argument.
Line: 9
Char: 5622
Code: 0
URI: xxxxxxxxx.com/components/com_sch … ap_view.js
Tested it in Safari , Opera, FF and chrome
All loaded fine
But IE just doesnt want to play the game

Also as I am using the joomla version it doesnt bring in my custom fields and it is accessible to anyone with a browser which to me is no good :frowning:
I need it to work with the user database and restrictions I have set up in joomla .
Once again its a shame as I said before , This would have been perfect with the maps .
It is pulling all the existing data out but i checked my database and anyone can add/edit anything which is bad . I had it set up in joomla with a lot of restrictions ( Users can only see there custom field and not edit it etc )
Seeings i’ve gone this far , how hard would it be from here to FULLY integrate it with the joomla interface so it works like the rest ?
Thanks for your help anyway . If you want a link to my site with log ins i would gladly give them to you via pm
Thanks

It looks as some problem with sizing - be sure that scheduler container has some non-zero sizes on moment of initialization ( starting init code from onload can help )

If it still occurs - send me a PM with url of public page, where it can be checked.

Setting custom fields is not so complex but it will be not so simple to integrate such custom solution with joomla security model.

On second think, it may be a simplier task to add map view to existing module
Lets assume that you have scheduler module installed
a) add the next code to the scheduler_include.html

[code]

[/code] all paths need to be updated - they will point to codebase folder in the scheduler module.

b) in the codebase\dhtmlxSchedulerConfigurator.php locate

$scheduler .= " </div>

and replace it with

[code]$scheduler .= "

[/code] You will need to play with "right" position

c) create in DB 3 new fields ‘location’, ‘lat’ and ‘lng’. ( do not create custom fields for them in admin part )

d) in codebase\dhtmlxSchedulerConfigurator.php locate

$fields .= ',rec_type,event_pid,event_length,user';

and replace with

$fields .= ',rec_type,event_pid,event_length,user,location,lat,lng';

If all goes fine - you will have working map extension in the scheduler.

Worked great Stanislav
Had to change a few things
( Add files from standalone version )

  1. Add dhtmlxscheduler_map_view.js to the components/com_scheduler/codebase/ext folder
  2. Add dhtmlxscheduler_ext.css to the components/com_scheduler/codebase/ext folder
    3.Instead of changing :-

$scheduler .= " </div>

—to

[code]$scheduler .= "

[/code]

I had to make it this ( Around line 844 )

$scheduler .= " <div class=\"dhx_cal_tab\" name=\"map_tab\" style=\"right:470px;\">Location</div> </div>

Also I added my name for the tab inside the divs ( ie. Location )

  1. I had to change this bit to get it to work properly

[code]

[/code]

Change to :-

[code]

[/code] As the address for the scheduler_include is public_html/components/com_scheduler/scheduler_include.html

So it is showing now and displaying as it should :smiley: .

My next question is , How do you get the LOCATION input field into the editor ?
Do I need to create another custom field in the admin ( As you said not to )
I really appreciate your help mate
Cheers

UPDATE:-
Just tested in IE and the error is still there . Every other browser Displays it fine except IE
Error :-

I will have a look for null values but im hopeless at javascript lol
( I have attached the map_view file I am using for reference )
Pm sent also :smiley:

UPDATE :-
I did a clean install and up to doing the map edits everything was fine in IE
As soon as I did it I got the JS error from above
Checked in error console in ff and found a few errors in the original code
I fixed the ‘=’ css one but i have no idea what the rest are

dhtmlxscheduler_map_view.zip (2.88 KB)

As for css warning - those are styles which not supported by browsers ( mostly ie hacks ) - they are not errors.

About location in editor - I actually forgot about it , so you need to

a) add custom field with name “location” ( description can be any , but name must be “location” ) , which means you need not create this field in DB manually.

b) the modification described above

$fields .= ',rec_type,event_pid,event_length,user,location,lat,lng';

need to be changed as

$fields .= ',rec_type,event_pid,event_length,user,lat,lng';

because location will now be loaded automatically, as a custom field

Error in map view fixed, try to use the attached js file instead of the original one.
dhtmlxscheduler_map_view_upd.zip (2.92 KB)

Ok i’ll give it a go right now
As an old problem from another thread has resurfaced
(Mouse wont let go of the boxes when dragging ( events ) :frowning:
So i’ll try it out and i’ll have to restore a back up
I’ll let you know :smiley:

That didnt fix it in IE
Its still frozen with this error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Fri, 5 Nov 2010 09:45:27 UTC

Message: Invalid argument.
Line: 9
Char: 5720
Code: 0
URI: xxxx.com/components/com_sche … ap_view.js

Yep, my bad. There was two problems and previous fix covers only one of them.
Updated js file is attached.
dhtmlxscheduler_map_view_upd2.zip (2.93 KB)

ok its 'Sort of ’ Working
Every time i reload the page the map comes up covering the right of every page on every tab?
Are you getting that ?
It eventually goes away but refreshing brings it back

UPDATE :- You actually have to click on the map tab ( Or in my case ‘Location’ ) and it goes away after that
Dont know if that helps you?
I will restore a backup and make sure its not my edits

Hello,

Try using attached js file.

Best regards,
Ilya
dhtmlxscheduler_map_view_upd3.zip (14.5 KB)

Thanks ilya .
That fixed it up
I restored a backup before any edits
Problem now is when restored before i did the edits ( I have listed above in this thread )
I could drag and drop the boxes fine
But after all the edits and uploading of the files
I drag an event box etc and the mouse won’t let go again
Any ideas?
I will restore it before the edits again

UPDATE :-
Ok I found the problem with the boxes not letting go
If they are in the past it wll let you move them but wont let you drop them anywhere
It will let them go if you drop it back to exactly where it was
As I am using this as a job scheduler . We may need to re assign the same job to a future date
Which would just mean dragging a job event done from the past to the future
But it seems it wont let me?

Is there anyway of being able to move a past event to either the present time or the future by dragging and dropping?

If I can get my mouse outside of the box quick enough and click to create a new event
It will drop the box where it is and then i just click cancel on the new event
Thus moving the past event to the new position . This surely can’t be right?
Thanks Again :smiley: Guys for all your help .
Its much appreciated
If this was a complete component for Joomla I would definately buy it . I know its in the cards to happen so I’m going to keep this place on speed dial :slight_smile:

EDIT :-
Ok I checked my working site ( not my test one ) and I can move past to present without any problems .
So I am no wiser as to why my test site has decided to do this
It only came on after the map edits
I will restore an older backup and redo the edits

Ok I checked STEP by STEP
The problem only occured when I did the edit in scheduler_include.html
That was my last edit
Up until then I could drop everything anywhere ( past and present )
This is my scheduler_include file

[code]

[/code]

So it seems its when it starts calling the dhtmlxscheduler_map_view.js that it breaks :frowning:
Any ideas?

Still cant fix that but thought id go ahead and do the ‘location’ edit stanislav told me to do
I created the field NAMED location in the scheduler admin panel
Went back to the site and tried to create a new event with the address in the location box
It comes up in the Database but doesn’t input lat and lng
The only way I can get it to put in lat and lng is by clicking on a street in the map
which still doesnt populate the location box
Am I missing some files?
Like events.php?
As I checked the dhtmlxscheduler_map_view.js and it seems to call it
eg

addEventNow({lat:point.lat(),lng:point.lng(),event_location:L[0]

So I can see whats wrong