Plugin Directory

Changeset 896760


Ignore:
Timestamp:
04/17/2014 09:05:06 PM (12 years ago)
Author:
parelius
Message:

Prepare version 1.1

Location:
xmap/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • xmap/trunk/includes/helpers.php

    r398321 r896760  
    66 * @return number
    77 */
    8 function xmap_maptype_id ($type) {
     8function xmap_maptype_id ( $type ) {
    99    $maptype = 2;
    10     switch ($type) {
     10    $new_maptype = 'terrain';
     11    switch ( $type ) {
    1112            case 'hybrid':
    1213                $maptype = 1;
     14                $new_maptype = 'google_hybrid';
    1315                break;
    1416            case 'terrain':
    1517                $maptype = 2;
     18                $new_maptype = 'terrain';
    1619                break;
    1720            case 'osm':
    1821                $maptype = 3;
     22                $new_maptype = 'osm';
    1923                break;
    2024            case 'ocm':
    2125                $maptype = 4;
     26                $new_maptype = 'opencyclemap';
    2227                break;
    2328            case 'satellite':
     
    2631            case 'road':
    2732                $maptype = 6;
     33                $new_maptype = 'google_roadmap';
    2834                break;
    2935            default:
    3036                $maptype = 2;
     37                $new_maptype = 'terrain';
    3138        }
    32     return $maptype;
     39    return $new_maptype;
    3340}
    3441
    3542
     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 */
     50function 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
    3677?>
  • xmap/trunk/includes/options.php

    r398547 r896760  
    2323    add_settings_field('xmap_width_field', __('Map Width', 'xmap'), 'xmap_width_input', 'xmap', 'xmap_properties_section');
    2424    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');
    2626    add_settings_field('xmap_extended_field', __('Show Track Metadata', 'xmap'), 'xmap_extended_input', 'xmap', 'xmap_properties_section');
    2727    add_settings_field('xmap_unit_field', __('Unit', 'xmap'), 'xmap_unit_input', 'xmap', 'xmap_properties_section');   
     
    4141
    4242function 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' ) );
    4444}
    4545
     
    6161}
    6262
    63 
     63/*
     64* Deprecated @since 1.1
     65*
     66*/
    6467function xmap_type_input() {
    6568    $options = get_option( 'xmap_options' );
     
    121124            'xmap_width_field',
    122125            'xmap_error_tosmall',
    123             sprintf( __('<i>%s</i> – This value should be 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 ),
    124127            'error'
    125128        );
     
    140143            'xmap_height_field',
    141144            'xmap_error_tosmall',
    142             sprintf( __('<i>%s</i> – This value should be 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 ),
    143146            'error'
    144147        );
  • xmap/trunk/includes/shortcodes.php

    r398547 r896760  
    1919   
    2020    extract( shortcode_atts( array(
    21             'type' => $options['type'],
     21            //'type' => $options['type'],
    2222            'route' => '',
    2323            'user' => '',
     
    2727            'height' => $options['height']
    2828        ), $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         }
    4729       
    4830        if($user != '') return xmap_print_warning( __('User maps currently not supported.', 'xmap' ) );
     
    5436         * @todo map zoom has to be fixed for user maps
    5537         */
     38        $domain = xmap_domain( $code );
     39       
    5640        $dir = $user != '' ? "user/$user" : "route/$route";
    5741       
    5842        $maptype = xmap_maptype_id($type);
    5943
    60         $src = "http://$domain/$dir/widget?width=$width&amp;height=$height&amp;extended=$extended&amp;maptype=$maptype&amp;unit=$unit&amp;redirect=no";
     44        $src = "http://$domain/$dir/widget?width=$width&amp;height=$height&amp;extended=$extended&amp;unit=$unit&amp;redirect=no";
    6145       
    62         return xmap_print_map($src, (int) $width, $extended == 'true' ? (int) $height + 100 : (int) $height);
     46        return xmap_print_map($src, (int) $width, $extended == 'true' ? (int) $height + 105 : (int) $height);
    6347}
    6448
  • xmap/trunk/languages/xmap-de_DE.po

    r400353 r896760  
    33"Project-Id-Version: xmap\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-06-23 15:25+0100\n"
    6 "PO-Revision-Date: 2011-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"
    88"Language-Team: Matthias Scheidl <dev@scheidl.name>\n"
    99"MIME-Version: 1.0\n"
     
    6262
    6363#: ../includes/options.php:43
    64 msgid "Enter the CSS for the .xmap class"
    65 msgstr "CSS für die .xmap Klasse eingeben"
     64msgid "Enter the CSS for the xmap class"
     65msgstr "CSS für die xmap Klasse eingeben"
    6666
    6767#: ../includes/options.php:68
     
    106106#: ../includes/options.php:142
    107107#, php-format
    108 msgid "<i>%s</i> – This value should be at least %s!"
    109 msgstr "<i>%s</i> – Dieser Wert sollte mindestens %s sein!"
     108msgid "<i>%s</i> – This value must be at least %s!"
     109msgstr "<i>%s</i> – Dieser Wert muss mindestens %s sein!"
    110110
    111111#: ../includes/options.php:190
  • xmap/trunk/readme.txt

    r398547 r896760  
    11=== XMap ===
    22Contributors: parelius
    3 Tags: map, mapping, google maps, openstreetmap, osm, opencyclemap, bikemap, runmap, inlinemap, wandermap, mopedmap, shortcode, gpx, gps
     3Tags: map, mapping, google maps, maptoolkit, openstreetmap, osm, opencyclemap, bikemap, runmap, inlinemap, wandermap, mopedmap, shortcode, gpx, gps
    44Requires at least: 3.0
    5 Tested up to: 3.2
    6 Stable tag: 1.0
     5Tested up to: 3.9
     6Stable tag: 1.1
    77
    88XMap lets you embed maptoolkit maps (like www.bikemap.net) into your WordPress blog.
     
    6060== Changelog ==
    6161
     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
    6267= 1.0.1 =
    6368* Shortcode handling improved
  • xmap/trunk/xmap.php

    r398547 r896760  
    33Plugin Name: XMap
    44Description: 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.0
     5Version: 1.1
    66Text Domain: xmap
    77Author: Matthias Scheidl <dev@scheidl.name>
    88*/
    99
    10 /*  Copyright 2010-2011  Matthias Scheidl  (email : dev@scheidl.name)
     10/*  Copyright 2010-2014  Matthias Scheidl  (email : dev@scheidl.name)
    1111
    1212    This program is free software; you can redistribute it and/or modify
Note: See TracChangeset for help on using the changeset viewer.