Google Map Shortcode - Version 3.1.1

Version Description

  • Editor box added for icons and thumbnails.
Download this release

Release Info

Developer alaingg
Plugin Icon wp plugin Google Map Shortcode
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1 to 3.1.1

google-map-shortcode.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Google Map Shortcode
4
Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
5
Description: Include Google Maps in your blogs easily and allow multiple interactions.
6
- Version: 3.1
7
Author: Alain Gonzalez
8
Author URI: http://web-argument.com/
9
*/
@@ -26,7 +26,7 @@ Author URI: http://web-argument.com/
26
27
define('GMSC_PLUGIN_DIR', WP_PLUGIN_DIR."/".dirname(plugin_basename(__FILE__)));
28
define('GMSC_PLUGIN_URL', WP_PLUGIN_URL."/".dirname(plugin_basename(__FILE__)));
29
- define('GMSHC_VERSION_CURRENT','3.1');
30
define('GMSHC_VERSION_CHECK','2.2');
31
32
require(GMSC_PLUGIN_DIR."/include/functions.php");
@@ -138,7 +138,7 @@ add_action('wp_enqueue_scripts', 'gmshc_enqueue_scripts');
138
$defaul_gmshc_windowhtml .= "<img src='".GMSC_PLUGIN_URL."/images/open.jpg' style='float: right; margin-right:5px'/> \n";
139
$defaul_gmshc_windowhtml .= "<a href='%open_map%' target='_blank' style='font-size:11px; float: right; display:block;'>Open Map</a>\n";
140
$defaul_gmshc_windowhtml .= "</div>\n";
141
- $defaul_gmshc_windowhtml .= "<div style='float:left'><a title='%link%' href='%link%'>%thubnail%</div></a>\n";
142
$defaul_gmshc_windowhtml .= "</div>\n";
143
144
return $defaul_gmshc_windowhtml;
@@ -598,7 +598,8 @@ function gmshc_tab_process(){
598
</a>
599
</p>
600
601
- <p><?php echo $post_points->points_number." ".__("Points Added","google-map-sc") ?></p>
602
<?php } ?>
603
604
<?php
@@ -606,7 +607,7 @@ function gmshc_tab_process(){
606
rsort($post_points -> points);
607
?>
608
609
- <table class="widefat" cellspacing="0">
610
<thead>
611
<tr>
612
<th><?php _e("#"); ?></th>
@@ -625,27 +626,28 @@ function gmshc_tab_process(){
625
<tr>
626
<td><?php echo ($post_points->points_number - $i) ?></td>
627
<td>
628
- <img src="<?php echo $point->icon ?>" atl="<?php _e("Icon","google-map-sc") ?>" />
629
- <input name="icon[]" type="hidden" id="icon_<?php echo $i ?>" size="30" value = "<?php echo $point->icon ?>"/>
630
- <input name="pid[]" type="hidden" id="id_<?php echo $i ?>" size="30" value = "<?php echo $point->id ?>"/>
631
</td>
632
<td>
633
- <div class="gmshc_thumb gmshc_selected">
634
- <?php
635
- $point_thumbnail = "";
636
- if ($point->thumbnail != "") {
637
- if(is_numeric($point->thumbnail)){
638
- $thumb = wp_get_attachment_image_src($point->thumbnail, 'thumbnail');
639
- $point_thumbnail = $thumb[0];
640
- }else{
641
- $point_thumbnail = $point->thumbnail;
642
- }
643
- ?>
644
- <img src="<?php echo $point_thumbnail ?>" atl="<?php _e("Thumbnail","google-map-sc") ?>" width = "40" height="40" />
645
- <input name="thumb[]" type="hidden" id="thumb_<?php echo $i ?>" size="30" value = "<?php echo $point->thumbnail ?>"/>
646
-
647
- <?php } ?>
648
- </div>
649
</td>
650
<td>
651
<input name="title[]" type="text" id="title_<?php echo $i ?>" size="33" value = "<?php echo $point->title ?>"/>
@@ -667,7 +669,15 @@ function gmshc_tab_process(){
667
?>
668
</tbody>
669
</table>
670
-
671
<p><input class="button-primary insert_map" value="<?php _e("Insert Map","google-map-sc"); ?>" type="button" \>
672
<a class="button gmshc_show" href="#gmshc_map" show="<?php _e("Show Map","google-map-sc") ?>" hide="<?php _e("Hide Map","google-map-sc") ?>">
673
<?php _e("Show Map","google-map-sc") ?>
@@ -998,20 +1008,19 @@ function gmshc_options_page() {
998
999
<div id="gmshc_html">
1000
<div id="gmshc_previews">
1001
<p><strong><?php _e("Previews","google-map-sc") ?></strong></p>
1002
<div id="gmshc_html_previews">
1003
- <?php echo gmshc_defaul_windowhtml(); ?>
1004
</div>
1005
</div>
1006
<div id="gmshc_html_cont">
1007
<p><strong><?php _e("Custom Html","google-map-sc") ?></strong></p>
1008
<textarea name="windowhtml" cols="60" rows="12" id="windowhtml">
1009
- <?php
1010
- if (empty($windowhtml)) echo gmshc_defaul_windowhtml();
1011
- else {
1012
- echo str_replace("\\", "",$windowhtml);
1013
- }
1014
- ?>
1015
</textarea>
1016
</div>
1017
</div>
3
Plugin Name: Google Map Shortcode
4
Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
5
Description: Include Google Maps in your blogs easily and allow multiple interactions.
6
+ Version: 3.1.1
7
Author: Alain Gonzalez
8
Author URI: http://web-argument.com/
9
*/
26
27
define('GMSC_PLUGIN_DIR', WP_PLUGIN_DIR."/".dirname(plugin_basename(__FILE__)));
28
define('GMSC_PLUGIN_URL', WP_PLUGIN_URL."/".dirname(plugin_basename(__FILE__)));
29
+ define('GMSHC_VERSION_CURRENT','3.2');
30
define('GMSHC_VERSION_CHECK','2.2');
31
32
require(GMSC_PLUGIN_DIR."/include/functions.php");
138
$defaul_gmshc_windowhtml .= "<img src='".GMSC_PLUGIN_URL."/images/open.jpg' style='float: right; margin-right:5px'/> \n";
139
$defaul_gmshc_windowhtml .= "<a href='%open_map%' target='_blank' style='font-size:11px; float: right; display:block;'>Open Map</a>\n";
140
$defaul_gmshc_windowhtml .= "</div>\n";
141
+ $defaul_gmshc_windowhtml .= "<div style='float:left'><a title='%link%' href='%link%'>%thubnail%</a></div>\n";
142
$defaul_gmshc_windowhtml .= "</div>\n";
143
144
return $defaul_gmshc_windowhtml;
598
</a>
599
</p>
600
601
+ <p><?php echo $post_points->points_number." ".__("Points Added","google-map-sc") ?></p>
602
+ <p><em><?php _e("Click on the icons or thumbnails to edit.","google-map-sc") ?></em></p>
603
<?php } ?>
604
605
<?php
607
rsort($post_points -> points);
608
?>
609
610
+ <table class="widefat gmshc_points" cellspacing="0">
611
<thead>
612
<tr>
613
<th><?php _e("#"); ?></th>
626
<tr>
627
<td><?php echo ($post_points->points_number - $i) ?></td>
628
<td>
629
+ <div class="gmshc_list_icon" title="<?php _e("Change") ?>">
630
+ <img src="<?php echo $point->icon ?>" atl="<?php _e("Icon","google-map-sc") ?>" />
631
+ <input name="icon[]" type="hidden" id="icon_<?php echo $i ?>" size="30" value = "<?php echo $point->icon ?>"/>
632
+ </div>
633
+ <input name="pid[]" type="hidden" id="id_<?php echo $i ?>" size="30" value = "<?php echo $point->id ?>"/>
634
</td>
635
<td>
636
+ <div class="gmshc_list_thumb" title="<?php _e("Change") ?>">
637
+ <?php
638
+ $point_thumbnail = "";
639
+ if ($point->thumbnail != "") {
640
+ if(is_numeric($point->thumbnail)){
641
+ $thumb = wp_get_attachment_image_src($point->thumbnail, 'thumbnail');
642
+ $point_thumbnail = $thumb[0];
643
+ }else{
644
+ $point_thumbnail = $point->thumbnail;
645
+ }
646
+ }
647
+ ?>
648
+ <img src="<?php echo $point_thumbnail ?>" atl="<?php _e("Thumbnail","google-map-sc") ?>" width = "40" height="40" />
649
+ <input name="thumb[]" type="hidden" id="thumb_<?php echo $i ?>" size="30" value = "<?php echo $point->thumbnail ?>"/>
650
+ </div>
651
</td>
652
<td>
653
<input name="title[]" type="text" id="title_<?php echo $i ?>" size="33" value = "<?php echo $point->title ?>"/>
669
?>
670
</tbody>
671
</table>
672
+ <div id="gmshc_list_icon_cont">
673
+ <div class="gmshc_bx_tl"><span><?php _e("Click to Select")?></span><a href="" class="gmshc_box_close"><?php _e("Close") ?></a></div>
674
+ <div class="gmshc_bx"></div>
675
+ </div>
676
+ <div id="gmshc_list_thumb_cont">
677
+ <div class="gmshc_bx_tl"><span><?php _e("Click to Select")?></span><a href="" class="gmshc_box_close"><?php _e("Close") ?></a></div>
678
+ <div class="gmshc_bx"></div>
679
+ </div>
680
+
681
<p><input class="button-primary insert_map" value="<?php _e("Insert Map","google-map-sc"); ?>" type="button" \>
682
<a class="button gmshc_show" href="#gmshc_map" show="<?php _e("Show Map","google-map-sc") ?>" hide="<?php _e("Hide Map","google-map-sc") ?>">
683
<?php _e("Show Map","google-map-sc") ?>
1008
1009
<div id="gmshc_html">
1010
<div id="gmshc_previews">
1011
+ <?php
1012
+ $current_html = gmshc_defaul_windowhtml();
1013
+ if (!empty($windowhtml)) $current_html = str_replace("\\", "",$windowhtml);
1014
+ ?>
1015
<p><strong><?php _e("Previews","google-map-sc") ?></strong></p>
1016
<div id="gmshc_html_previews">
1017
+ <?php echo $current_html; ?>
1018
</div>
1019
</div>
1020
<div id="gmshc_html_cont">
1021
<p><strong><?php _e("Custom Html","google-map-sc") ?></strong></p>
1022
<textarea name="windowhtml" cols="60" rows="12" id="windowhtml">
1023
+ <?php echo $current_html; ?>
1024
</textarea>
1025
</div>
1026
</div>
images/tb-close.png ADDED
Binary file
include/functions.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/**
3
* Google Map Shortcode
4
- * Version: 3.1
5
* Author: Alain Gonzalez
6
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
7
*/
@@ -319,7 +319,7 @@ function gmshc_get_points($post_id) {
319
$post_data_ltlg = get_post_meta($post_id,'google-map-sc-latlng');
320
321
if (count($post_data_ltlg) > 0) {
322
- print_r($post_data_ltlg);
323
foreach ($post_data_ltlg as $point_ltlg){
324
$point_obj_ltlg = new GMSHC_Point();
325
if ($point_obj_ltlg -> create_point("","",$point_ltlg,$post_title,"",$default_icon,"",$post_id)){
@@ -612,7 +612,7 @@ function gmshc_available_modules(){
612
"copy" => __("Allow more interaction with your maps, including a slideshow with the points images."),
613
"url" => "http://web-argument.com/google-map-shortcode-modules/#slideshow",
614
"image" => GMSC_PLUGIN_URL."/images/slideshow.jpg"
615
- ),
616
array(
617
"id" => "scroller",
618
"name" => __("Scroller"),
1
<?php
2
/**
3
* Google Map Shortcode
4
+ * Version: 3.1.1
5
* Author: Alain Gonzalez
6
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
7
*/
319
$post_data_ltlg = get_post_meta($post_id,'google-map-sc-latlng');
320
321
if (count($post_data_ltlg) > 0) {
322
+
323
foreach ($post_data_ltlg as $point_ltlg){
324
$point_obj_ltlg = new GMSHC_Point();
325
if ($point_obj_ltlg -> create_point("","",$point_ltlg,$post_title,"",$default_icon,"",$post_id)){
612
"copy" => __("Allow more interaction with your maps, including a slideshow with the points images."),
613
"url" => "http://web-argument.com/google-map-shortcode-modules/#slideshow",
614
"image" => GMSC_PLUGIN_URL."/images/slideshow.jpg"
615
+ ),
616
array(
617
"id" => "scroller",
618
"name" => __("Scroller"),
js/gmshc-admin.js CHANGED
@@ -1,6 +1,6 @@
1
/**
2
* Google Map Shortcode
3
- * Version: 3.1
4
* Author: Alain Gonzalez
5
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
6
*/
@@ -51,6 +51,55 @@
51
var winHtml = $("#windowhtml").val();
52
53
$("#windowhtml").val($.trim(winHtml));
54
55
});
56
@@ -158,6 +207,8 @@
158
return false;
159
}
160
}
161
162
163
})(jQuery);
1
/**
2
* Google Map Shortcode
3
+ * Version: 3.1.1
4
* Author: Alain Gonzalez
5
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
6
*/
51
var winHtml = $("#windowhtml").val();
52
53
$("#windowhtml").val($.trim(winHtml));
54
+
55
+
56
+ $(".gmshc_list_icon, .gmshc_list_thumb").click(function(){
57
+ $(".gmshc_box_close").trigger("click");
58
+ $(this).addClass("gmshc_active");
59
+ var pos = $(this).position();
60
+ var posLeft = pos.left;
61
+ var posTop = pos.top;
62
+
63
+ var mapPos = $("#gmshc_map").position();
64
+ var mapPosTop = mapPos.top;
65
+
66
+ if ((posTop+200) > mapPosTop){
67
+ posTop = mapPosTop - 180;
68
+ }
69
+
70
+ var elem = "icon";
71
+ if ($(this).hasClass("gmshc_list_thumb")) {
72
+ elem = "thumb";
73
+ }
74
+
75
+ $('#gmshc_list_'+elem+'_cont').show(100,function(){
76
+ var children = $(".gmshc_bx",this).children(".gmshc_"+elem);
77
+ if (children.length == 0){
78
+ $('#gmshc_'+elem+'_cont')
79
+ .children(".gmshc_"+elem)
80
+ .clone()
81
+ .appendTo('#gmshc_list_'+elem+'_cont .gmshc_bx')
82
+ .removeClass("gmshc_selected")
83
+ .click(function(){
84
+ var imgSrc = $("img",this).attr("src");
85
+ var attch = imgSrc;
86
+ if (elem == "thumb") {
87
+ attch = $("img",this).attr("attch");
88
+ }
89
+ $("div.gmshc_active img").attr("src",imgSrc);
90
+ $("div.gmshc_active input").val(attch);
91
+ });
92
+ }
93
+ }).css({"left":(posLeft+50)+"px","top":posTop+"px"});
94
+
95
+ });
96
+
97
+
98
+ $(".gmshc_box_close").click(function(){
99
+ $("#gmshc_list_icon_cont, #gmshc_list_thumb_cont").hide();
100
+ $(".gmshc_list_icon, .gmshc_list_thumb").removeClass("gmshc_active");
101
+ return false;
102
+ });
103
104
});
105
207
return false;
208
}
209
}
210
+
211
+
212
213
214
})(jQuery);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: alaingg
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=support%40web%2dargument%2ecom&lc=US&item_name=Web%2dArgument%2ecom&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
4
Tags: google maps, shortcode, map, maps, categories, widget, post map, point, marker, list, location, address, images, geocoder, google maps, animation, slideshow, scroll, module
5
Requires at least: 2.5
6
- Tested up to: 3.3
7
- Stable tag: 3.1
8
9
Real Friendly integration of Google Maps instances into your blogs. The plugin allows to display multiple maps on your pages.
10
== Description ==
@@ -72,10 +72,14 @@ When the map is deployed or when the Google Map Shortcode Editor panel is open i
72
2. Google Map Shortcode Button
73
3. Google Map Shortcode editor panel
74
4. Google Map Shortcode Media Tab
75
- 5. Insert/Show map.
76
77
== Changelog ==
78
79
= 3.1 =
80
* Modules added.
81
* Polish language added.
@@ -148,4 +152,4 @@ When the map is deployed or when the Google Map Shortcode Editor panel is open i
148
== Upgrade Notice ==
149
150
= 3.1 =
151
- Upgrade is recommended to include the new modules feature and fix some bugs.
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=support%40web%2dargument%2ecom&lc=US&item_name=Web%2dArgument%2ecom&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
4
Tags: google maps, shortcode, map, maps, categories, widget, post map, point, marker, list, location, address, images, geocoder, google maps, animation, slideshow, scroll, module
5
Requires at least: 2.5
6
+ Tested up to: 3.3.1
7
+ Stable tag: 3.1.1
8
9
Real Friendly integration of Google Maps instances into your blogs. The plugin allows to display multiple maps on your pages.
10
== Description ==
72
2. Google Map Shortcode Button
73
3. Google Map Shortcode editor panel
74
4. Google Map Shortcode Media Tab
75
+ 5. Insert/Show map
76
+ 6. Edit thumbnail or icon
77
78
== Changelog ==
79
80
+ = 3.1.1 =
81
+ * Editor box added for icons and thumbnails.
82
+
83
= 3.1 =
84
* Modules added.
85
* Polish language added.
152
== Upgrade Notice ==
153
154
= 3.1 =
155
+ Upgrade is recommended to include the new modules feature and icons and thumbnails editor box.
screenshot-6.jpg ADDED
Binary file
styles/gmshc-admin-styles.css CHANGED
@@ -1,6 +1,6 @@
1
/**
2
* Google Map Shortcode
3
- * Version: 3.1
4
* Author: Alain Gonzalez
5
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
6
*/
@@ -21,7 +21,7 @@
21
height:65px;
22
}
23
24
- .gmshc_icon, .gmshc_thumb {
25
float:left;
26
cursor:pointer;
27
margin:1px;
@@ -31,17 +31,21 @@
31
text-align:center;
32
}
33
34
- .gmshc_icon {
35
width:37px;
36
height:37px;
37
}
38
39
- .gmshc_thumb {
40
padding:4px;
41
width:40px;
42
height:40px;
43
}
44
45
.gmshc_selected {
46
border:solid #CCC 1px !important;
47
background-color:#BBBBBB;
@@ -165,6 +169,51 @@ body#media-upload ul#sidemenu {
165
display:none;
166
}
167
168
169
170
1
/**
2
* Google Map Shortcode
3
+ * Version: 3.1.1
4
* Author: Alain Gonzalez
5
* Plugin URI: http://web-argument.com/google-map-shortcode-wordpress-plugin/
6
*/
21
height:65px;
22
}
23
24
+ .gmshc_icon, .gmshc_thumb, .gmshc_list_thumb, .gmshc_list_icon {
25
float:left;
26
cursor:pointer;
27
margin:1px;
31
text-align:center;
32
}
33
34
+ .gmshc_icon, .gmshc_list_icon {
35
width:37px;
36
height:37px;
37
}
38
39
+ .gmshc_thumb, .gmshc_list_thumb {
40
padding:4px;
41
width:40px;
42
height:40px;
43
}
44
45
+ .gmshc_list_icon:hover, .gmshc_list_thumb:hover{
46
+ border:solid 1px #999;
47
+ }
48
+
49
.gmshc_selected {
50
border:solid #CCC 1px !important;
51
background-color:#BBBBBB;
169
display:none;
170
}
171
172
+ #gmshc_list_icon_cont, #gmshc_list_thumb_cont{
173
+ position:absolute;
174
+ border:solid 1px #999;
175
+ box-shadow: 8px 8px 8px #AAAAAA;
176
+ display:none;
177
+ background-color:#FFF;
178
+ overflow:hidden;
179
+ }
180
+
181
+ .gmshc_bx{
182
+ overflow-y:auto;
183
+ overflow-x:hidden;
184
+ width:365px;
185
+ height:130px;
186
+ }
187
+
188
+ .gmshc_bx_tl{
189
+ overflow:hidden;
190
+ background-color:#222222;
191
+ color:#CFCFCF;
192
+ padding:5px;
193
+ }
194
+
195
+ .gmshc_bx_tl span{
196
+ display:block;
197
+ float:left;
198
+ width:200px;
199
+ }
200
+
201
+ .gmshc_icon:hover, .gmshc_thumb:hover{
202
+ border:solid #CCC 1px !important;
203
+ }
204
+
205
+ .gmshc_box_close{
206
+ float:right;
207
+ display:block;
208
+ background-image:url(../images/tb-close.png);
209
+ text-indent:-2000em;
210
+ width:15px;
211
+ height:15px;
212
+ overflow:hidden;
213
+ }
214
+
215
+
216
+
217
218
219