Changeset 1474236
- Timestamp:
- 08/14/2016 05:39:01 PM (10 years ago)
- Location:
- ff-communitymap
- Files:
-
- 4 edited
- 1 copied
-
tags/4.1 (copied) (copied from ff-communitymap/trunk)
-
tags/4.1/ffcommunitymap.php (modified) (6 diffs)
-
tags/4.1/readme.txt (modified) (4 diffs)
-
trunk/ffcommunitymap.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ff-communitymap/tags/4.1/ffcommunitymap.php
r1411110 r1474236 5 5 Plugin URI: http://api.freifunk.net 6 6 Description: display the freifunk community map 7 Version: 4. 07 Version: 4.1 8 8 Author: Andi Bräu 9 9 Author URI: https://blog.andi95.de … … 34 34 'feed_url' => '//api.freifunk.net/feed/feed.php', 35 35 'geojsonurl'=> '//api.freifunk.net/map/ffGeoJsonp.php?callback=?', 36 'mapjs' => '//api.freifunk.net/map/community_map.js',37 'popuptype' => 'community',36 'mapjs' => '//api.freifunk.net/map/community_map.js', 37 'popuptype' => 'community', 38 38 'mapboxid' => 'mapbox.streets', 39 39 'showevents' => '1', … … 46 46 'postcontentlength' => '30', 47 47 'zoomlevel' => '5', 48 'scrollandzoom' => '1', 48 49 'center' => '51.5,10.5', 49 50 'height' => null, … … 65 66 $postContentLength = is_numeric($a['postcontentlength']) ? $a['postcontentlength'] : 30; 66 67 $zoomLevel = is_numeric($a['zoomlevel']) ? $a['zoomlevel'] : 4; 68 $scrollAndZoom = (esc_js($a['scrollandzoom']) === "1") ? "true" : "false"; 67 69 $center = preg_match("/^\d[0-9\.]{1,},\d[0-9\.]{1,}$/", $a['center']) === 1 ? $a['center'] : "51.5,10.5"; 68 70 $height = preg_match("/^\d+(px|%)$/", $a['height']) === 1 ? $a['height'] : null; … … 114 116 $output .= 'postContentLength: '. $postContentLength .','.PHP_EOL; 115 117 $output .= 'zoomLevel: '.$zoomLevel.','.PHP_EOL; 118 $output .= 'scrollWheelZoom: '.$scrollAndZoom.','.PHP_EOL; 119 $output .= 'touchZoom: '.$scrollAndZoom.','.PHP_EOL; 116 120 $output .= 'center: ['.$center.'],'.PHP_EOL; 117 121 $output .= 'divid: "'. $divid .'",'.PHP_EOL; … … 187 191 if ( $enable_zip_search) { 188 192 $output .= '<h3>Communities in deiner Nähe</h3>'.PHP_EOL; 189 $output .= '<div class="zipsearch"><input type="text" id="zipinput" placeholder="'.__(' Postleitzahl und/oder Ort').'"><button type="button" id="zipsubmit" class="btn waves-effect waves-light">Nächste Communities finden</button><button type="button" id="zipreset" class="btn waves-effect waves-light">Reset</button></div>'.PHP_EOL;193 $output .= '<div class="zipsearch"><input type="text" id="zipinput" placeholder="'.__('Ort, ggf. Postleitzahl').'"><button type="button" id="zipsubmit" class="btn waves-effect waves-light">Nächste Communities finden</button><button type="button" id="zipreset" class="btn waves-effect waves-light">Reset</button></div>'.PHP_EOL; 190 194 $output .= '<div id="zipresult"></div>'.PHP_EOL; 191 195 } -
ff-communitymap/tags/4.1/readme.txt
r1408497 r1474236 5 5 Requires at least: 3.6 6 6 Tested up to: 4.5 7 Stable tag: 4. 07 Stable tag: 4.1 8 8 9 9 Displays the freifunk community map and/or the freifunk community table … … 42 42 * Default: 5 43 43 * Description: default zoom level on page load 44 * scrollandzoom 45 * Default: 1 46 * Enable scroll and zooming by mouse wheel or one-finger-touch 44 47 * center 45 48 * Default: [51.5,10.5] … … 86 89 The shortcode [ffapijs] simply loads ffctable.js and dependencies for use API data in pages and posts. 87 90 88 Example code to embed a sel ection of email addresses of communities in contact form 7:91 Example code to embed a selction of email addresses of communities: 89 92 90 93 `<p>Adresse<br /> … … 135 138 == Changelog == 136 139 140 = 4.1 = 141 * add option to disable scroll by mouse wheel or one-finger-touch 142 137 143 = 4.0 = 138 144 * javascripts now use callbacks, we're more flexible to use api data -
ff-communitymap/trunk/ffcommunitymap.php
r1411110 r1474236 5 5 Plugin URI: http://api.freifunk.net 6 6 Description: display the freifunk community map 7 Version: 4. 07 Version: 4.1 8 8 Author: Andi Bräu 9 9 Author URI: https://blog.andi95.de … … 34 34 'feed_url' => '//api.freifunk.net/feed/feed.php', 35 35 'geojsonurl'=> '//api.freifunk.net/map/ffGeoJsonp.php?callback=?', 36 'mapjs' => '//api.freifunk.net/map/community_map.js',37 'popuptype' => 'community',36 'mapjs' => '//api.freifunk.net/map/community_map.js', 37 'popuptype' => 'community', 38 38 'mapboxid' => 'mapbox.streets', 39 39 'showevents' => '1', … … 46 46 'postcontentlength' => '30', 47 47 'zoomlevel' => '5', 48 'scrollandzoom' => '1', 48 49 'center' => '51.5,10.5', 49 50 'height' => null, … … 65 66 $postContentLength = is_numeric($a['postcontentlength']) ? $a['postcontentlength'] : 30; 66 67 $zoomLevel = is_numeric($a['zoomlevel']) ? $a['zoomlevel'] : 4; 68 $scrollAndZoom = (esc_js($a['scrollandzoom']) === "1") ? "true" : "false"; 67 69 $center = preg_match("/^\d[0-9\.]{1,},\d[0-9\.]{1,}$/", $a['center']) === 1 ? $a['center'] : "51.5,10.5"; 68 70 $height = preg_match("/^\d+(px|%)$/", $a['height']) === 1 ? $a['height'] : null; … … 114 116 $output .= 'postContentLength: '. $postContentLength .','.PHP_EOL; 115 117 $output .= 'zoomLevel: '.$zoomLevel.','.PHP_EOL; 118 $output .= 'scrollWheelZoom: '.$scrollAndZoom.','.PHP_EOL; 119 $output .= 'touchZoom: '.$scrollAndZoom.','.PHP_EOL; 116 120 $output .= 'center: ['.$center.'],'.PHP_EOL; 117 121 $output .= 'divid: "'. $divid .'",'.PHP_EOL; … … 187 191 if ( $enable_zip_search) { 188 192 $output .= '<h3>Communities in deiner Nähe</h3>'.PHP_EOL; 189 $output .= '<div class="zipsearch"><input type="text" id="zipinput" placeholder="'.__(' Postleitzahl und/oder Ort').'"><button type="button" id="zipsubmit" class="btn waves-effect waves-light">Nächste Communities finden</button><button type="button" id="zipreset" class="btn waves-effect waves-light">Reset</button></div>'.PHP_EOL;193 $output .= '<div class="zipsearch"><input type="text" id="zipinput" placeholder="'.__('Ort, ggf. Postleitzahl').'"><button type="button" id="zipsubmit" class="btn waves-effect waves-light">Nächste Communities finden</button><button type="button" id="zipreset" class="btn waves-effect waves-light">Reset</button></div>'.PHP_EOL; 190 194 $output .= '<div id="zipresult"></div>'.PHP_EOL; 191 195 } -
ff-communitymap/trunk/readme.txt
r1408497 r1474236 5 5 Requires at least: 3.6 6 6 Tested up to: 4.5 7 Stable tag: 4. 07 Stable tag: 4.1 8 8 9 9 Displays the freifunk community map and/or the freifunk community table … … 42 42 * Default: 5 43 43 * Description: default zoom level on page load 44 * scrollandzoom 45 * Default: 1 46 * Enable scroll and zooming by mouse wheel or one-finger-touch 44 47 * center 45 48 * Default: [51.5,10.5] … … 86 89 The shortcode [ffapijs] simply loads ffctable.js and dependencies for use API data in pages and posts. 87 90 88 Example code to embed a sel ection of email addresses of communities in contact form 7:91 Example code to embed a selction of email addresses of communities: 89 92 90 93 `<p>Adresse<br /> … … 135 138 == Changelog == 136 139 140 = 4.1 = 141 * add option to disable scroll by mouse wheel or one-finger-touch 142 137 143 = 4.0 = 138 144 * javascripts now use callbacks, we're more flexible to use api data
Note: See TracChangeset
for help on using the changeset viewer.