Google Maps in FCKEditor

Tips submitted by ASPMaker users

Google Maps in FCKEditor

Postby JW » Thu Feb 11, 2010 1:45 am

Hi All,
I found this site where you can add Google Maps to your FCKEditor DHTML Tool bar. It took me about 20 minutes to add the code to my site. Now when I edit a record I can add a Google Map to any web page. I have tested in ASPM8.0.2 and it works great.

hxxp://martinezdelizarrondo.com/googlemaps/

One thing to note... you need to edit the ewcfg(X).asp page and change the following;

Const EW_REMOVE_XSS = True ' True to Remove XSS / False to skip
to
Const EW_REMOVE_XSS = False ' True to Remove XSS / False to skip

Happy coding.

JW
JW
 

Re: Google Maps in FCKEditor

Postby Hoshyar » Thu Aug 26, 2010 3:43 am

JW can you explain which part of the FCKEditor DHTML you have modified to include the Google Map? An illustration is very much appreciated.

Thanks.

Hoshyar
Hoshyar
 

Re: Google Maps in FCKEditor

Postby JCrowe » Sun Jun 19, 2011 11:29 pm

Hi All - after several hours of messing with this I finally got it to work (folder permissions). Below is a step by step process;

1. Locate the file structure;
\fckeditor\editor\plugins\

2. copy the folder googlemaps below the plugins sub directory (fckeditor\editor\plugins\googlemaps)

3. Open the \fckeditor\fckconfig.js with your favorite editor

4. Locate the section that has other plugins added. Mine was located around line 50 of the page (// FCKConfig.Plugins.Add)

5. Paste the following as the last entry in the "// FCKConfig.Plugins.Add" section;
//FCKConfig.Plugins.Add (Google Maps);
FCKConfig.Plugins.Add( 'googlemaps', 'de,en,es,fr,it,nl,no,zh') ;

5A. Locate the section that has the default tool bar. It starts with this;
FCKConfig.ToolbarSets["Default"]

5B. In the last row add the 'googlemaps' icon - it would look like this when added;
['FitWindow','ShowBlocks','googlemaps','About'] // No comma for the last row.

5C. Locate the the section that has the basic tool bar (should be directly below the default tool bar section) - It starts with;
FCKConfig.ToolbarSets["Basic"]

5D. In the basic tool bar add the googlemaps icon - it would look like this when added;
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink', '-','googlemaps','-','About']

6. As JW notes in his post you must edit the ewcfg(X).asp file by allowing the XSS ;
Const EW_REMOVE_XSS = True ' True to Remove XSS / False to skip
to
Const EW_REMOVE_XSS = False ' True to Remove XSS / False to skip

7. Please make sure to set the permissions on the googlemaps folder you copied to the plugins (fckeditor\editor\plugins\googlemaps) - setting the machineName_IUSR account to allow access to critical.

8. Clear the cache from your browser and test.

NOTES;
A. IF YOU FAIL TO SET PERMISSIONS FOR THE IUSR ACCOUNT THE TOOL BAR WILL NOT RENDER - YOU WILL RECEIVE AN ERROR WHEN THE PAGE LOADS STATING "unknown toolbar item".

B. You can download the googlemaps add in at hxxp://martinezdelizarrondo.com/googlemaps/

C. Visual instructions can be found at hxxp://martinezdelizarrondo.com/fckplug ... maps/docs/

D. This was tested in FCKeditor version 2.6.5 only

E. It took longer to read this tutorial than is does to install the plugin - PLEASE remember to set the permissions for the googlemaps folder!!!



Thanks,
JCrowe
JCrowe
 

Re: Google Maps in FCKEditor

Postby JCrowe » Sun Jun 19, 2011 11:47 pm

Hi, All - realizing I left out a part to the tutorial here is the other piece. The googlemap plugin requires a "key" be generated and given to you by google. It is free but you need a gmail account;

1. hxxp://code.google.com/apis/maps/signup.html - fill out the form and get your key

2. Open the \fckeditor\fckconfig.js with your favorite editor

3. Go to the bottom of the page and paste in;
FCKConfig.GoogleMaps_Key = 'INSERT THE THE ALPHANUMERIC KEY CODE GOOGLE GENERATED FOR YOU' ;

4. Save and clear cache, give it a test.

NOTE;
When google generates your key code it uses "double quotes" - ensure you use 'single quotes' when you paste it into the fckconfig.js

Sorry for leaving this step out in the initial tutorial.

Thx,
JCrowe
JCrowe
 


Return to User Submitted Tips (ASPMaker)