Plugin Directory

Changeset 1474236


Ignore:
Timestamp:
08/14/2016 05:39:01 PM (10 years ago)
Author:
andibraeu
Message:

add option to disable scroll and zoom by mouse wheel or one finger tap

Location:
ff-communitymap
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ff-communitymap/tags/4.1/ffcommunitymap.php

    r1411110 r1474236  
    55Plugin URI: http://api.freifunk.net
    66Description: display the freifunk community map
    7 Version: 4.0
     7Version: 4.1
    88Author: Andi Bräu
    99Author URI: https://blog.andi95.de
     
    3434        'feed_url' => '//api.freifunk.net/feed/feed.php',
    3535        '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',
    3838        'mapboxid' => 'mapbox.streets',
    3939        'showevents' => '1',
     
    4646        'postcontentlength' => '30',
    4747        'zoomlevel' => '5',
     48        'scrollandzoom' => '1',
    4849        'center' => '51.5,10.5',
    4950        'height' => null,
     
    6566    $postContentLength = is_numeric($a['postcontentlength']) ? $a['postcontentlength'] : 30;
    6667    $zoomLevel = is_numeric($a['zoomlevel']) ? $a['zoomlevel'] : 4;
     68    $scrollAndZoom = (esc_js($a['scrollandzoom']) === "1") ? "true" : "false";
    6769    $center = preg_match("/^\d[0-9\.]{1,},\d[0-9\.]{1,}$/", $a['center']) === 1 ? $a['center'] : "51.5,10.5";
    6870    $height = preg_match("/^\d+(px|%)$/", $a['height']) === 1 ? $a['height'] : null;
     
    114116    $output .= 'postContentLength: '. $postContentLength .','.PHP_EOL;
    115117    $output .= 'zoomLevel: '.$zoomLevel.','.PHP_EOL;
     118    $output .= 'scrollWheelZoom: '.$scrollAndZoom.','.PHP_EOL;
     119    $output .= 'touchZoom: '.$scrollAndZoom.','.PHP_EOL;
    116120    $output .= 'center: ['.$center.'],'.PHP_EOL;
    117121    $output .= 'divid: "'. $divid .'",'.PHP_EOL;
     
    187191    if ( $enable_zip_search) {
    188192      $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;
    190194      $output .= '<div id="zipresult"></div>'.PHP_EOL;
    191195    }
  • ff-communitymap/tags/4.1/readme.txt

    r1408497 r1474236  
    55Requires at least: 3.6
    66Tested up to: 4.5
    7 Stable tag: 4.0
     7Stable tag: 4.1
    88
    99Displays the freifunk community map and/or the freifunk community table
     
    4242 * Default: 5
    4343 * Description: default zoom level on page load
     44* scrollandzoom
     45 * Default: 1
     46 * Enable scroll and zooming by mouse wheel or one-finger-touch
    4447* center
    4548 * Default: [51.5,10.5]
     
    8689The shortcode [ffapijs] simply loads ffctable.js and dependencies for use API data in pages and posts.
    8790
    88 Example code to embed a selection of email addresses of communities in contact form 7:
     91Example code to embed a selction of email addresses of communities:
    8992
    9093`<p>Adresse<br />
     
    135138== Changelog ==
    136139
     140 = 4.1 =
     141 * add option to disable scroll by mouse wheel or one-finger-touch
     142
    137143 = 4.0 =
    138144 * javascripts now use callbacks, we're more flexible to use api data
  • ff-communitymap/trunk/ffcommunitymap.php

    r1411110 r1474236  
    55Plugin URI: http://api.freifunk.net
    66Description: display the freifunk community map
    7 Version: 4.0
     7Version: 4.1
    88Author: Andi Bräu
    99Author URI: https://blog.andi95.de
     
    3434        'feed_url' => '//api.freifunk.net/feed/feed.php',
    3535        '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',
    3838        'mapboxid' => 'mapbox.streets',
    3939        'showevents' => '1',
     
    4646        'postcontentlength' => '30',
    4747        'zoomlevel' => '5',
     48        'scrollandzoom' => '1',
    4849        'center' => '51.5,10.5',
    4950        'height' => null,
     
    6566    $postContentLength = is_numeric($a['postcontentlength']) ? $a['postcontentlength'] : 30;
    6667    $zoomLevel = is_numeric($a['zoomlevel']) ? $a['zoomlevel'] : 4;
     68    $scrollAndZoom = (esc_js($a['scrollandzoom']) === "1") ? "true" : "false";
    6769    $center = preg_match("/^\d[0-9\.]{1,},\d[0-9\.]{1,}$/", $a['center']) === 1 ? $a['center'] : "51.5,10.5";
    6870    $height = preg_match("/^\d+(px|%)$/", $a['height']) === 1 ? $a['height'] : null;
     
    114116    $output .= 'postContentLength: '. $postContentLength .','.PHP_EOL;
    115117    $output .= 'zoomLevel: '.$zoomLevel.','.PHP_EOL;
     118    $output .= 'scrollWheelZoom: '.$scrollAndZoom.','.PHP_EOL;
     119    $output .= 'touchZoom: '.$scrollAndZoom.','.PHP_EOL;
    116120    $output .= 'center: ['.$center.'],'.PHP_EOL;
    117121    $output .= 'divid: "'. $divid .'",'.PHP_EOL;
     
    187191    if ( $enable_zip_search) {
    188192      $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;
    190194      $output .= '<div id="zipresult"></div>'.PHP_EOL;
    191195    }
  • ff-communitymap/trunk/readme.txt

    r1408497 r1474236  
    55Requires at least: 3.6
    66Tested up to: 4.5
    7 Stable tag: 4.0
     7Stable tag: 4.1
    88
    99Displays the freifunk community map and/or the freifunk community table
     
    4242 * Default: 5
    4343 * Description: default zoom level on page load
     44* scrollandzoom
     45 * Default: 1
     46 * Enable scroll and zooming by mouse wheel or one-finger-touch
    4447* center
    4548 * Default: [51.5,10.5]
     
    8689The shortcode [ffapijs] simply loads ffctable.js and dependencies for use API data in pages and posts.
    8790
    88 Example code to embed a selection of email addresses of communities in contact form 7:
     91Example code to embed a selction of email addresses of communities:
    8992
    9093`<p>Adresse<br />
     
    135138== Changelog ==
    136139
     140 = 4.1 =
     141 * add option to disable scroll by mouse wheel or one-finger-touch
     142
    137143 = 4.0 =
    138144 * javascripts now use callbacks, we're more flexible to use api data
Note: See TracChangeset for help on using the changeset viewer.