google map prob

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
itsc.net

google map prob

Post by itsc.net »

Hi Guys,

I have had a search about but can't find a solution to this problem. I want to intergrate google map into cms MS but i keep getting an error at the top..
string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '{' (Smarty_Compiler.class.php, line 1407)" string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1407)" string(150) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '.getElementById("map"));' (Smarty_Compiler.class.php, line 1407)" string(140) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '.setCenter(new' (Smarty_Compiler.class.php, line 1407)" string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token ';' (Smarty_Compiler.class.php, line 1407)" string(138) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unclosed tag {if} (opened line 1). (Smarty_Compiler.class.php, line 317)" .
anyone know what i'm doing wrong ......

link
alby

Re: google map prob

Post by alby »

itsc.net wrote: I have had a search about but can't find a solution to this problem. I want to intergrate google map into cms MS but i keep getting an error at the top..
string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '{' (Smarty_Compiler.class.php, line 1407)" string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1407)" string(150) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '.getElementById("map"));' (Smarty_Compiler.class.php, line 1407)" string(140) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token '.setCenter(new' (Smarty_Compiler.class.php, line 1407)" string(127) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unidentified token ';' (Smarty_Compiler.class.php, line 1407)" string(138) "Smarty error: [in globalcontent:google-map line 1]: syntax error: unclosed tag {if} (opened line 1). (Smarty_Compiler.class.php, line 317)" .
{literal}
// whack of javascript code
{/literal}

Alby
itsc.net

Re: google map prob

Post by itsc.net »

i muust be doing something wrong. my global content  for google-map is like this

Code: Select all

 <__script__ src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAtti_tOPQU3a9gSjegseimhTGLIkhiJQagzgWZslonqLdIBoccxT2QvnVdMGeUid6ql0hcD1wMsVlBw"
      type="text/javascript"></__script>


    <__script__ type="text/javascript">
{literal}
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }

    //]]>

{/literal} 
    </__script>


but i still get the error, i tried putting the {literal} in other places but no joy.

any advice? thanks
faglork

Re: google map prob

Post by faglork »

Excuse the question, but why don't you simply use the Googlemap Plugin?

Cheers,
Alex
itsc.net

Re: google map prob

Post by itsc.net »

thanks man, install the module fine, however got a really noob question. where do i enter the api key? when i go

extensions > simple google map >

i get no options to click?!

the map and settings links don't work. any help?
alby

Re: google map prob

Post by alby »

itsc.net wrote: thanks man, install the module fine, however got a really noob question. where do i enter the api key? when i go

extensions > simple google map >

i get no options to click?!

the map and settings links don't work. any help?
Have you set your permission for use (Group permission?)

itsc.net wrote:

Code: Select all

 <__script__ src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAtti_tOPQU3a9gSjegseimhTGLIkhiJQagzgWZslonqLdIBoccxT2QvnVdMGeUid6ql0hcD1wMsVlBw"
      type="text/javascript"></__script>

    <__script__ type="text/javascript">
{literal}
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }
    //]]>
{/literal} 
    </__script>
but i still get the error, i tried putting the {literal} in other places but no joy.
No, {literal} tag for whole js code and CLEAN your cache (Global settings):

Code: Select all

{literal}
 <__script__ src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAtti_tOPQU3a9gSjegseimhTGLIkhiJQagzgWZslonqLdIBoccxT2QvnVdMGeUid6ql0hcD1wMsVlBw"
      type="text/javascript"></__script>

    <__script__ type="text/javascript">
    //<![CDATA[
    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
    }
    //]]>
    </__script>
{/literal} 

Alby
itsc.net

Re: google map prob

Post by itsc.net »

i have set my permissions for simple-google-map but still nothing?

Also i changed the {literal} tag to what you mentioned but i still get the same error?
faglork

Re: google map prob

Post by faglork »

itsc.net wrote: thanks man, install the module fine, however got a really noob question. where do i enter the api key? when i go

extensions > simple google map >

i get no options to click?!
Just to make sure (maybe there is another one): Did you install this one:
http://dev.cmsmadesimple.org/projects/googlemaps/
?
itsc.net wrote: the map and settings links don't work. any help?
Maybe you do not have the permissions to modify googlemaps? Check your user permissions.

hth,
Alex
itsc.net

Re: google map prob

Post by itsc.net »

silly question (again, sorry)

how do you install that google map module if there is no xml file?

my permissions are all ok
faglork

Re: google map prob

Post by faglork »

Hi,

download the xxxx.tar.gz or xxxxx.zip.

Then either
- unpack locally and ftp the resulting module directory into the /modules directory on your server. Make sure that your ftp prog does not alter the filenames (some set all to lowercase) and that all files get transferred in their proper mode (binary/ASCII).

or

- ftp the file to the /modules directory on your server
- telnet/SSH into your server and unpack it with gunzip/tar or unzip

Then go to cmsms admin > Extensions> Modules, locate the module in the list and click on "Install"


BTW. I *never* install modules via XML. If you do it that way, modules will be installed with web user ownership. That means you do not have FTP access since you have no rights (you are ftp user, nor web user ...) and therefore you cannot manually tamper with the modules (actually you can, but it is very awkward). If you never fiddle around with the code thats ok but I find myself frequently tweaking the modules, so XML installation is no option for me.

hth,
Alex
Locked

Return to “CMSMS Core”