Theme Upgrade Advice For MeePlace 2.4

January 25, 2010 by SLJ | Category:Projects | No Comment Font size: AA   AA

As the new MeePlace 2.4 integrated the new functions, you will be able to modify where Google map starts when adding new business or event.
If you are still using our default theme, we advice you to upload the default theme for 2.4 attached, theme_2.4.zip
Or you will follow the steps to enable your Google Map startup point.
1. Edit the template file: /theme/default/biz/new.tpl  Add the following.

{literal}

<script> $(document).ready(function() {

{/literal}

initialize({$smarty.const._MAP_Y_},{$smarty.const._MAP_X_},{$smarty.const._MAP_ZOOM_},{$smarty.const._MARKER_Y_},{$smarty.const._MARKER_X_}

{literal}   

         ) }); </script>

{/literal}

2. Insert the same code in step 1 to  /theme/default/event/new.tpl 

3. Modify the google js part of /theme/default/event/new.tpl as

<script type=”text/javascript”>

function initialize(mapy,mapx,zoom,markery,markerx) {

var map = new GMap2(document.getElementById(“map_canvas”));

var center = new GLatLng(mapy, mapx);

map.setCenter(center, zoom);

//var marker = new GMarker(center, {draggable: true});

var mxy= new GLatLng(markery, markerx);

var marker = new GMarker(mxy, {draggable: true});

GEvent.addListener(marker, “dragstart”, function()

{  map.closeInfoWindow();  }//

);

GEvent.addListener(marker, “dragend”, function() {

//var myHtml = marker.getPoint()+ “<br/> Zoom: ” + map.getZoom();

//marker.openInfoWindow(myHtml);

document.getElementById(‘x’).value=marker.getPoint().x;

document.getElementById(‘y’).value=marker.getPoint().y;

document.getElementById(‘zoom’).value=map.getZoom();

}//

);

map.addOverlay(marker);

map.addControl(new GSmallMapControl());

GEvent.addListener(map,”moveend”, function(overlay,latlng) {

document.getElementById(‘mapx’).value=map.getCenter().x;

document.getElementById(‘mapy’).value=map.getCenter().y;

document.getElementById(‘zoom’).value=map.getZoom();

});

}

</script>

4. Copy JS files /theme/default/js/biz_new.js  to the correspond position.
If you don’t have a custom theme for your MeeClone, please overwrite the theme files attached.
If you don’t know how to handle this, but you are using your own theme. You may ask your HTML expert friends, or we also provide professionals to help you, the cost will be $25 per hour.
Best Regards,
MeePlace Team.

Related Posts / 相关文章



Leave a Comment:

*
*
*
*

↑ Top