Plugin Directory

Changeset 643415


Ignore:
Timestamp:
12/22/2012 03:02:55 PM (13 years ago)
Author:
DerWebschmied
Message:

Version 2.5

Location:
google-routeplaner/trunk
Files:
11 added
10 edited

Legend:

Unmodified
Added
Removed
  • google-routeplaner/trunk/google-routeplaner-add-route.php

    r604752 r643415  
    88    {
    99           
    10         $wpdb->query("INSERT INTO " . $wpdb->prefix . "google_routeplaner (`start_location`, `planer_width`, `planer_height`, `planer_zoom`, `planer_type`, `planer_zoom_control`, `planer_type_control`, `planer_language`)
     10        $wpdb->query("INSERT INTO " . $wpdb->prefix . "google_routeplaner (`start_location`, `planer_width`, `planer_width_unit`, `planer_height`, `planer_height_unit`, `planer_zoom`, `planer_type`, `planer_zoom_control`, `planer_type_control`, `planer_autofill`, `planer_language`)
    1111        VALUES (
    1212        '" . $_POST['google_routeplaner_destination'] . "',
    1313        '" . $_POST['google_routeplaner_map_width'] . "',
     14        '" . $_POST['google_routeplaner_map_width_unit'] . "',
    1415        '" . $_POST['google_routeplaner_map_height'] . "',
     16        '" . $_POST['google_routeplaner_map_height_unit'] . "',
    1517        '" . $_POST['google_routeplaner_zoom'] . "',
    1618        '" . $_POST['google_routeplaner_map_type'] . "',
    1719        '" . $_POST['google_routeplaner_zoom_control'] . "',
    1820        '" . $_POST['google_routeplaner_type_control'] . "',
     21        '" . $_POST['google_routeplaner_autofill'] . "',
    1922        '" . $_POST['google_routeplaner_language'] . "')");
    2023   
     
    2528        ?>
    2629            <div class="wrap google_routeplaner">
    27             <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
     30            <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
    2831            <p class="error">
    2932            <?php _e('There has been a problem with installing the plugin. The plugin tried to fix this, please try again.'); ?><br />
     
    3538        ?>   
    3639            <div class="wrap google_routeplaner">
    37             <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
     40            <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
    3841            <p class="success"><?php _e('Your route has been saved!', 'google_routeplaner'); ?><br />
    3942            <?php _e('The code for this route is: ', 'google_routeplaner'); ?> [googlerouteplaner=<?php echo $map_id; ?>]</p>
     
    4952?>
    5053    <div class="wrap google_routeplaner">
    51         <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
     54        <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Add Route', 'google_routeplaner'); ?></h2>
    5255        <div id="poststuff">
    5356            <form method="post" action="">
     
    9598                        <i><?php _e('Add a search string for the destination. Adress, company name or something like this.', 'google_routeplaner'); ?></i></p>
    9699                        <p><label for="google_routeplaner_map_width" class="formbold"><?php _e('Map width', 'google_routeplaner'); ?></label><br />
    97                         <input type="text" name="google_routeplaner_map_width" id="google_routeplaner_map_width" style="width: 70px;" value="500" /><br />
     100                        <input type="text" name="google_routeplaner_map_width" id="google_routeplaner_map_width" style="width: 70px;" value="500" />
     101                        <select name="google_routeplaner_map_width_unit" id="google_routeplaner_map_width_unit">
     102                            <option value="px">px</option>
     103                            <option value="%">%</option>
     104                            <option value="em">em</option>
     105                        </select>
     106                        <br />
    98107                        <i><?php _e('Enter the width for the map.', 'google_routeplaner'); ?></i></p>
    99108                        <p><label for="google_routeplaner_map_height" class="formbold"><?php _e('Map heigth', 'google_routeplaner'); ?></label><br />
    100                         <input type="text" name="google_routeplaner_map_height" id="google_routeplaner_map_height" style="width: 70px;" value="400" /><br />
     109                        <input type="text" name="google_routeplaner_map_height" id="google_routeplaner_map_height" style="width: 70px;" value="400" />
     110                        <select name="google_routeplaner_map_height_unit" id="google_routeplaner_map_height_unit">
     111                            <option value="px">px</option>
     112                            <option value="%">%</option>
     113                            <option value="em">em</option>
     114                        </select>
     115                        <br />
    101116                        <i><?php _e('Enter the height for the map.', 'google_routeplaner'); ?></i></p>
    102117                       
     
    117132                        </select></p>       
    118133                       
     134                        <p><span class="formbold"><?php _e('Auto-Detect users location', 'google_routeplaner'); ?></span><br />
     135                        <input type="radio" name="google_routeplaner_autofill" id="google_routeplaner_autofill_yes" value="1" />
     136                        <label for="google_routeplaner_autofill_yes"><?php _e('Yes', 'google_routeplaner'); ?></label><br />
     137                        <input type="radio" name="google_routeplaner_autofill" id="google_routeplaner_autofill_no" value="0" checked="checked" />
     138                        <label for="google_routeplaner_autofill_no"><?php _e('No', 'google_routeplaner'); ?></label><br />
     139                        <i><?php _e('This is based on HTML5 and will work best with mobile devices.', 'google_routeplaner'); ?></i></p>
     140                       
    119141                        <p><label for="google_routeplaner_language" class="formbold"><?php _e('Language', 'google_routeplaner'); ?></label><br />
    120142                        <select name="google_routeplaner_language" id="google_routeplaner_language">
     
    131153                            <option value="ru"<?php if('ru' == get_option("google_routeplaner_language")) { echo ' selected="selected"'; } ?>><?php _e('Russian', 'google_routeplaner'); ?></option>
    132154                            <option value="ja"<?php if('ja' == get_option("google_routeplaner_language")) { echo ' selected="selected"'; } ?>><?php _e('Japanese', 'google_routeplaner'); ?></option>
    133                         </select></p>
     155                        </select><br />
     156                        <i><?php _e('This only effects the route output, not the interface!', 'google_routeplaner'); ?></i></p>
    134157                    </div>
    135158                </div>
  • google-routeplaner/trunk/google-routeplaner-doc-page.php

    r594932 r643415  
    11<div class="wrap google_routeplaner">
    2     <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Documentation', 'google_routeplaner'); ?></h2>
     2    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Documentation', 'google_routeplaner'); ?></h2>
    33    <div id="poststuff">
    44        <div class="postbox">
  • google-routeplaner/trunk/google-routeplaner-edit-route.php

    r604752 r643415  
    1212        start_location = '" . $_POST['google_routeplaner_destination'] . "',
    1313        planer_width = '" . $_POST['google_routeplaner_map_width'] . "',
     14        planer_width_unit = '" . $_POST['google_routeplaner_map_width_unit'] . "',
    1415        planer_height = '" . $_POST['google_routeplaner_map_height'] . "',
     16        planer_height_unit = '" . $_POST['google_routeplaner_map_height_unit'] . "',
    1517        planer_zoom = '" . $_POST['google_routeplaner_zoom'] . "',
    1618        planer_type = '" . $_POST['google_routeplaner_map_type'] . "',
    1719        planer_zoom_control = '" . $_POST['google_routeplaner_zoom_control'] . "',
    1820        planer_type_control = '" . $_POST['google_routeplaner_type_control'] . "',
     21        planer_autofill = '" . $_POST['google_routeplaner_autofill'] . "',
    1922        planer_language = '" . $_POST['google_routeplaner_language'] . "'
    2023        WHERE planer_id = '" . $_POST['route_id'] . "' LIMIT 1");
     
    2225        ?>
    2326        <div class="wrap google_routeplaner">
    24         <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Edit Route', 'google_routeplaner'); ?></h2>
     27        <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Edit Route', 'google_routeplaner'); ?></h2>
    2528        <p class="success"><?php _e('Your changes has been saved!', 'google_routeplaner'); ?></p>
    2629        <p><a href="admin.php?page=google_routeplaner_routes"><?php _e('Back to overview', 'google_routeplaner'); ?></a></p>
     
    3639?>
    3740    <div class="wrap google_routeplaner">
    38         <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Edit Route', 'google_routeplaner'); ?></h2>
     41        <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Edit Route', 'google_routeplaner'); ?></h2>
    3942        <div id="poststuff">
    4043            <form method="post" action="">
     
    102105                        <i><?php _e('Add a search string for the destination. Adress, company name or something like this.', 'google_routeplaner'); ?></i></p>
    103106                        <p><label for="google_routeplaner_map_width" class="formbold"><?php _e('Map width', 'google_routeplaner'); ?></label><br />
    104                         <input type="text" name="google_routeplaner_map_width" id="google_routeplaner_map_width" style="width: 70px;" value="<?php echo $planer['planer_width']; ?>" /><br />
     107                        <input type="text" name="google_routeplaner_map_width" id="google_routeplaner_map_width" style="width: 70px;" value="<?php echo $planer['planer_width']; ?>" />
     108                        <select name="google_routeplaner_map_width_unit" id="google_routeplaner_map_width_unit">
     109                            <option value="px"<?php if('px' == $planer['planer_width_unit']) { echo ' selected=""'; } ?>>px</option>
     110                            <option value="%"<?php if('%' == $planer['planer_width_unit']) { echo ' selected=""'; } ?>>%</option>
     111                            <option value="em"<?php if('em' == $planer['planer_width_unit']) { echo ' selected=""'; } ?>>em</option>
     112                        </select>
     113                        <br />
    105114                        <i><?php _e('Enter the width for the map.', 'google_routeplaner'); ?></i></p>
    106115                        <p><label for="google_routeplaner_map_height" class="formbold"><?php _e('Map heigth', 'google_routeplaner'); ?></label><br />
    107                         <input type="text" name="google_routeplaner_map_height" id="google_routeplaner_map_height" style="width: 70px;" value="<?php echo $planer['planer_height']; ?>" /><br />
     116                        <input type="text" name="google_routeplaner_map_height" id="google_routeplaner_map_height" style="width: 70px;" value="<?php echo $planer['planer_height']; ?>" />
     117                        <select name="google_routeplaner_map_height_unit" id="google_routeplaner_map_height_unit">
     118                            <option value="px"<?php if('px' == $planer['planer_height_unit']) { echo ' selected=""'; } ?>>px</option>
     119                            <option value="%"<?php if('%' == $planer['planer_height_unit']) { echo ' selected=""'; } ?>>%</option>
     120                            <option value="em"<?php if('em' == $planer['planer_height_unit']) { echo ' selected=""'; } ?>>em</option>
     121                        </select>
     122                        <br />
    108123                        <i><?php _e('Enter the height for the map.', 'google_routeplaner'); ?></i></p>
    109124                       
     
    124139                        </select></p>
    125140                       
    126                         <p> <label for="google_routeplaner_language" class="formbold"><?php _e('Language', 'google_routeplaner'); ?></label><br />
     141                       
     142                        <p><span class="formbold"><?php _e('Auto-Detect users location', 'google_routeplaner'); ?></span><br />
     143                        <input type="radio" name="google_routeplaner_autofill" id="google_routeplaner_autofill_yes" value="1"<?php if(1 == intval($planer['planer_autofill'])) { echo ' checked=""'; } ?> />
     144                        <label for="google_routeplaner_autofill_yes"><?php _e('Yes', 'google_routeplaner'); ?></label><br />
     145                        <input type="radio" name="google_routeplaner_autofill" id="google_routeplaner_autofill_no" value="0"<?php if(0 == intval($planer['planer_autofill'])) { echo ' checked=""'; } ?> />
     146                        <label for="google_routeplaner_autofill_no"><?php _e('No', 'google_routeplaner'); ?></label><br />
     147                        <i><?php _e('This is based on HTML5 and will work best with mobile devices.', 'google_routeplaner'); ?></i></p>
     148                       
     149                        <p><label for="google_routeplaner_language" class="formbold"><?php _e('Language', 'google_routeplaner'); ?></label><br />
    127150                        <select name="google_routeplaner_language" id="google_routeplaner_language">
    128151                            <option value=""><?php _e('Default', 'google_routeplaner'); ?></option>
     
    138161                            <option value="ru"<?php if('ru' == $planer['planer_language']) { echo ' selected="selected"'; } ?>><?php _e('Russian', 'google_routeplaner'); ?></option>
    139162                            <option value="ja"<?php if('ja' == $planer['planer_language']) { echo ' selected="selected"'; } ?>><?php _e('Japanese', 'google_routeplaner'); ?></option>
    140                         </select></p>
     163                        </select><br />
     164                        <i><?php _e('This only effects the route output, not the interface!', 'google_routeplaner'); ?></i></p>
    141165                    </div>
    142166                </div>
  • google-routeplaner/trunk/google-routeplaner-js.php

    r594932 r643415  
    88    window.addEventListener("load", initialize' . $_GET['planer_id'] . ', false);
    99}';
     10
     11if(1 == intval($_GET['autofill'])) {
     12
     13    echo 'function setUserPos(position) {
     14        document.getElementById(\'fromAddress' . $_GET['planer_id'] . '\').value = position.coords.latitude + \', \' + position.coords.longitude;
     15        //alert(position.coords.latitude);
     16        //alert(position.coords.longitude);
     17    }
    1018   
     19    navigator.geolocation.getCurrentPosition(setUserPos);';
     20}
     21
    1122?>
  • google-routeplaner/trunk/google-routeplaner-list-routes.php

    r604752 r643415  
    1717    }
    1818    </script>
    19    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Routes', 'google_routeplaner'); ?></h2>
     19   <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Routes', 'google_routeplaner'); ?></h2>
    2020   <p><a href="admin.php?page=google_routeplaner_routes&amp;routeplaner_action=google_routeplaner_add_route" class="button-primary"><?php _e('Create Route', 'google_routeplaner'); ?></a></p>
    2121   <table class="widefat" cellspacing="0" cellpadding="0">
  • google-routeplaner/trunk/google-routeplaner-main-page.php

    r604752 r643415  
    11 <div class="wrap google_routeplaner">
    2    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Overview', 'google_routeplaner'); ?></h2>
     2   <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Overview', 'google_routeplaner'); ?></h2>
    33    <div id="poststuff">
    44        <div class="postbox" style="width: 30%; float: right;">
    55            <h3><?php _e('Changelog', 'google_routeplaner'); ?></h3>
    66            <div class="inside" style="height: 300px; overflow: auto; overflow-y: scroll;">
     7                <h5>Version 2.5</h5>
     8                    <ul>
     9                        <li>French translation added, thanks to Corentin Smith</li>
     10                        <li>Slovak Translation by <a href="http://webhostinggeeks.com/blog/">WebHostingGeeks.com</a> added</li>
     11                        <li>You can now define map height and width in px, % or em</li>
     12                        <li>New feature: HTML5 detection for users location to autofill the form</li>
     13                    </ul>
    714                <h5>Version 2.3</h5>
    815                    <ul>
     
    7582                <h3><?php _e('The Plugin', 'google_routeplaner'); ?></h3>
    7683                <div class="inside">
    77                     <p><?php _e('Google Routeplaner generates a routeplaner based on the <a href="http://code.google.com/apis/maps/">Google Maps API</a>.', 'google_routeplaner'); ?></p>
     84                    <p><?php _e('Google Routeplanner generates a routeplanner based on the <a href="http://code.google.com/apis/maps/">Google Maps API</a>.', 'google_routeplaner'); ?></p>
    7885                    <p><?php _e('We suggest adding a printer friendly stylesheet to your Wordpress design to allow your users to print the route without the need to print design elements. A tutorial how to do this can be found <a href="http://codex.wordpress.org/Styling_for_Print">here</a>.', 'google_routeplaner'); ?></p>
    7986                    <p><?php _e('Plugin developed by <a href="http://deformed-design.de">Deformed Design</a>.', 'google_routeplaner'); ?></p>
  • google-routeplaner/trunk/google-routeplaner-pages.php

    r604752 r643415  
    6161    ?>
    6262    <div class="wrap google_routeplaner">
    63     <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Delete Route', 'google_routeplaner'); ?></h2>
     63    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Delete Route', 'google_routeplaner'); ?></h2>
    6464    <p class="success"><?php _e('The route has been deleted!', 'google_routeplaner'); ?></p>
    6565    <p><a href="admin.php?page=google_routeplaner_routes" class="button"><?php _e('Back to overview', 'google_routeplaner'); ?></a></p>
     
    7474    ?>
    7575    <div class="wrap google_routeplaner">
    76     <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Preview Route', 'google_routeplaner'); ?></h2>
     76    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Preview Route', 'google_routeplaner'); ?></h2>
    7777    <p><a href="admin.php?page=google_routeplaner_routes" class="button"><?php _e('Back to overview', 'google_routeplaner'); ?></a></p>
    7878    <?php echo google_routeplaner_build_map($route_id); ?>
     
    110110    add_option("google_routeplaner_donate","personal_link");   
    111111    add_option("google_routeplaner_language","en");
     112    add_option("google_routeplaner_version","2.5");
    112113   
    113114    add_action( 'admin_menu' , 'admin_menu_new_items' );
  • google-routeplaner/trunk/google-routeplaner-settings-page.php

    r594932 r643415  
    11 <div class="wrap google_routeplaner">
    2    <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplaner', 'google_routeplaner'); ?> &bull; <?php _e('Settings', 'google_routeplaner'); ?></h2>
     2   <div id="icon-google_routeplaner" class="icon32"><br /></div><h2><?php _e('Google Routeplanner', 'google_routeplaner'); ?> &bull; <?php _e('Settings', 'google_routeplaner'); ?></h2>
    33    <?php
    44    /*
     
    5555                    <option value="ja"<?php if('ja' == get_option("google_routeplaner_language")) { echo ' selected="selected"'; } ?>><?php _e('Japanese', 'google_routeplaner'); ?></option>
    5656                </select><br />
    57                 <i><?php _e('Set language for driving information.', 'google_routeplaner'); ?></i></p>
     57                <i><?php _e('Set language for driving information, this does not effect the interface.', 'google_routeplaner'); ?></i></p>
    5858            </div>
    5959        </div>
  • google-routeplaner/trunk/google-routeplaner.php

    r604752 r643415  
    11<?php
    22/*
    3 Plugin Name: Google Routeplaner
     3Plugin Name: Google Routeplanner
    44Plugin URI: http://support.derwebschmied.de
    55Description: Allows you to add one or more route planners based on Google Maps to help your users to find a specific place.
    6 Version: 2.3
     6Version: 2.5
    77Author: DerWebschmied
    88Author URI: http://support.derwebschmied.de
     
    1515 * Load Language
    1616 */
    17 load_plugin_textdomain('google_routeplaner', WP_PLUGIN_DIR . '/google-routeplaner/', dirname(plugin_basename(__FILE__)));
     17load_plugin_textdomain('google_routeplaner', WP_PLUGIN_DIR . '/google-routeplaner/', dirname(plugin_basename(__FILE__)) . '/languages/');
    1818
    1919/*
     
    7272                     `start_location` VARCHAR(120) NOT NULL,
    7373                     `planer_width` INT NOT NULL,
     74                     `planer_width_unit` VARCHAR( 5 ) DEFAULT \'px\',
    7475                     `planer_height` INT NOT NULL,
     76                     `planer_height_unit` VARCHAR( 5 ) DEFAULT \'px\',
    7577                     `planer_zoom` INT NOT NULL,
    7678                     `planer_type` VARCHAR(120) NOT NULL,
    7779                     `planer_zoom_control` VARCHAR(120) NOT NULL,
    7880                     `planer_type_control` VARCHAR(120) NOT NULL,
     81                     `planer_autofill` INT NOT NULL DEFAULT  \'0\',
    7982                     `planer_language` VARCHAR( 2 ),
    8083                     PRIMARY KEY (`planer_id`)
     
    8386       
    8487    } else {
    85         /*
    86          * Update old information in the database for version 2
    87          */
    88         $wpdb->query('ALTER TABLE  `' . $wpdb->prefix . 'google_routeplaner` ADD  `planer_zoom` INT NOT NULL DEFAULT  \'8\' AFTER  `planer_height`');
     88        google_routeplaner_update();   
     89    }
     90}
     91
     92function google_routeplaner_update() {
     93    /*
     94     * Update old information in the database for version 2
     95     */
     96    $wpdb->query('ALTER TABLE  `' . $wpdb->prefix . 'google_routeplaner` ADD  `planer_zoom` INT NOT NULL DEFAULT  \'8\' AFTER  `planer_height`');
    8997       
    90         /*
    91          * Update old information in the database for version 2.2
    92          */
    93         $cur_donate = get_option('google_routeplaner_donate');
    94         if('link' == $cur_donate) {
    95             update_option("google_routeplaner_donate", 'personal_link');
    96         } elseif('articel' == $cur_donate) {
    97             update_option("google_routeplaner_donate", 'personal_no_link');
    98         } elseif('paypal' == $cur_donate) {
    99             update_option("google_routeplaner_donate", 'commercial_paypal');
    100         } elseif('none' == $cur_donate) {
    101             update_option("google_routeplaner_donate", 'personal_no_link');
    102         }
    103    
    104    
    105     }
    106 }
     98    /*
     99     * Update old information in the database for version 2.2
     100     */
     101    $cur_donate = get_option('google_routeplaner_donate');
     102    if('link' == $cur_donate) {
     103        update_option("google_routeplaner_donate", 'personal_link');
     104    } elseif('articel' == $cur_donate) {
     105        update_option("google_routeplaner_donate", 'personal_no_link');
     106    } elseif('paypal' == $cur_donate) {
     107        update_option("google_routeplaner_donate", 'commercial_paypal');
     108    } elseif('none' == $cur_donate) {
     109        update_option("google_routeplaner_donate", 'personal_no_link');
     110    }
     111   
     112    /*
     113     * Update old information in the database for version 2.5
     114     */
     115    $wpdb->query('ALTER TABLE  `wp_google_routeplaner` ADD  `planer_width_unit` VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  \'px\' AFTER  `planer_width`');
     116    $wpdb->query('ALTER TABLE  `wp_google_routeplaner` ADD  `planer_height_unit` VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT  \'px\' AFTER  `planer_height`');
     117    $wpdb->query('ALTER TABLE  `wp_google_routeplaner` ADD  `planer_autofill` INT NOT NULL DEFAULT  \'0\' AFTER  `planer_type_control`');
     118   
     119   
     120}
     121
    107122if ( function_exists('register_update_hook') )
    108     register_update_hook(WP_PLUGIN_DIR . '/google-routeplaner/google-routeplaner.php', 'google_routeplaner_install');
     123    register_update_hook(WP_PLUGIN_DIR . '/google-routeplaner/google-routeplaner.php', 'google_routeplaner_update');
    109124
    110125/*
     
    199214    $map .= '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/google-routeplaner/google-routeplaner-main-js.php?planer_id=' . $planer['planer_id'] . '&amp;planer_type=' . urlencode($planer['planer_type']) . '&amp;planer_zoom_control=' . urlencode($planer['planer_zoom_control']) . '&amp;planer_type_control=' . urlencode($planer['planer_type_control']) . '&amp;start_location=' . urlencode($planer['start_location']) . '&amp;planer_zoom=' . $planer['planer_zoom'] . '"></script>' . "\n";
    200215   
    201     if('' !== $planer['planer_css'] && strlen($planer['planer_css']) > 55) {
    202         $map .= '<style type="text/css" media="all">
    203             ' . $planer['planer_css'] . '   
    204         </style>' . "\n";
    205     }
    206    
    207216    $map .=
    208217    '<form action="#" onsubmit="calcRoute' . $planer['planer_id'] . '(); return false">
    209218     <div id="map_controls' . $planer['planer_id'] . '" class="google_map_controls"><label for="fromAddress' . $planer['planer_id'] . '">' . __('Your location', 'google_routeplaner') . '</label> <input type="text" size="25" id="fromAddress' . $planer['planer_id'] . '" name="from" value=""/><input name="calc" type="submit" value="' . __('Create route', 'google_routeplaner') . '" /></div>
    210      <div id="map_canvas' . $planer['planer_id'] . '" class="google_map_canvas" style="overflow: hidden; width: ' . $planer['planer_width'] . 'px; height: ' . $planer['planer_height'] . 'px;"></div>
     219     <div id="map_canvas' . $planer['planer_id'] . '" class="google_map_canvas" style="overflow: hidden; width: ' . $planer['planer_width'] . $planer['planer_width_unit'] . '; height: ' . $planer['planer_height'] . $planer['planer_height_unit'] . ';"></div>
    211220     <div id="map_directions' . $planer['planer_id'] . '" class="google_map_directions"></div>
    212221    </form>' . "\n";
    213222   
    214     $map .= '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/google-routeplaner/google-routeplaner-js.php?planer_id=' . $planer['planer_id'] . '"></script>';
     223    $map .= '<script type="text/javascript" src="' . WP_PLUGIN_URL . '/google-routeplaner/google-routeplaner-js.php?planer_id=' . $planer['planer_id'] . '&autofill=' . $planer['planer_autofill'] . '"></script>';
    215224   
    216225    if('personal_link' == get_option("google_routeplaner_donate") || 'commercial_link' == get_option("google_routeplaner_donate")) {
     
    233242
    234243function google_routeplaner_admin_head() {
    235     echo '<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
     244    echo '<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
    236245    <style type="text/css" media="screen">
    237246    @import url("' . WP_PLUGIN_URL . '/google-routeplaner/google-routeplaner.css");
     
    241250
    242251function google_routeplaner_head() {
    243     echo '<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />';
     252    echo '<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />';
    244253}
    245254add_action('wp_head', 'google_routeplaner_head');
  • google-routeplaner/trunk/readme.txt

    r604907 r643415  
    1 === Google Routeplaner ===
     1=== Google Routeplanner ===
    22Contributors: DerWebschmied
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VAFAKGCDQ2GHU
    4 Tags: route, google, map, route planner, planer, route
     4Tags: route, google, map, route planner, planer, planner, route
    55Requires at least: 3.0
    66Tested up to: 3.4.2
    7 Stable tag: 2.3
     7Stable tag: 2.5
     8License: Feel free to edit for personal use
    89
    910Allows you to add one or more route planners based on Google Maps to help your users to find a specific place.
     
    1516The view of the plan can be quickly and easily adapt to your needs and of course it is also possible to create more then one route planner, for example to find venues. The well-known interface of Google Maps your users find quickly a way around. With a simple input field the user can specify their own location and not only gets directions but also a map with the marked path.
    1617
    17 * [Plugin Support](http://support.derwebschied.de/)
     18= Support =
    1819
    19 Romanian Translation [Web Geek Science](http://webhostinggeeks.com/)
     20Please don't use the WordPress.org Forums if you need help with the plugin.
     21Use our [Plugin Support Page](http://support.derwebschied.de/) instead.
     22
     23= Translations =
     24* Romanian Translation: [Web Geek Science](http://webhostinggeeks.com/)
     25* French Translation: Corentin Smith
     26* Slovak Translation [WebHostingGeeks.com] (http://webhostinggeeks.com/blog/)
    2027
    2128== Installation ==
     
    4653== Changelog ==
    4754
    48 = 2.3 =
     55= 2.5 =
     56* French translation added, thanks to Corentin Smith
     57* Slovak Translation by [WebHostingGeeks.com] (http://webhostinggeeks.com/blog/) added
     58* You can now define map height and width in px, % or em
     59* New feature: HTML5 detection for users location to autofill the form
     60
     61= 2.3 =
    4962* WordPress Multisite support
    5063* Added default values for zoom level to prevent errors
Note: See TracChangeset for help on using the changeset viewer.