1 of 2
1
how can I add MX Google Maps with safecracker?
Posted: 19 January 2011 03:25 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I have created a channel shops I can add and edit a map from ee CP now I am trying to do the same with safecracker her is my code and I have attached an image with the display I get

I suspect something I have done wrong with {exp:jquery:script_tag}

here is my code

{exp:safecracker channel="shops" return="{path=epiplo_main/}” entry_id=”{segment_3}”}
        <link href=”{path=css/_ee_saef_css}” type=“text/css” rel=“stylesheet” media=“screen” />
        {exp:jquery:script_tag}
         
          <label for=“title”>Î?νομα Î?αÏ?αÏ?Ï?ήμαÏ?οÏ?</label>
          <input type=“text” name=“title” id=“title” value=”{title}” size=“50” maxlength=“100”></br>

          <label for=“url_title”>URL Title</label>
          <input type=“text” name=“url_title” id=“url_title” value=”{url_title}” maxlength=“75” size=“50” /></br>
         
          <label for=“gallery”>Gallery</label></br>
          {field:map}</br>
         
          <label for=“width”>ΠεριοÏ?ή</label>
          <select name=“style” id=“style”>
              {options:region}
                <option value=”{option_value}”{selected}>{option_name}</option>
              {/options:region}
          </select></br>         
         
          <input type=“submit” name=“submit” value=“Submit” /> 
        {/exp:safecracker}

Profile
 
 
Posted: 19 January 2011 06:10 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Are you getting any javascript errors?

Profile
 
 
Posted: 20 January 2011 04:20 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I checked the activity window and it’s missing this file

http://localhost/ee213_epiplo/themes/mx_google_map/mxgooglemap.js 
Profile
 
 
Posted: 20 January 2011 05:41 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Hm…it looks like your theme folder may not be set correctly, can you check that?

Profile
 
 
Posted: 20 January 2011 05:54 AM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16
Rob Sanchez - 20 January 2011 05:41 AM

Hm…it looks like your theme folder may not be set correctly, can you check that?

maybe the an image from the activity can help?
something is wrong with the name it changes from localhost/ee213 to localhost:80/ee213

Profile
 
 
Posted: 20 January 2011 07:05 AM   [ Ignore ]   [ # 5 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I can’t display them map I have tried everything

I created a new template with no embed I have inserted the scripts inside head and inside the safacracker entry
maybe it’s the way I am calling the field?

{field:xmap} maybe using another way?

Profile
 
 
Posted: 20 January 2011 11:57 PM   [ Ignore ]   [ # 6 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

So, back to Rob’s question… is that file in your themes folder?

http://localhost/ee213_epiplo/themes/mx_google_map/mxgooglemap.js

Do you have a folder on your server called “themes” and does it have any of the missing files in it? That’s the first issue to get sorted.

 Signature 
Profile
 
 
Posted: 21 January 2011 05:32 AM   [ Ignore ]   [ # 7 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16
Chris Newton - 20 January 2011 11:57 PM

So, back to Rob’s question… is that file in your themes folder?

http://localhost/ee213_epiplo/themes/mx_google_map/mxgooglemap.js

Do you have a folder on your server called “themes” and does it have any of the missing files in it? That’s the first issue to get sorted.

I can see the map now!
but I can edit it I can move change add markers but when I am saving the form it does n’t change.

[ Edited: 21 January 2011 05:40 AM by amra01 ]
Profile
 
 
Posted: 21 January 2011 05:50 AM   [ Ignore ]   [ # 8 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Are you able to save successfully on the backend ?

 Signature 
Profile
 
 
Posted: 21 January 2011 05:51 AM   [ Ignore ]   [ # 9 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

yes it changes when I am using CP but every time I use the my admin page it resets the map

Profile
 
 
Posted: 21 January 2011 06:09 AM   [ Ignore ]   [ # 10 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I was checking the addons and I noticed I haven’t added the serial to safecracker settings maybe this is a problem?
I was working locally and now I am online.

Profile
 
 
Posted: 21 January 2011 06:25 AM   [ Ignore ]   [ # 11 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

By “admin page” do you mean the page using SafeCracker? Or the EE CP page.

Please add the serial when you get a chance.

 Signature 
Profile
 
 
Posted: 21 January 2011 06:28 AM   [ Ignore ]   [ # 12 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I added the serial,
in CP the map is working fine and in my SAEF page with safecracker it resets the map to the original

Profile
 
 
Posted: 21 January 2011 06:32 AM   [ Ignore ]   [ # 13 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Can you share some of the HTML from your SafeCracker admin page? My guess is that the input field isn’t getting filled in with the new coordinates.

 Signature 
Profile
 
 
Posted: 21 January 2011 06:36 AM   [ Ignore ]   [ # 14 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16
{exp:safecracker channel="shops" return="epiplo_main/update_shop/ENTRY_ID" entry_id="{segment_3}"}
            
            
<link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen" />
             <
link href="http://myepiplo.gr/themes/third_party/mx_google_map/css/mx_google_map.css" type="text/css" rel="stylesheet">
            
{exp:jquery:script_tag}
            {exp
:jquery:script_tag ui="datepicker"}
            
            
            
                
<p>
                <
label class="span-1 first" for="title">Î?νομα Î?αÏ?αÏ?Ï?ήμαÏ?οÏ?</label>
                <
input type="text" name="title" id="title" value="{title}" size="50" maxlength="100">
                </
p>
                <
p>
                <
label class="span-1 first" for="url_title">URL Title</label>
                <
input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" /></br>
                </
p>
                
                <
p><label class="span-1 first" for="logo">λογÏ?Ï?Ï?Ï?ο ÎµÏ?αιρίαÏ?</label></p>
                <
p>    {field:logo} </p>
                <
hr/>
                <
p>
                <
label class="span-1 first" for="region">ΠεριοÏ?ή</label>
                <
select name="style" id="style">
                    
{options:region}
                        
<option value="{option_value}"{selected}>{option_name}</option>
                    
{/options:region}
                
</select>
                </
p>
                <
hr/>
                <
p><label class="span-1 first" for="description_shop">ΠεριγραÏ?ή Î?Ï?ιÏ?είρηÏ?ηÏ?:</label>
                    
{field:description_shop}
                
</p>
                <
hr/>
                <
p><label class="span-1 first" for="contacts">ΣÏ?οιÏ?εία Î?Ï?αÏ?ήÏ?:</label>
                    
{field:contacts}
                
</p>
                <
p><label class="span-1 first" for="addresses">Î?ιεύθÏ?νÏ?η:</label>
                    
{field:addresses}
                
</p>
                <
hr/>
                <
p><label class="span-1 first" for="xmap">my map</label></p>
                <
p>    {field:xmap} </p>
                
                
                <
input type="submit" name="submit" value="Î?αÏ?αÏ?Ï?ρηÏ?η" class="button"/>
            
{/exp:safecracker} 
Profile
 
 
Posted: 21 January 2011 06:38 AM   [ Ignore ]   [ # 15 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

I’d like to see the HTML output, rather than the code. There’s something that’s not outputting correctly in {field:xmap}. Something to do with their javascript

 Signature 
Profile
 
 
   
1 of 2
1