Page 1 of 1

google map prob

Posted: Mon Nov 19, 2007 2:52 pm
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

Re: google map prob

Posted: Mon Nov 19, 2007 3:03 pm
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

Re: google map prob

Posted: Tue Nov 20, 2007 10:33 am
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

Re: google map prob

Posted: Tue Nov 20, 2007 12:01 pm
by faglork
Excuse the question, but why don't you simply use the Googlemap Plugin?

Cheers,
Alex

Re: google map prob

Posted: Tue Nov 20, 2007 2:46 pm
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?

Re: google map prob

Posted: Tue Nov 20, 2007 3:56 pm
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

Re: google map prob

Posted: Tue Nov 20, 2007 4:52 pm
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?

Re: google map prob

Posted: Wed Nov 21, 2007 11:20 am
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

Re: google map prob

Posted: Wed Nov 21, 2007 1:09 pm
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

Re: google map prob

Posted: Wed Nov 21, 2007 8:30 pm
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