Tutorial (Updated)- Adding Map View to your Joomla Scheduler

[size=200]Adding Map View to your Joomla Scheduler[/size]
This worked Great for me with Advice and Guidance by Stanislav and ilya .

( Thought the least I could do was a tute to thank you guys for all the help :wink: )

This is for scheduler for joomla version 2.3 .
( I cant say whether it would work in Wordpress but if it does please post )

Before even attempting this PLEASE BACK UP YOUR SITE AND DATABASE !
This is taken from this post Here
EVERYTHING MUST BE DONE IN ORDER !
So Do every Step EXACTLY as I have written it here

Any problems please ask as I know different people have different set ups
But remember , This is for the JOOMLA COMPONENT
and nothing to do with the Standalone Version

So Lets Begin :smiley:

Open Joomla admin section
Goto :- Components/Scheduler
Click on Custom Fields and add a new field as in the pic below


Name MUST be event_location …Description can be whatever you like
Type = TextArea
Height = 18

Repeat with another 2 fields Remembering that the names must be exact . Descriptions can be what you want .
These next 2 fields will never have to be used as they self populate from the event_location field
for eg. 27 rochester blvd chicago usa
If it doesnt , fill in some more info in your event_location field
( Although googles pretty good at picking up the locations )

Once you put this address in the event_location field when creating an event in your scheduler,
it will find the co-ordinates for the lat and lng fields automatically .
So these fields in your lightbox will most likely never be used by you
( Trying to work out how to hide them , Once I do i will edit this tute )

So Lets go ahead and create 2 more fields

Name MUST be lat …Description can be whatever you like
Type = TextArea
Height = 18

Name MUST be lng …Description can be whatever you like
Type = TextArea
Height = 18

*Upload files Out of the attached package needed for Map View
( Unzip and upload components folder as it is via ftp into your public_html or subdomain folder or you can unzip it and do individually as per below)

Upload dhtmlxscheduler_map_view.js and dhtmlxscheduler_ext.css
to the components/com_scheduler/codebase/ext folder
Then Upload dhtmlxscheduler.js to the components/com_scheduler/codebase folder
( This file will overwrite your existing one . If asked say yes to overwrite )

Edit Files .
Open components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php
( either download via ftp and edit with notepad++ or similar or edit through cPanels filemanager etc )
( if on a mac try textwrangler )
This part will add a new TAB to the calender which will take you to the map section
Find :- ( In my file it was around line 844 )

$scheduler .= " </div>

Replace with this :-

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

( the word ‘Address’ in the code above is My Navigation Label . You can call this what you want. Also the 470px is to position the Address TAB, You may need to alter this to suit your layout )

Save Then (if ftp)FTP Back to folder ( If cPanel etc:- Just save )

Open components/com_scheduler/scheduler_include.html and add this
( It should be empty to begin with if its a clean scheduler install )

[code]

[/code]

Save Then (if ftp)FTP Back to folder ( If cPanel etc:- Just save )

Go to the front end ( Your Site ) of joomla and refresh the page
You May need to Clear your Cache then reload your page and your map should be there in your new Navigation Tab !
(This is assuming that you already have a menu item created for the scheduler. If not go to Menu Manager in joomla , Select your menu for eg. Main Menu . Then select New and choose scheduler to create your new menu button )

Your browser may also ask you at this point( Depending on browser )
Whether you want to Share Location . Just answer this the way you want
Although to stop it continually asking, it is best to say yes

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If you wish to disable the google sensor add the next piece of code in scheduler_include.html

<script> scheduler.config.map_resolve_user_location = false; </script>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

And thats it. If you did everything correct and have any troubles please post here .

*Below Is attached the necessary files needed for the map view to work
components.zip (26.6 KB)

Updated Above Tutorial.
Tested and works with no problems now
Will not strip the lat lng fields on using the admin section of the scheduler
:smiley:

Update :-
Found a work around to remove the lat and lng fields from the Lightbox
( If you dont need them in there )
Thanks to Stanislav :smiley:

(remember to always backup before editing)

Open your database for your site ( In phpMyAdmin or similar )
Locate the table :- jos_scheduler_options
(the prefix may be different ie:- jos_ )

Open it up and edit the field called :- scheduler_xml

Resize the VALUE row by dragging the bottom right corner ( If using phpMyAdin )
to make it easier to work with

If you followed the first post in this thread correctly there will be the next lines
Down the bottom almost:-

&ltesc;customfield name="lat" dsc="lat" type="textarea" old_name="lat" use_colors="false" units="false" timeline="off" height="18" /&gtesc;&ltesc;customfield name="lng" dsc="lng" type="textarea" old_name="lng" use_colors="false" units="false" timeline="off" height="18" /&gtesc;

Delete the above lines EXACTLY
(The start of the value area will be populated with template info etc. Only delete the above code)

You should be left with something like this at the end

&ltesc;customfields&gtesc;&ltesc;customfield name="Text" dsc="Description" type="textarea" old_name="Text" use_colors="false" units="false" timeline="null" height="25" /&gtesc;&ltesc;customfield name="event_location" dsc="Address" type="textarea" old_name="event_location" use_colors="false" units="false" timeline="off" height="18" /&gtesc;&ltesc;/customfields&gtesc;&ltesc;/config&gtesc;

Hit ‘Go’ to save it in phpMyAdmin

Then return to your scheduler section in your joomla admin panel and open up the custom fields section . If the lat/lng is still in there refresh your page . Once it is not visible in your admin panel , Hit save to write it to your scheduler_stable_config section .
Once this is done go to your scheduler in the front end and open ( or create ) an event to see if they are gone
Mine were and everything still worked .
Only thing is that your lat/lng will no longer be saved to your database
As Google seems to be picking it up anyway from your event_location field
I havent tested this on a new install as my site has been up for 3 months now
But it works by following all the steps

You may not even need to add the lat/lng custom fields in the step from the first post
So if anyone try’s this and finds that those two custom fields aren’t necessary for it to work
Would they please post and I will update the tute to avoid confusion
Any questions please ask :smiley:

Do someone have an estimated TimeFrame when Scheduler will work on joomla v1.6? Or an answere if there will be any dhtmlxScheduler for joomla v 1.6 ever. I want to start using joomla v 1.6 but I want if it will not be any dhtmlxScheduler for the last joomla verson in short time.

What ever. Thanks a lot for making dhtmlxScheduler for joomla v 1.5 :slight_smile:

We are already looking in it, I think version will be available till the end of January.

:astonished:
You are just AMAZING :exclamation:

Is it possible to download the Scheduler for joomla v 1,6? I do also see you are working on a new verson of the Scheduler. Should I wait for that verson before installation your fantastic Scheduler?

Check
viewtopic.php?f=16&t=16800

We are planing update for the scheduler plugins, but there will not be any big updates, mostly small improvements and fixes.

Is this working with wordpress ?

OK - so I got this set up, but am I mistaken or does the Map/Address view only display events from the current day? IE, if here is something scheduled for today, it shows up in the map tab - but the prev/next buttons don’t do anything.

(On a possibly related note, this is the same behavior I see on the ‘Agenda’ tab.)

Thanks!

Never mind on that last post - it was pilot error on my part :wink: Future events show up on Agenda and Map views.