Changeset 896760
- Timestamp:
- 04/17/2014 09:05:06 PM (12 years ago)
- Location:
- xmap/trunk
- Files:
-
- 7 edited
-
includes/helpers.php (modified) (2 diffs)
-
includes/options.php (modified) (5 diffs)
-
includes/shortcodes.php (modified) (3 diffs)
-
languages/xmap-de_DE.mo (modified) (previous)
-
languages/xmap-de_DE.po (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
xmap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
xmap/trunk/includes/helpers.php
r398321 r896760 6 6 * @return number 7 7 */ 8 function xmap_maptype_id ( $type) {8 function xmap_maptype_id ( $type ) { 9 9 $maptype = 2; 10 switch ($type) { 10 $new_maptype = 'terrain'; 11 switch ( $type ) { 11 12 case 'hybrid': 12 13 $maptype = 1; 14 $new_maptype = 'google_hybrid'; 13 15 break; 14 16 case 'terrain': 15 17 $maptype = 2; 18 $new_maptype = 'terrain'; 16 19 break; 17 20 case 'osm': 18 21 $maptype = 3; 22 $new_maptype = 'osm'; 19 23 break; 20 24 case 'ocm': 21 25 $maptype = 4; 26 $new_maptype = 'opencyclemap'; 22 27 break; 23 28 case 'satellite': … … 26 31 case 'road': 27 32 $maptype = 6; 33 $new_maptype = 'google_roadmap'; 28 34 break; 29 35 default: 30 36 $maptype = 2; 37 $new_maptype = 'terrain'; 31 38 } 32 return $ maptype;39 return $new_maptype; 33 40 } 34 41 35 42 43 /** 44 * @since 1.0.1 45 * 46 * Map shortcodes to their corresponding domain 47 * @param string $code The shortcode (wandermap|runmap|inlinemap|mopedmap|bikemap) 48 * @return string 49 */ 50 function xmap_domain ( $code ) { 51 $domain = 'www.bikemap.net'; 52 switch ( $code ) { 53 case 'wandermap': 54 $domain = 'www.wandermap.net'; 55 break; 56 case 'runmap': 57 $domain = 'www.runmap.net'; 58 break; 59 case 'inlinemap': 60 $domain = 'www.inlinemap.net'; 61 break; 62 case 'mopedmap': 63 $domain = 'www.mopedmap.net'; 64 break; 65 case 'bikemap': 66 $domain = 'www.bikemap.net'; 67 break; 68 } 69 return $domain; 70 } 71 72 73 74 75 76 36 77 ?> -
xmap/trunk/includes/options.php
r398547 r896760 23 23 add_settings_field('xmap_width_field', __('Map Width', 'xmap'), 'xmap_width_input', 'xmap', 'xmap_properties_section'); 24 24 add_settings_field('xmap_height_field', __('Map Height', 'xmap'), 'xmap_height_input', 'xmap', 'xmap_properties_section'); 25 add_settings_field('xmap_type_field', __('Map Type', 'xmap'), 'xmap_type_input', 'xmap', 'xmap_properties_section');25 //add_settings_field('xmap_type_field', __('Map Type', 'xmap'), 'xmap_type_input', 'xmap', 'xmap_properties_section'); 26 26 add_settings_field('xmap_extended_field', __('Show Track Metadata', 'xmap'), 'xmap_extended_input', 'xmap', 'xmap_properties_section'); 27 27 add_settings_field('xmap_unit_field', __('Unit', 'xmap'), 'xmap_unit_input', 'xmap', 'xmap_properties_section'); … … 41 41 42 42 function xmap_styles_section_description() { 43 printf('<p>%s</p>', __('Enter the CSS for the .xmap class'), 'xmap');43 printf('<p>%s</p>', __('Enter the CSS for the xmap class', 'xmap' ) ); 44 44 } 45 45 … … 61 61 } 62 62 63 63 /* 64 * Deprecated @since 1.1 65 * 66 */ 64 67 function xmap_type_input() { 65 68 $options = get_option( 'xmap_options' ); … … 121 124 'xmap_width_field', 122 125 'xmap_error_tosmall', 123 sprintf( __('<i>%s</i> – This value shouldbe at least %s!', 'xmap'), __('Map Width', 'xmap'), MIN_MAP_WIDTH ),126 sprintf( __('<i>%s</i> – This value must be at least %s!', 'xmap'), __('Map Width', 'xmap'), MIN_MAP_WIDTH ), 124 127 'error' 125 128 ); … … 140 143 'xmap_height_field', 141 144 'xmap_error_tosmall', 142 sprintf( __('<i>%s</i> – This value shouldbe at least %s!', 'xmap'), __('Map Height', 'xmap'), MIN_MAP_HEIGHT ),145 sprintf( __('<i>%s</i> – This value must be at least %s!', 'xmap'), __('Map Height', 'xmap'), MIN_MAP_HEIGHT ), 143 146 'error' 144 147 ); -
xmap/trunk/includes/shortcodes.php
r398547 r896760 19 19 20 20 extract( shortcode_atts( array( 21 'type' => $options['type'],21 //'type' => $options['type'], 22 22 'route' => '', 23 23 'user' => '', … … 27 27 'height' => $options['height'] 28 28 ), $atts ) ); 29 30 switch ($code) {31 case 'wandermap':32 $domain = 'www.wandermap.net';33 break;34 case 'runmap':35 $domain = 'www.runmap.net';36 break;37 case 'inlinemap':38 $domain = 'www.inlinemap.net';39 break;40 case 'mopedmap':41 $domain = 'www.mopedmap.net';42 break;43 case 'bikemap':44 $domain = 'www.bikemap.net';45 break;46 }47 29 48 30 if($user != '') return xmap_print_warning( __('User maps currently not supported.', 'xmap' ) ); … … 54 36 * @todo map zoom has to be fixed for user maps 55 37 */ 38 $domain = xmap_domain( $code ); 39 56 40 $dir = $user != '' ? "user/$user" : "route/$route"; 57 41 58 42 $maptype = xmap_maptype_id($type); 59 43 60 $src = "http://$domain/$dir/widget?width=$width&height=$height&extended=$extended& maptype=$maptype&unit=$unit&redirect=no";44 $src = "http://$domain/$dir/widget?width=$width&height=$height&extended=$extended&unit=$unit&redirect=no"; 61 45 62 return xmap_print_map($src, (int) $width, $extended == 'true' ? (int) $height + 10 0: (int) $height);46 return xmap_print_map($src, (int) $width, $extended == 'true' ? (int) $height + 105 : (int) $height); 63 47 } 64 48 -
xmap/trunk/languages/xmap-de_DE.po
r400353 r896760 3 3 "Project-Id-Version: xmap\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 1-06-23 15:25+0100\n"6 "PO-Revision-Date: 201 1-06-23 15:26+0100\n"7 "Last-Translator: Matthias Scheidl < matthias@scheidl.name>\n"5 "POT-Creation-Date: 2014-04-17 18:14+0100\n" 6 "PO-Revision-Date: 2014-04-17 18:15+0100\n" 7 "Last-Translator: Matthias Scheidl <dev@scheidl.name>\n" 8 8 "Language-Team: Matthias Scheidl <dev@scheidl.name>\n" 9 9 "MIME-Version: 1.0\n" … … 62 62 63 63 #: ../includes/options.php:43 64 msgid "Enter the CSS for the .xmap class"65 msgstr "CSS für die .xmap Klasse eingeben"64 msgid "Enter the CSS for the xmap class" 65 msgstr "CSS für die xmap Klasse eingeben" 66 66 67 67 #: ../includes/options.php:68 … … 106 106 #: ../includes/options.php:142 107 107 #, php-format 108 msgid "<i>%s</i> – This value shouldbe at least %s!"109 msgstr "<i>%s</i> – Dieser Wert solltemindestens %s sein!"108 msgid "<i>%s</i> – This value must be at least %s!" 109 msgstr "<i>%s</i> – Dieser Wert muss mindestens %s sein!" 110 110 111 111 #: ../includes/options.php:190 -
xmap/trunk/readme.txt
r398547 r896760 1 1 === XMap === 2 2 Contributors: parelius 3 Tags: map, mapping, google maps, openstreetmap, osm, opencyclemap, bikemap, runmap, inlinemap, wandermap, mopedmap, shortcode, gpx, gps3 Tags: map, mapping, google maps, maptoolkit, openstreetmap, osm, opencyclemap, bikemap, runmap, inlinemap, wandermap, mopedmap, shortcode, gpx, gps 4 4 Requires at least: 3.0 5 Tested up to: 3. 26 Stable tag: 1. 05 Tested up to: 3.9 6 Stable tag: 1.1 7 7 8 8 XMap lets you embed maptoolkit maps (like www.bikemap.net) into your WordPress blog. … … 60 60 == Changelog == 61 61 62 = 1.1 = 63 * Checked for compatibility with WordPress 3.9 64 * Checked for compatibility with MapToolKit 65 * Small fixes in the options pane 66 62 67 = 1.0.1 = 63 68 * Shortcode handling improved -
xmap/trunk/xmap.php
r398547 r896760 3 3 Plugin Name: XMap 4 4 Description: Embed maps from the following domains into WordPress: <a href='http://www.bikemap.net'>bikemap.net</a>, <a href='http://www.runmap.net'>runmap.net</a>, <a href='http://www.inlinemap.net'>inlinemap.net</a>, <a href='http://www.wandermap.net'>wandermap.net</a>, <a href='http://www.mopedmap.net'>mopedmap.net</a> 5 Version: 1. 05 Version: 1.1 6 6 Text Domain: xmap 7 7 Author: Matthias Scheidl <dev@scheidl.name> 8 8 */ 9 9 10 /* Copyright 2010-201 1Matthias Scheidl (email : dev@scheidl.name)10 /* Copyright 2010-2014 Matthias Scheidl (email : dev@scheidl.name) 11 11 12 12 This program is free software; you can redistribute it and/or modify
Note: See TracChangeset
for help on using the changeset viewer.