Version Notes
v 1.0.8:
change google map api loader style
v 1.0.7:
fix issue of marker cluster
v 1.0.6:
update google map api to version 3
v 1.0.5:
issue in short tag
v 1.0.3:
issue in https fixed
v 1.0.2:
some issue fixed
v 1.0.0:
1) convert FIPS 10-4 region code to ISO 3166:2 region code
2) show markers map in backend
3) enable widget for google map
v 0.9:
add Net_GeoIP in to source for easy installation
v 0.8:
1) add configuration for GeoIP data file
2) check online customer from log
3) use Net_GeoIP for IP location detect
v 0.7:
add support for 'GeoIpCity.dat'
v 0.6:
change default design/template
v 0.5:
first release package
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Pz_WorldMap |
| Version | 1.0.8 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.7 to 1.0.8
- app/code/community/Pz/WorldMap/Block/Map/Abstract.php +26 -14
- app/code/community/Pz/WorldMap/Model/Ip.php +1 -12
- app/code/community/Pz/WorldMap/etc/config.xml +14 -9
- app/code/community/Pz/WorldMap/etc/system.xml +47 -6
- app/design/adminhtml/default/default/layout/worldmap.xml +10 -0
- app/design/adminhtml/default/default/template/worldmap/map/country.phtml +0 -1
- app/design/adminhtml/default/default/template/worldmap/map/marker.phtml +0 -2
- app/design/adminhtml/default/default/template/worldmap/page/head.phtml +19 -10
- package.xml +7 -4
app/code/community/Pz/WorldMap/Block/Map/Abstract.php
CHANGED
|
@@ -25,7 +25,7 @@
|
|
| 25 |
* @package Pz_WorldMap
|
| 26 |
*
|
| 27 |
* @author Cheng Wei <cheng.wei@zosoft.net>
|
| 28 |
-
* @version $$Id: Abstract.php
|
| 29 |
* @copyright Copyright (C) 2010 Z.O. Software, China (http://www.zosoft.net)
|
| 30 |
*/
|
| 31 |
|
|
@@ -34,13 +34,13 @@
|
|
| 34 |
*
|
| 35 |
* @package Pz_WorldMap
|
| 36 |
* @author Cheng Wei <cheng.wei@zosoft.net>
|
| 37 |
-
* @version $$Id: Abstract.php
|
| 38 |
*/
|
| 39 |
class Pz_WorldMap_Block_Map_Abstract extends Mage_Core_Block_Template implements
|
| 40 |
Mage_Widget_Block_Interface {
|
| 41 |
-
|
| 42 |
protected static $mapJsEnabled = false;
|
| 43 |
-
|
| 44 |
/**
|
| 45 |
* prepare layout, set default template
|
| 46 |
*/
|
|
@@ -48,22 +48,22 @@ class Pz_WorldMap_Block_Map_Abstract extends Mage_Core_Block_Template implements
|
|
| 48 |
|
| 49 |
parent::_prepareLayout();
|
| 50 |
|
| 51 |
-
if (
|
| 52 |
$this->setMapId('map_' . md5(time() . rand(0, 999)));
|
| 53 |
}
|
| 54 |
-
if (
|
| 55 |
$this->setMapWidth(640);
|
| 56 |
}
|
| 57 |
-
if (
|
| 58 |
$this->setMapHeight(420);
|
| 59 |
}
|
| 60 |
-
if (
|
| 61 |
$this->setMapCenterLatitude(22.5);
|
| 62 |
}
|
| 63 |
-
if (
|
| 64 |
$this->setMapCenterLongitude(0);
|
| 65 |
}
|
| 66 |
-
if (
|
| 67 |
$this->setMapZoom(1);
|
| 68 |
}
|
| 69 |
}
|
|
@@ -72,14 +72,26 @@ class Pz_WorldMap_Block_Map_Abstract extends Mage_Core_Block_Template implements
|
|
| 72 |
*
|
| 73 |
*/
|
| 74 |
protected function _beforeToHtml() {
|
| 75 |
-
if (!
|
| 76 |
$protocal = 'http';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off') {
|
| 78 |
-
|
| 79 |
-
|
|
|
|
| 80 |
}
|
|
|
|
| 81 |
$html = "<script src='$protocal://www.google.com/jsapi'></script>";
|
| 82 |
-
$html .= "<script type='text/javascript'>google.load('maps', '3', {other_params: 'sensor=false'});</script>";
|
| 83 |
echo $html;
|
| 84 |
|
| 85 |
self::$mapJsEnabled = true;
|
| 25 |
* @package Pz_WorldMap
|
| 26 |
*
|
| 27 |
* @author Cheng Wei <cheng.wei@zosoft.net>
|
| 28 |
+
* @version $$Id: Abstract.php 121 2010-12-21 03:24:56Z cwei $$
|
| 29 |
* @copyright Copyright (C) 2010 Z.O. Software, China (http://www.zosoft.net)
|
| 30 |
*/
|
| 31 |
|
| 34 |
*
|
| 35 |
* @package Pz_WorldMap
|
| 36 |
* @author Cheng Wei <cheng.wei@zosoft.net>
|
| 37 |
+
* @version $$Id: Abstract.php 121 2010-12-21 03:24:56Z cwei $$
|
| 38 |
*/
|
| 39 |
class Pz_WorldMap_Block_Map_Abstract extends Mage_Core_Block_Template implements
|
| 40 |
Mage_Widget_Block_Interface {
|
| 41 |
+
|
| 42 |
protected static $mapJsEnabled = false;
|
| 43 |
+
|
| 44 |
/**
|
| 45 |
* prepare layout, set default template
|
| 46 |
*/
|
| 48 |
|
| 49 |
parent::_prepareLayout();
|
| 50 |
|
| 51 |
+
if (!$this->getMapId()) {
|
| 52 |
$this->setMapId('map_' . md5(time() . rand(0, 999)));
|
| 53 |
}
|
| 54 |
+
if (!$this->getMapWidth()) {
|
| 55 |
$this->setMapWidth(640);
|
| 56 |
}
|
| 57 |
+
if (!$this->getMapHeight()) {
|
| 58 |
$this->setMapHeight(420);
|
| 59 |
}
|
| 60 |
+
if (!$this->getMapCenterLatitude()) {
|
| 61 |
$this->setMapCenterLatitude(22.5);
|
| 62 |
}
|
| 63 |
+
if (!$this->getMapCenterLongitude()) {
|
| 64 |
$this->setMapCenterLongitude(0);
|
| 65 |
}
|
| 66 |
+
if (!$this->getMapZoom()) {
|
| 67 |
$this->setMapZoom(1);
|
| 68 |
}
|
| 69 |
}
|
| 72 |
*
|
| 73 |
*/
|
| 74 |
protected function _beforeToHtml() {
|
| 75 |
+
if (!self::$mapJsEnabled) {
|
| 76 |
$protocal = 'http';
|
| 77 |
+
$paddParam = "";
|
| 78 |
+
|
| 79 |
+
$clientId = Mage::getStoreConfig('worldmap/googlemap/client_id');
|
| 80 |
+
if (substr($clientId, 0, 4) == 'gme-') {
|
| 81 |
+
$clientId = substr($clientId, 4);
|
| 82 |
+
}
|
| 83 |
+
if ($clientId) {
|
| 84 |
+
$paddParam = "client=gme-$clientId&";
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off') {
|
| 88 |
+
if ($clientId) {
|
| 89 |
+
$protocal .= 's';
|
| 90 |
+
}
|
| 91 |
}
|
| 92 |
+
|
| 93 |
$html = "<script src='$protocal://www.google.com/jsapi'></script>";
|
| 94 |
+
$html .= "<script type='text/javascript'>google.load('maps', '3', {other_params: '{$paddParam}sensor=false'});</script>";
|
| 95 |
echo $html;
|
| 96 |
|
| 97 |
self::$mapJsEnabled = true;
|
app/code/community/Pz/WorldMap/Model/Ip.php
CHANGED
|
@@ -8012,7 +8012,7 @@ class Pz_WorldMap_Model_Ip extends Mage_Core_Model_Abstract {
|
|
| 8012 |
if (self::$geo === null) {
|
| 8013 |
self::$geo = false;
|
| 8014 |
|
| 8015 |
-
$file = Mage::getStoreConfig('worldmap/
|
| 8016 |
$path = Mage::getBaseDir('var') . DS . $file;
|
| 8017 |
|
| 8018 |
if (is_file($path)) {
|
|
@@ -8020,17 +8020,6 @@ class Pz_WorldMap_Model_Ip extends Mage_Core_Model_Abstract {
|
|
| 8020 |
} else {
|
| 8021 |
Mage::throwException("GeoIP database file not found");
|
| 8022 |
}
|
| 8023 |
-
/*
|
| 8024 |
-
$path = Mage::getBaseDir('lib') . DS . 'PEAR' . DS . 'Net' . DS . 'GeoIP';
|
| 8025 |
-
|
| 8026 |
-
$file = $path . DS . 'fips-map.php';
|
| 8027 |
-
include ($file);
|
| 8028 |
-
self::$fipsMap = $CONVERT_TABLE;
|
| 8029 |
-
|
| 8030 |
-
$file = $path . DS . 'geoipregionvars.php';
|
| 8031 |
-
include ($file);
|
| 8032 |
-
self::$nameMap = $GEOIP_REGION_NAME;
|
| 8033 |
-
*/
|
| 8034 |
}
|
| 8035 |
return self::$geo;
|
| 8036 |
}
|
| 8012 |
if (self::$geo === null) {
|
| 8013 |
self::$geo = false;
|
| 8014 |
|
| 8015 |
+
$file = Mage::getStoreConfig('worldmap/geoip/filename');
|
| 8016 |
$path = Mage::getBaseDir('var') . DS . $file;
|
| 8017 |
|
| 8018 |
if (is_file($path)) {
|
| 8020 |
} else {
|
| 8021 |
Mage::throwException("GeoIP database file not found");
|
| 8022 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8023 |
}
|
| 8024 |
return self::$geo;
|
| 8025 |
}
|
app/code/community/Pz/WorldMap/etc/config.xml
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
<config>
|
| 33 |
<modules>
|
| 34 |
<Pz_WorldMap>
|
| 35 |
-
<version>1.0.
|
| 36 |
</Pz_WorldMap>
|
| 37 |
</modules>
|
| 38 |
<global>
|
|
@@ -132,13 +132,13 @@
|
|
| 132 |
</frontend>
|
| 133 |
<admin>
|
| 134 |
<routers>
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
</routers>
|
| 143 |
</admin>
|
| 144 |
<adminhtml>
|
|
@@ -196,12 +196,17 @@
|
|
| 196 |
</adminhtml>
|
| 197 |
<default>
|
| 198 |
<worldmap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
<setting>
|
| 200 |
<show_frontend>1</show_frontend>
|
| 201 |
<show_customer_name>1</show_customer_name>
|
| 202 |
<marker_format>[{CUSTOMER_NAME}] {LOCATION}, {REMOTE_IP}</marker_format>
|
| 203 |
<region_backend>world</region_backend>
|
| 204 |
-
<filename>GeoLiteCity.dat</filename>
|
| 205 |
</setting>
|
| 206 |
</worldmap>
|
| 207 |
</default>
|
| 32 |
<config>
|
| 33 |
<modules>
|
| 34 |
<Pz_WorldMap>
|
| 35 |
+
<version>1.0.8</version>
|
| 36 |
</Pz_WorldMap>
|
| 37 |
</modules>
|
| 38 |
<global>
|
| 132 |
</frontend>
|
| 133 |
<admin>
|
| 134 |
<routers>
|
| 135 |
+
<adminhtml>
|
| 136 |
+
<args>
|
| 137 |
+
<modules>
|
| 138 |
+
<worldmap after="Mage_Adminhtml">Pz_WorldMap</worldmap>
|
| 139 |
+
</modules>
|
| 140 |
+
</args>
|
| 141 |
+
</adminhtml>
|
| 142 |
</routers>
|
| 143 |
</admin>
|
| 144 |
<adminhtml>
|
| 196 |
</adminhtml>
|
| 197 |
<default>
|
| 198 |
<worldmap>
|
| 199 |
+
<googlemap>
|
| 200 |
+
<client_id></client_id>
|
| 201 |
+
</googlemap>
|
| 202 |
+
<geoip>
|
| 203 |
+
<filename>GeoLiteCity.dat</filename>
|
| 204 |
+
</geoip>
|
| 205 |
<setting>
|
| 206 |
<show_frontend>1</show_frontend>
|
| 207 |
<show_customer_name>1</show_customer_name>
|
| 208 |
<marker_format>[{CUSTOMER_NAME}] {LOCATION}, {REMOTE_IP}</marker_format>
|
| 209 |
<region_backend>world</region_backend>
|
|
|
|
| 210 |
</setting>
|
| 211 |
</worldmap>
|
| 212 |
</default>
|
app/code/community/Pz/WorldMap/etc/system.xml
CHANGED
|
@@ -41,24 +41,46 @@
|
|
| 41 |
<show_in_store>1</show_in_store>
|
| 42 |
<groups>
|
| 43 |
|
| 44 |
-
<
|
| 45 |
-
<label>
|
| 46 |
<frontend_type>text</frontend_type>
|
| 47 |
<sort_order>10</sort_order>
|
| 48 |
<show_in_default>1</show_in_default>
|
| 49 |
<show_in_website>1</show_in_website>
|
| 50 |
<show_in_store>1</show_in_store>
|
| 51 |
<fields>
|
| 52 |
-
<
|
| 53 |
-
<label>
|
| 54 |
-
<comment><![CDATA[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
<frontend_type>text</frontend_type>
|
| 56 |
<sort_order>10</sort_order>
|
| 57 |
<show_in_default>1</show_in_default>
|
| 58 |
<show_in_website>1</show_in_website>
|
| 59 |
<show_in_store>1</show_in_store>
|
| 60 |
-
</
|
|
|
|
|
|
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
<show_frontend translate="label,comment">
|
| 63 |
<label>Show online map in frontend</label>
|
| 64 |
<frontend_type>select</frontend_type>
|
|
@@ -107,6 +129,25 @@
|
|
| 107 |
</fields>
|
| 108 |
</setting>
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
</groups>
|
| 111 |
</worldmap>
|
| 112 |
</sections>
|
| 41 |
<show_in_store>1</show_in_store>
|
| 42 |
<groups>
|
| 43 |
|
| 44 |
+
<googlemap translate="label">
|
| 45 |
+
<label>Google Maps</label>
|
| 46 |
<frontend_type>text</frontend_type>
|
| 47 |
<sort_order>10</sort_order>
|
| 48 |
<show_in_default>1</show_in_default>
|
| 49 |
<show_in_website>1</show_in_website>
|
| 50 |
<show_in_store>1</show_in_store>
|
| 51 |
<fields>
|
| 52 |
+
<client_id translate="label,comment">
|
| 53 |
+
<label>Client ID of Google Maps API Premier</label>
|
| 54 |
+
<comment><![CDATA[
|
| 55 |
+
<a href="http://code.google.com/intl/en/apis/maps/documentation/premier/">Google Maps API Premier</a>
|
| 56 |
+
includes everything you love about Google Maps, plus:
|
| 57 |
+
<ul>
|
| 58 |
+
<li>* Greater capacity for service requestsg</li>
|
| 59 |
+
<li>* The ability to provide secure maps over <b>https</b></li>
|
| 60 |
+
<li>* Business-friendly terms and conditions</li>
|
| 61 |
+
<li>* Support and service options</li>
|
| 62 |
+
<li>* Control over advertisements within the maps</li>
|
| 63 |
+
</ul>
|
| 64 |
+
<b>If you want use https for backend, you will need it.</b>
|
| 65 |
+
<a href="http://code.google.com/intl/en/apis/maps/faq.html#ssl">See here</a>
|
| 66 |
+
]]></comment>
|
| 67 |
<frontend_type>text</frontend_type>
|
| 68 |
<sort_order>10</sort_order>
|
| 69 |
<show_in_default>1</show_in_default>
|
| 70 |
<show_in_website>1</show_in_website>
|
| 71 |
<show_in_store>1</show_in_store>
|
| 72 |
+
</client_id>
|
| 73 |
+
</fields>
|
| 74 |
+
</googlemap>
|
| 75 |
|
| 76 |
+
<setting translate="label">
|
| 77 |
+
<label>Map Setting</label>
|
| 78 |
+
<frontend_type>text</frontend_type>
|
| 79 |
+
<sort_order>10</sort_order>
|
| 80 |
+
<show_in_default>1</show_in_default>
|
| 81 |
+
<show_in_website>1</show_in_website>
|
| 82 |
+
<show_in_store>1</show_in_store>
|
| 83 |
+
<fields>
|
| 84 |
<show_frontend translate="label,comment">
|
| 85 |
<label>Show online map in frontend</label>
|
| 86 |
<frontend_type>select</frontend_type>
|
| 129 |
</fields>
|
| 130 |
</setting>
|
| 131 |
|
| 132 |
+
<geoip translate="label">
|
| 133 |
+
<label>GeoIP</label>
|
| 134 |
+
<frontend_type>text</frontend_type>
|
| 135 |
+
<sort_order>10</sort_order>
|
| 136 |
+
<show_in_default>1</show_in_default>
|
| 137 |
+
<show_in_website>1</show_in_website>
|
| 138 |
+
<show_in_store>1</show_in_store>
|
| 139 |
+
<fields>
|
| 140 |
+
<filename translate="label,comment">
|
| 141 |
+
<label>GeoIP City database file name</label>
|
| 142 |
+
<comment><![CDATA[GeoIP City database file, both GeoIP City and GeoLite City will be OK. You can download GeoLite City for free from <a href='http://www.maxmind.com/app/geolitecity'>MaxMind</a>]]></comment>
|
| 143 |
+
<frontend_type>text</frontend_type>
|
| 144 |
+
<sort_order>10</sort_order>
|
| 145 |
+
<show_in_default>1</show_in_default>
|
| 146 |
+
<show_in_website>1</show_in_website>
|
| 147 |
+
<show_in_store>1</show_in_store>
|
| 148 |
+
</filename>
|
| 149 |
+
</fields>
|
| 150 |
+
</geoip>
|
| 151 |
</groups>
|
| 152 |
</worldmap>
|
| 153 |
</sections>
|
app/design/adminhtml/default/default/layout/worldmap.xml
CHANGED
|
@@ -45,6 +45,16 @@ Supported layout update handles (special):
|
|
| 45 |
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
| 46 |
</reference>
|
| 47 |
</editor>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
<adminhtml_widget_instance_edit>
|
| 49 |
<reference name="head">
|
| 50 |
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
| 45 |
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
| 46 |
</reference>
|
| 47 |
</editor>
|
| 48 |
+
<worldmap_adminhtml_online_marker>
|
| 49 |
+
<reference name="head">
|
| 50 |
+
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
| 51 |
+
</reference>
|
| 52 |
+
</worldmap_adminhtml_online_marker>
|
| 53 |
+
<worldmap_adminhtml_online_geomap>
|
| 54 |
+
<reference name="head">
|
| 55 |
+
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
| 56 |
+
</reference>
|
| 57 |
+
</worldmap_adminhtml_online_geomap>
|
| 58 |
<adminhtml_widget_instance_edit>
|
| 59 |
<reference name="head">
|
| 60 |
<action method="setTemplate"><template>worldmap/page/head.phtml</template></action>
|
app/design/adminhtml/default/default/template/worldmap/map/country.phtml
CHANGED
|
@@ -15,7 +15,6 @@ if (!$region) {
|
|
| 15 |
}
|
| 16 |
}
|
| 17 |
?>
|
| 18 |
-
<script type='text/javascript' src='http://www.google.com/jsapi'></script>
|
| 19 |
|
| 20 |
<script type='text/javascript'>
|
| 21 |
google.load('visualization', '1', {'packages': ['geomap']});
|
| 15 |
}
|
| 16 |
}
|
| 17 |
?>
|
|
|
|
| 18 |
|
| 19 |
<script type='text/javascript'>
|
| 20 |
google.load('visualization', '1', {'packages': ['geomap']});
|
app/design/adminhtml/default/default/template/worldmap/map/marker.phtml
CHANGED
|
@@ -36,7 +36,6 @@ $visitors = $this->getVisitors();
|
|
| 36 |
$flagCustomer = $this->getSkinUrl('images/customer-flag.png');
|
| 37 |
$flagGuest = $this->getSkinUrl('images/guest-flag.png');
|
| 38 |
?>
|
| 39 |
-
<script src="http://www.google.com/jsapi"></script>
|
| 40 |
<script src="<?php echo Mage::getBaseUrl('js')?>map/markerclusterer.js" type="text/javascript"></script>
|
| 41 |
|
| 42 |
<div class="content-header">
|
|
@@ -54,7 +53,6 @@ $flagGuest = $this->getSkinUrl('images/guest-flag.png');
|
|
| 54 |
<div id="map_canvas" style="width: 1000px; height: 600px"></div>
|
| 55 |
|
| 56 |
<script type="text/javascript">
|
| 57 |
-
google.load('maps', '3', {other_params: 'sensor=false'});
|
| 58 |
|
| 59 |
PzMarkerMap = Class.create();
|
| 60 |
PzMarkerMap.prototype = {
|
| 36 |
$flagCustomer = $this->getSkinUrl('images/customer-flag.png');
|
| 37 |
$flagGuest = $this->getSkinUrl('images/guest-flag.png');
|
| 38 |
?>
|
|
|
|
| 39 |
<script src="<?php echo Mage::getBaseUrl('js')?>map/markerclusterer.js" type="text/javascript"></script>
|
| 40 |
|
| 41 |
<div class="content-header">
|
| 53 |
<div id="map_canvas" style="width: 1000px; height: 600px"></div>
|
| 54 |
|
| 55 |
<script type="text/javascript">
|
|
|
|
| 56 |
|
| 57 |
PzMarkerMap = Class.create();
|
| 58 |
PzMarkerMap.prototype = {
|
app/design/adminhtml/default/default/template/worldmap/page/head.phtml
CHANGED
|
@@ -1,17 +1,26 @@
|
|
| 1 |
<?php
|
| 2 |
$path = dirname(__FILE__);
|
| 3 |
-
$file = $path.DS.'..'.DS.'..'.DS.'page'.DS.'head.phtml';
|
| 4 |
-
include($file);
|
| 5 |
|
| 6 |
$protocal = 'http';
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
-
?>
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
<script
|
| 16 |
-
google.load('maps', '3', {other_params: 'sensor=false'});
|
| 17 |
-
|
|
|
| 1 |
<?php
|
| 2 |
$path = dirname(__FILE__);
|
| 3 |
+
$file = $path . DS . '..' . DS . '..' . DS . 'page' . DS . 'head.phtml';
|
| 4 |
+
include ($file);
|
| 5 |
|
| 6 |
$protocal = 'http';
|
| 7 |
+
$paddParam = "";
|
| 8 |
+
|
| 9 |
+
$clientId = Mage::getStoreConfig('worldmap/googlemap/client_id');
|
| 10 |
+
if (substr($clientId, 0, 4) == 'gme-') {
|
| 11 |
+
$clientId = substr($clientId, 4);
|
| 12 |
+
}
|
| 13 |
+
if ($clientId) {
|
| 14 |
+
$paddParam = "client=gme-$clientId&";
|
| 15 |
}
|
|
|
|
| 16 |
|
| 17 |
+
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off') {
|
| 18 |
+
if ($clientId) {
|
| 19 |
+
$protocal .= 's';
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
|
| 23 |
+
$html = "<script src='$protocal://www.google.com/jsapi'></script>";
|
| 24 |
+
$html .= "<script type='text/javascript'>google.load('maps', '3', {other_params: '{$paddParam}sensor=false'});</script>";
|
| 25 |
+
echo $html;
|
| 26 |
+
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Pz_WorldMap</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,7 +10,10 @@
|
|
| 10 |
<description>Online user's world map, show who is online and where they are.
|
| 11 |
|
| 12 |
Widget for google map.</description>
|
| 13 |
-
<notes>v 1.0.
|
|
|
|
|
|
|
|
|
|
| 14 |
fix issue of marker cluster
|
| 15 |
|
| 16 |
v 1.0.6:
|
|
@@ -49,8 +52,8 @@ v 0.5:
|
|
| 49 |
first release package</notes>
|
| 50 |
<authors><author><name>Cheng Wei</name><user>auto-converted</user><email>berlios.o@gmail.com</email></author></authors>
|
| 51 |
<date>2010-12-21</date>
|
| 52 |
-
<time>
|
| 53 |
-
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="customer-flag.png" hash="8f33bab9b0c154462489b35140f29fae"/><file name="guest-flag.png" hash="47c715944bf946fd0cd9528cd8a016ae"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="customer-flag.png" hash="8f33bab9b0c154462489b35140f29fae"/><file name="guest-flag.png" hash="47c715944bf946fd0cd9528cd8a016ae"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="worldmap.xml" hash="
|
| 54 |
<compatible/>
|
| 55 |
<dependencies/>
|
| 56 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Pz_WorldMap</name>
|
| 4 |
+
<version>1.0.8</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>Online user's world map, show who is online and where they are.
|
| 11 |
|
| 12 |
Widget for google map.</description>
|
| 13 |
+
<notes>v 1.0.8:
|
| 14 |
+
change google map api loader style
|
| 15 |
+
|
| 16 |
+
v 1.0.7:
|
| 17 |
fix issue of marker cluster
|
| 18 |
|
| 19 |
v 1.0.6:
|
| 52 |
first release package</notes>
|
| 53 |
<authors><author><name>Cheng Wei</name><user>auto-converted</user><email>berlios.o@gmail.com</email></author></authors>
|
| 54 |
<date>2010-12-21</date>
|
| 55 |
+
<time>05:25:04</time>
|
| 56 |
+
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="customer-flag.png" hash="8f33bab9b0c154462489b35140f29fae"/><file name="guest-flag.png" hash="47c715944bf946fd0cd9528cd8a016ae"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><file name="customer-flag.png" hash="8f33bab9b0c154462489b35140f29fae"/><file name="guest-flag.png" hash="47c715944bf946fd0cd9528cd8a016ae"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="worldmap.xml" hash="735e3eebf47d318ff0e8a9bbb57998c0"/></dir><dir name="template"><dir name="worldmap"><dir name="info"><file name="geomap.phtml" hash="090e5dd9fbf704864c0c5488fa5c6fbe"/></dir><dir name="map"><file name="country.phtml" hash="053c87aaf144dbecf02d46c45fe38926"/><file name="marker.phtml" hash="834af87c67cf2f14dacf03a175d57788"/><file name="region.phtml" hash="65216785a0a95545890273b2ef314c96"/></dir><dir name="page"><file name="head.phtml" hash="0845e0a7a2d3f323164ebace4d924458"/></dir><dir name="widget"><dir name="map"><file name="selector.phtml" hash="288254500d326f7666d98667c43ca2a1"/></dir><dir name="marker"><file name="container.phtml" hash="1f3708de3e776a59ab32b123df50b15b"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="worldmap.xml" hash="3125174c306ac57e2a31b554b2a5666b"/></dir><dir name="template"><dir name="worldmap"><file name="map.phtml" hash="98c21afd0f5000a45b3cd5983a2b7619"/><file name="online.phtml" hash="c9c1af2b4d0dca3496275aa646ff300d"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="map"><file name="markerclusterer.js" hash="888ca22432babba0581ef0556cce0f6d"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pz_WorldMap.xml" hash="830c817474800247b94067a37c0dcb94"/></dir></target><target name="magelib"><dir name="PEAR"><dir name="Net"><dir name="GeoIP"><file name="DMA.php" hash="3041b17a8aab69ec3b63c017f1a0432d"/><file name="Location.php" hash="ddb36e4e7cacc2a50b67192a0eb79663"/></dir><file name="GeoIP.php" hash="e7bec2e088af4b24a27864f50a473b88"/></dir><dir name="PEAR"><file name="Exception.php" hash="f364e75223744d460a6bb08420ac94f9"/></dir></dir></target><target name="magecommunity"><dir name="Pz"><dir name="WorldMap"><dir name="Block"><dir name="Adminhtml"><dir name="Online"><dir name="Map"><file name="Geomap.php" hash="3821ff82dd0e2037ffed5b1f482e7e9c"/></dir><file name="Tabs.php" hash="d5b84909747d829fb70f166ffa70ac0e"/></dir><dir name="Widget"><dir name="Map"><file name="Selector.php" hash="d3c9eba22a61d6042755ce52142a2566"/></dir><dir name="Marker"><file name="Chooser.php" hash="7f6e16e50100c6936206c53c02c34b41"/></dir></dir></dir><dir name="Map"><file name="Abstract.php" hash="cc00647e1acdb5fc546c2f996d65be54"/></dir><file name="Links.php" hash="98cb18aa80b6e1addee1e09208baa1b6"/><file name="Map.php" hash="3d6d9a2344325adad25470fbfa92f30a"/><file name="Online.php" hash="891861764c00906bce6880f877dc901f"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="OnlineController.php" hash="a5ef08f28b95d240d8e11be553bd1301"/></dir><file name="IndexController.php" hash="5c607322b69e192c96e366d2682fae71"/></dir><dir name="etc"><file name="config.xml" hash="bb2028288c58527052efdee23cb03905"/><file name="system.xml" hash="ae53e429b14960f50906b16428c4e552"/><file name="widget.xml" hash="61a72497df972e2009df7b56b84e449e"/></dir><dir name="Helper"><file name="Data.php" hash="cb91df6e8ce5572afc3170908cec2710"/></dir><dir name="Model"><dir name="Entity"><dir name="Visitor"><file name="Online.php" hash="c38d1dd15e4b63fbc45696c8e80f741a"/></dir><file name="Setup.php" hash="5a8ce3adef8cf0389c16d9bae073e1a8"/><file name="Visitor.php" hash="8e17410114896ad10bc9a0c1e8bb3518"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Region.php" hash="4f4f07e53521b7a7e408c67a912346f0"/></dir></dir></dir><file name="Ip.php" hash="1cafb48afbfe2591cd38a0ec9b619d83"/><file name="Observe.php" hash="dd9e9487d5d17a4ade1c5784e20b2601"/><file name="Visitor.php" hash="65ab2dc020e82ab51dc19d5f6a9519f5"/></dir><dir name="sql"><dir name="worldmap_setup"><file name="mysql4-install-0.1.0.php" hash="1228c98bf7b826922f62892bb87e46c8"/><file name="mysql4-upgrade-0.1.0-0.8.0.php" hash="db893e0bd0fd8cf1ac21d7af923c8d02"/><file name="mysql4-upgrade-0.9.6-1.0.0.php" hash="a6639ea73faf46ddad49316969373248"/></dir></dir></dir></dir></target></contents>
|
| 57 |
<compatible/>
|
| 58 |
<dependencies/>
|
| 59 |
</package>
|
