Changeset 514363
- Timestamp:
- 03/04/2012 11:09:23 PM (14 years ago)
- Location:
- welocally-places/trunk
- Files:
-
- 11 edited
-
options/about.php (modified) (1 diff)
-
options/options-general.php (modified) (2 diffs)
-
options/places-manager.php (modified) (5 diffs)
-
readme.txt (modified) (6 diffs)
-
resources/places.css (modified) (1 diff)
-
resources/wlplaces.js (modified) (2 diffs)
-
screenshot-1.gif (modified) (previous)
-
screenshot-2.gif (modified) (previous)
-
template-tags.php (modified) (1 diff)
-
views/places-meta-box.php (modified) (13 diffs)
-
welocally-places.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
welocally-places/trunk/options/about.php
r514360 r514363 92 92 <div><img width="48" height="48" src="<?php echo WP_PLUGIN_URL; ?>/welocally-places/resources/images/Crystal_Clear_cancel.png" alt="" title=""/></div> 93 93 <div>You have recenty upgraded Welocally Places. <?php echo(get_places_legacy_count()); ?> Legacy Posts were found. You can use the <a href="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/admin.php?page=welocally-places-manager' ?>">Place Manager</a> 94 to track your migration , we have also created a <a href="http://welocally.com/?p=780" target="_new">Release Guide</a>. Finally, if you have problems <a href="http://www.welocally.com/?page_id=139" target="_new">email us</a>.94 to track your migration. Please read the <a href="http://www.welocally.com/?page_id=104" target="_blank">help documentation</a> when upgrading. If you have problems <a href="http://www.welocally.com/?page_id=139" target="_new">email us</a>. 95 95 <p/><strong>ALWAYS BACKUP PRIOR TO UPGRADE</strong></div> 96 96 <?php else: ?> -
welocally-places/trunk/options/options-general.php
r514360 r514363 34 34 $options[ 'map_icon_web' ] = trim($_POST[ 'welocally_map_icon_web' ])?trim($_POST[ 'welocally_map_icon_web' ]):plugins_url() . "/welocally-places/resources/images/mapicons_web.png"; 35 35 $options[ 'map_icon_directions' ] = trim($_POST[ 'welocally_map_icon_directions' ])? trim($_POST[ 'welocally_map_icon_directions' ]):plugins_url() . "/welocally-places/resources/images/mapicons_car.png"; 36 $options[ 'map_custom_style' ] = base64_encode(str_replace( '\"', '"', $_POST[ 'welocally_map_custom_style' ] ) );36 $options[ 'map_custom_style' ] = str_replace( '\"', '"', $_POST[ 'welocally_map_custom_style' ] ) ; 37 37 38 38 $options[ 'font_place_name' ] = $_POST[ 'welocally_font_place_name' ]; … … 260 260 <th scope="row"><?php _e( 'Custom Map Style' ); ?></th> 261 261 <td> 262 <textarea rows="4" cols="60" name="welocally_map_custom_style"><?php printf( base64_decode($options[ 'map_custom_style' ])); ?></textarea><br/>262 <textarea rows="4" cols="60" name="welocally_map_custom_style"><?php printf($options[ 'map_custom_style' ]); ?></textarea><br/> 263 263 <span class="description"><?php _e( 'This is the custom styling for your maps. Leave blank to use default style. To style your map use the <a href="http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html">Maps Style Wizard</a>' ); ?></span> 264 264 </td> -
welocally-places/trunk/options/places-manager.php
r514360 r514363 45 45 <fieldset> 46 46 <span class="wl_options_heading"><?php _e( 'Places' ); ?></span> 47 <p/> 47 48 <table class="form-table"> 49 48 50 <?php 49 51 $places_found = false; 50 52 $index = 0; 51 53 $pindex = 0; 52 $posts = get_posts(); 54 $args = array( 'numberposts' => 5000, 'orderby' => 'post_date', 'order' => 'ASC' ); 55 $posts = get_posts($args); 53 56 foreach( $posts as $post ) { 54 $places = get_post_places($post->ID); 55 echo("<tr class=\"d".($index & 1)."\">"); 57 $places = get_post_places($post->ID); 56 58 if(count($places)>0): 57 59 $places_found = true; 60 echo("<tr class=\"d".($pindex & 1)."\">"); 58 61 ?> 59 62 <td> 60 63 <div> 64 <h1><?php echo($pindex+1); ?></h1> 61 65 <input type="checkbox" name="post_id[]" value="<?php echo($post->ID) ?>" /> 62 66 <a href="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/post.php?post='.$post->ID.'&action=edit' ?>"><strong><?php print_r($post->post_title) ?></strong></a> Places Linked: <?php echo(count($places));?> … … 80 84 81 85 82 <?php 83 $pindex=$pindex+1; 86 <?php 84 87 endforeach; 88 if($places_found){ 89 $pindex=$pindex+1; 90 } 85 91 endif; 86 92 ?> … … 122 128 <div><img width="48" height="48" src="<?php echo WP_PLUGIN_URL; ?>/welocally-places/resources/images/Crystal_Clear_cancel.png" alt="" title=""/></div> 123 129 <div><strong>You need to relink the places in this section!</strong> You have recenty upgraded Welocally Places. <?php print_r(get_places_legacy_count()); ?> Legacy Posts were found. 124 We have created a <a href="http://welocally.com/?p=780" target="_new">Release Guide</a>. Finally, if you have problems <a href="http://www.welocally.com/?page_id=139" target="_new">email us</a>.130 Please read the <a href="http://www.welocally.com/?page_id=104" target="_blank">help documentation</a> when upgrading. If you have problems <a href="http://www.welocally.com/?page_id=139" target="_new">email us</a>. 125 131 <p/><strong>ALWAYS BACKUP PRIOR TO UPGRADE</strong></div> 126 132 … … 132 138 $places = get_legacy_place_by_post_id($post->ID); 133 139 echo("<tr class=\"d".($index & 1)."\">"); 134 if( count($places)>0):140 if(!empty($places)): 135 141 $places_found_meta = true; 136 142 ?> … … 138 144 <div> 139 145 <input type="checkbox" name="post_id_meta[]" value="<?php echo($post->ID) ?>" /> 140 <a href="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/post.php?post='.$post->ID.'&action=edit' ?>"><strong><?php print_r($post->post_title) ?></strong></a> Places Linked: <?php echo(count($places));?>146 <a href="<?php echo get_bloginfo( 'wpurl' ).'/wp-admin/post.php?post='.$post->ID.'&action=edit' ?>"><strong><?php print_r($post->post_title) ?></strong></a> Meta Place Found 141 147 <a href="#" onclick="jQuery('#post_meta_place_<?php echo($post->ID) ?>').toggle(); return false;">show details</a> 142 148 </div> -
welocally-places/trunk/readme.txt
r514360 r514363 13 13 Welocally Places For WordPress makes it simple to attach real places to your content effectively making your blog a hyper-local property in minutes. Associating a place with your post is as easy as searching for a keyword, pointing and clicking. Primary features include: 14 14 15 * Search geocoded places by keyword from our 21M place database 15 * Search geocoded places by keyword from our 16M USA place database 16 * Put mutiple places maps on pages and posts. 17 * Now we offer free basic service. 16 18 * No coding required. Plug and play 17 19 * 2 sidebar widgets, Map Widget and Place List Widget 18 20 * Fully customizable maps 19 21 * Google fonts integration, no CSS required for custom fonts 20 * Tested with most of the common themes21 22 * Rich place information such as phone number, and website 22 23 * Integrated driving directions 23 * Category based map, automatically integrates "featured image" in pop-up ;24 * Category based map, automatically integrates "featured image" in pop-up (only for supported themes); 24 25 25 We have moved to a new "theme support" model . If your theme is not listed here that does not mean that the plug- in will not work please give it a try, it works with most themes. Please contact us if you would like us to support your theme.26 We have moved to a new "theme support" model for category map support, but if your theme is not listed here that does not mean that the plug- in will not work please give it a try, it works with most themes. Please contact us if you would like us to support your theme. 26 27 27 Currently supported themes :28 Currently supported themes that will work with category maps: 28 29 29 30 * Twenty Eleven … … 32 33 * Light Word 33 34 * Chateau 35 * Delicate 36 * zBench 37 * iFeature 34 38 35 39 Please goto http://www.welocally.com/?page_id=520 for a complete list of supported themes. … … 45 49 Q:Can I use Welocally Places for a blog hosted on wordpress.com? 46 50 A:No you can not. WordPress.com hosted blogs do not allow you to install plugins. Hosting your own blog gives you flexibility and allows you to monetize in new ways, so just take it to the next step and host your own blog. Consumer Rankings did a review of low priced hosting providers for WordPress. Check it out. 51 52 Q:What Browsers Do You Support? 53 A:For Publishers we have tested creating places for and recommend versions starting at least Chrome 17.0.963.56, Safari Version 5.1.2 and Firefox 10.0.2. We *do not* reccomend the use of IE for site owners using welocally places, but we have tested site vistors successfully using Welocally Places with IE 5.3.2 or greater. 47 54 48 55 Q:What is a POI? 49 A:POI stands for Point of Interest, and they are the places that people go to. We aggregate place info from many different providers, and this is the same type of data that location based game companies use when you “check in”. It is commonly public establishments, parks or venues that people goto such as “Bill’s Grill”.56 A:POI stands for Point of Interest, and they are the places that people go to. We aggregate place info from many different providers, and this is the same type of data that location based game companies use when you âcheck in. It is commonly public establishments, parks or venues that people goto such as âUptown Grill. 50 57 51 58 Q:Does the mapping feature work only for places, not for addresses or intersections? 52 A: There are over 21 Million Places for you to choose from in our database so we got you covered for most POIs that people go to. Our linkings are based on places, so we really recommend that if a place is not in our database and is important enough for you to talk about it with your readers, then it is probably important enough for you to give it a name and add it to the places database. Doing that is as easy as entering the address. Intersections are not supported.59 A:Intersections are not supported. There are over 16 Million Places for you to choose from in our database so we got you covered for most POIs that people go to. Our linkings are based on places, so we really recommend that if a place is not in our database and is important enough for you to talk about it with your readers, then it is probably important enough for you to give it a name and add it to the places database. Doing that is as easy as entering the address. 53 60 54 Q:Why do I have to subscribebefore I can try your software out?55 A:The plugin itself is free and open source based licensed under GPL2. W hat we charge for is the service of using our cloud based database, as well as updates and notifications when we have new stuff. The subscription includes a trail period, so if you don't want to be charged for using the trail just login to paypal and cancel the subscription before the trail period ends.61 Q:Why do I have to register before I can try your software out? 62 A:The plugin itself is free and open source based licensed under GPL2. We provide a basic service that lets you look up places easily, as well as updates and notifications when we have new stuff. 56 63 57 64 Q:Don't most plugins charge just once, or not at all? … … 59 66 60 67 Q:Is your plugin supported internationally? 61 A:We have not tested our internationally, but there are POIs in countries outside of the USA. We are in the process of creating a table of international coverage and multilingual support. 62 68 A: NO our places are in the US only. This will change soon but right now we only have about 16 million places in the USA. 63 69 64 70 65 71 == Changelog == 72 1.1.16 73 99 "Places DB Tool In Options" 74 94 "Place Finder for Pages" 75 71 "Share Tag Support" 76 54 "Refactor Metadata Approach for Place Persistence" 77 53 "Extended Tag Support" 78 43 "Places Support On Pages" 79 42 "Transform Post Save Approach to Tags and Place Metadata" 80 41 "Custom Theme Support For List Widget" 81 40 "Custom Theme Support For Map Widget" 82 38 "Add Custom Theme Options Settings" 83 36 "iFeature Theme Support" 84 34 "zBench Theme Support" 85 21 "Add Change Login/Key Support" 86 10 "Theme Support for Delicate " 87 3 "Integrate New Add Place Workflow" 66 88 67 89 1.0.13 … … 104 126 105 127 1.0.7 Initial version. Includes: Places List Widget, Places Map Widget and 106 Category Browser 128 Category Browser for supported themes 107 129 108 130 == Upgrade Notice == … … 112 134 1. Welocally Places offers a simple way to embed rich place information such as address, phone number, website and driving directions into your post. We also provide interactive map widgets to engage your readers with the places you have written about. 113 135 114 2. Our category map lets your readers filter places based on the categories they are interested, now you have the hyperlocal power tools that make you a trusted local referrer.136 2. The place finder tool lets you easily find or add places from our 16 million US point of interest database and link them to posts or pages. 115 137 116 '[youtube http://youtu.be/oms0HCZyGlY]' 138 -
welocally-places/trunk/resources/places.css
r514360 r514363 551 551 /*ul.wl-place-links li a{ border-left:8px solid white; text-decoration:none; padding:0; }*/ 552 552 553 554 555 556 557 553 .wl-place-widget-links { text-align:right; } 558 554 559 div.gmap img {max-width:100000px; max-width: none} 560 555 div.gmap img {max-width:100000px; max-width: none} 556 557 558 -
welocally-places/trunk/resources/wlplaces.js
r514360 r514363 67 67 }); 68 68 }, 69 unescape: function (unsafe) { 70 return unsafe 71 .replace(/&/g, "&") 72 .replace(/</g, "<") 73 .replace(/>/g, ">") 74 .replace(/"/g, '"') 75 .replace(/'/g, "'"); 76 }, 69 77 notundef: function(a, b) { 70 78 return typeof(a) == 'undefined' ? b : a; … … 121 129 setMapEvents: function(map){ 122 130 google.maps.event.addListener(map, 'tilesloaded', function() { 131 console.log('tiles loaded'); 123 132 jQuery(map).find('img').css('max-width','none'); 133 jQuery(".map_canvas_post").find('img').css('max-width','none'); 124 134 WELOCALLY.util.preload([ 125 135 'http://maps.google.com/mapfiles/openhand.cur' -
welocally-places/trunk/template-tags.php
r514360 r514363 446 446 447 447 $return = $wpdb->get_results($query, OBJECT); 448 return $return; 448 449 $placeJson = 450 json_decode($return[0]->meta_value, true); 451 452 453 return $placeJson; 449 454 } 450 455 -
welocally-places/trunk/views/places-meta-box.php
r514360 r514363 106 106 107 107 function searchLocations(location, queryString, radiusKm) { 108 jQuery('#results').hide(); 109 108 110 setStatus('Loading Places...', 'message', true); 109 111 … … 152 154 success : function(data, textStatus, jqXHR) { 153 155 154 setStatus('', 'message', false); 155 156 157 158 159 setStatus('', 'message', false); 160 161 jQuery('#add-place-section').append(jQuery('#cancel-finder-workflow')); 162 jQuery('#cancel-finder-workflow').show(); 156 163 if(data != null && data.length == 0) { 157 164 setStatus('Sorry no places were found that match your query.', 'update', false); 158 jQuery('#add-place-section').append(jQuery('#cancel-finder-workflow'));165 159 166 jQuery('#place-selector').append(jQuery('#add-place-section')); 160 jQuery('#add-place-section').show();167 161 168 162 169 } else if(data != null && data.length > 0) { … … 165 172 jQuery('#selectable').append(buildListItemForPlace(item,i)); 166 173 }); 167 jQuery('#search-geocoded-section').append(jQuery('#results')); 168 jQuery('#add-place-section').append(jQuery('#cancel-finder-workflow')); 174 jQuery('#search-geocoded-section').append(jQuery('#results')); 169 175 jQuery('#results').append(jQuery('#add-place-section')); 170 176 jQuery("#results").show(); 171 jQuery('#add-place-section').show();177 172 178 173 179 } else if(data != null && data.errors != null) { … … 177 183 } else { 178 184 setStatus('There was a problem, please check your settings and network.', 'error', false); 179 jQuery('#add-place-section').append(jQuery('#cancel-finder-workflow'));180 185 jQuery('#place-selector').append(jQuery('#add-place-section')); 181 jQuery('#add-place-section').show();186 182 187 } 188 jQuery('#add-place-section').show(); 189 190 183 191 } 184 192 }); … … 233 241 jQuery('#share-meta-tagtext').val(WELOCALLY.places.tag.makePlaceTag(selectedPlace, post)); 234 242 jQuery('#places-tag-selected').show(); 243 244 235 245 236 246 var selectedLocation = new google.maps.LatLng(selectedPlace.geometry.coordinates[1], selectedPlace.geometry.coordinates[0]); … … 267 277 268 278 //show the *selected* area 269 jQuery("#selected-place-info").html('');270 279 jQuery("#selected-place-info").append(jQuery('#places-tag-selected')); 271 280 jQuery("#selected-place-info").append(jQuery('#edit-place-name-selected')); … … 520 529 521 530 jQuery('#search-geocoded-section').append(jQuery('#back-action')); 531 jQuery('#search-geocoded-section').hide(); 522 532 523 533 jQuery('#back-action' ).unbind('click').bind('click' , { phase: 'search-place-address-section' }, backHandler); … … 529 539 jQuery('#search-geocoded-section').append(jQuery('#search-geocoded-address-selected')); 530 540 jQuery('#search-geocoded-section').append(jQuery('#map_canvas')); 541 jQuery('#search-geocoded-section').show(); 531 542 532 543 //do the map stuff … … 758 769 section.append(jQuery('#next-action')); 759 770 760 jQuery('#edit-geocoded-section').hide(); 771 jQuery('#edit-geocoded-section').hide(); 772 jQuery('#save-place-action').hide(); 761 773 jQuery('#categories-section').hide(); 762 774 … … 908 920 }, 909 921 unselected: function(event, ui) { 910 if(selectedCategories.indexOf(ui.unselected.inner Text) != -1) {911 var replaceText = ui.unselected.inner Text+",";922 if(selectedCategories.indexOf(ui.unselected.innerHTML) != -1) { 923 var replaceText = ui.unselected.innerHTML+","; 912 924 selectedCategories = selectedCategories.replace(new RegExp(replaceText, 'g'),""); 913 925 jQuery( "#place-categories-selected" ).val(selectedCategories); … … 949 961 var category = null; 950 962 if(selectedPlace.classifiers[0].type != '') 951 type= selectedPlace.classifiers[0].type;963 type= WELOCALLY.util.unescape(selectedPlace.classifiers[0].type); 952 964 if(selectedPlace.classifiers[0].category != '') 953 category= selectedPlace.classifiers[0].category;965 category= WELOCALLY.util.unescape(selectedPlace.classifiers[0].category); 954 966 955 967 getCategories(type, category); 968 956 969 } 957 970 … … 995 1008 }, 996 1009 unselected: function(event, ui) { 997 if(selectedCategories.indexOf(ui.unselected.inner Text) != -1) {998 var replaceText = ui.unselected.inner Text+",";1010 if(selectedCategories.indexOf(ui.unselected.innerHTML) != -1) { 1011 var replaceText = ui.unselected.innerHTML+","; 999 1012 selectedCategories = selectedCategories.replace(new RegExp(replaceText, 'g'),""); 1000 1013 jQuery( "#place-categories-selected" ).val(selectedCategories); … … 1184 1197 } 1185 1198 1199 .input-section{ width:100%;} 1200 1186 1201 </style> 1187 1202 <body> 1188 1203 <div style="display:none"> 1189 1204 1190 <div id="associate-input" class=" action" style="display:inline-block" >1205 <div id="associate-input" class="input-section action" style="display:inline-block" > 1191 1206 <div style="display:inline-block" class="selected-field">Associate a place with this post? </div> 1192 1207 </div> 1193 1208 1194 <div id="place-name-input" class=" action" style="display:inline-block">1209 <div id="place-name-input" class="input-section action" style="display:inline-block"> 1195 1210 <div id="place-name-title" class="field-title">*Place Name: <em>Required</em></div> 1196 1211 <input type="text" id="edit-place-name" name="edit-place-name" class="edit-field"> 1197 <button id="save-place-name-action" href="#" style="display:none">Save</button>1198 1212 </div> 1199 1213 1200 <div id="street-name-input" class=" action" style="display:inline-block">1214 <div id="street-name-input" class="input-section action" style="display:inline-block"> 1201 1215 <div id="place-street-title" class="field-title">*Full Address: <em>Required</em></div> 1202 1216 <input type="text" id="edit-place-street" name="edit-place-street" class="edit-field"> -
welocally-places/trunk/welocally-places.class.php
r514360 r514363 160 160 //app stuff, for right now we will embed this key but this should be coming from a web service 161 161 wp_enqueue_script('google-maps' , 'https://maps.google.com/maps/api/js?key=AIzaSyACXX0_pKBA6L0Z2ajyIvh5Bi8h9crGVlg&sensor=true&language=en' , false , '3'); 162 wp_enqueue_script(' sp-places-script', $placesURL.'places.js', array('jquery'));162 wp_enqueue_script('wl-places-script', $placesURL.'places.js', array('jquery'), WelocallyPlaces::VERSION ); 163 163 if( locate_template( array('places/places.css') ) ) { 164 164 $templateArray = explode( '/', TEMPLATEPATH ); 165 165 $themeName = $templateArray[count($templateArray)-1]; 166 wp_enqueue_style(' sp-places-style', WP_CONTENT_URL.'/themes/'.$themeName.'/places/places.css', array(), WelocallyPlaces::VERSION, 'screen' );167 } else wp_enqueue_style(' sp-places-style', $placesURL.'places.css', array(), WelocallyPlaces::VERSION, 'screen' );166 wp_enqueue_style('wl-places-style', WP_CONTENT_URL.'/themes/'.$themeName.'/places/places.css', array(), WelocallyPlaces::VERSION, 'screen' ); 167 } else wp_enqueue_style('wl-places-style', $placesURL.'places.css', array(), WelocallyPlaces::VERSION, 'screen' ); 168 168 169 169 wp_enqueue_style( 'tinymce_button', WP_PLUGIN_URL . '/welocally-places/resources/tinymce-button.css' ); … … 178 178 179 179 //admin stuff 180 wp_enqueue_style( 'welocally_places', WP_PLUGIN_URL . '/welocally-places/resources/places.css' );181 180 wp_enqueue_style('thickbox'); 182 181 … … 186 185 wp_enqueue_script('js-color-picker',WP_PLUGIN_URL.'/welocally-places/resources/jscolor.js', array('jquery')); 187 186 188 wp_enqueue_script('wlplaces', WP_PLUGIN_URL . '/welocally-places/resources/wlplaces.js', array('jquery') );187 wp_enqueue_script('wlplaces', WP_PLUGIN_URL . '/welocally-places/resources/wlplaces.js', array('jquery'), WelocallyPlaces::VERSION); 189 188 } 190 189 … … 671 670 } 672 671 673 672 674 673 public function getPostPlaces($postId) { 675 674 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.