Plugin Directory

Changeset 2508955


Ignore:
Timestamp:
04/04/2021 01:41:49 PM (5 years ago)
Author:
teplosup
Message:

Fix import markers by coordinates.

Location:
shmapper-by-teplitsa
Files:
132 added
3 edited

Legend:

Unmodified
Added
Removed
  • shmapper-by-teplitsa/trunk/README.txt

    r2481970 r2508955  
    44Plugin URI: http://genagl.ru/?p=652
    55Tags: map, OpenStreetMap, OSM, yandex.map, crowdsourcing, карта, Яндекс.карты, картирование, mapping, crowdsourced mapping, user mapping
    6 Requires at least: 3.6.1
    7 Tested up to: 5.5.1
     6Requires at least: 5.0
     7Tested up to: 5.7
    88Requires PHP: 5.6
    99Stable tag: trunk
  • shmapper-by-teplitsa/trunk/class/ShMapperDriverPreview.class.php

    r2481968 r2508955  
    1 <?php 
     1<?php
    22
    33class ShMapperDriverPreview
     
    3333                $icon = ShMapPointType::get_icon($type, false, false);
    3434                $geocode = implode(" - " , static::getGeoPosition( $m ));
    35                
     35
    3636                if(ShMapperDrive::$options['is_google_post_date'])
    3737                    $post_date  = strtotime( $m[ getSingleGoogleOrder(ShMapperDrive::$options['post_date']) ]);
     
    122122                    $icon = ShMapPointType::get_icon($type, false, false);
    123123                   
    124                     // post_date - 4                   
     124                    // post_date - 4
    125125                    if(ShMapperDrive::$options['is_google_post_date'])
    126126                        $post_date  = strtotime( $m[ getSingleGoogleOrder(ShMapperDrive::$options['post_date']) ]);
     
    148148                    $post_title     = $m[ getSingleGoogleOrder(ShMapperDrive::$options['shmd_post_title']) ];
    149149                    $post_content   = $m[ getSingleGoogleOrder(ShMapperDrive::$options['shmd_post_desc']) ];
    150                     //$post_content = $cont ;
     150
    151151                    $point          = ShMapperPointMessage::insert([
    152152                        'post_name'     => $post_title,
     
    177177                    }                   
    178178                    $icon = ShMapPointType::get_icon($type, false, false);
    179                    
    180                     // post_date - 4                   
     179
     180                    // post_date - 4
    181181                    if(ShMapperDrive::$options['is_google_post_date'])
    182182                        $post_date  = strtotime( $m[ getSingleGoogleOrder(ShMapperDrive::$options['post_date']) ]);
    183183                    else
    184184                        $post_date  = time();
    185                    
    186185                    $ii = 0;
    187186                    foreach(ShMapperDrive::$options['google_matrix_data'] as $n)
     
    204203                    $post_title     = $m[ getSingleGoogleOrder(ShMapperDrive::$options['shmd_post_title']) ];
    205204                    $post_content   = $m[ getSingleGoogleOrder(ShMapperDrive::$options['shmd_post_desc']) ];
    206                     //$post_content = $cont;
     205
    207206                    $point          = ShmPoint::insert([
    208207                        'post_name'     => $post_title,
     
    223222            $i++;
    224223        }
    225                
    226         //var_dump($copies );
    227         //wp_die();
    228                
    229     }
    230     static function delete()
    231     {
    232         static::$google_table_id        = ShMapperDrive::$options["google_table_id"];
     224
     225    }
     226    static function delete() {
     227        static::$google_table_id  = ShMapperDrive::$options["google_table_id"];
    233228        $posts = get_posts([
    234229            "numberposts"   => -1,
     
    244239                ]
    245240            ]
    246         ]);
    247         //var_dump( $posts );
    248         //wp_die();
     241        ] );
     242
    249243        if( count($posts) > 0 )
    250244        {
     
    255249        }
    256250    }
    257    
    258     static function getGeoPosition( $m )
    259     {
    260         switch( ShMapperDrive::$options['google_geo_position'])
    261         {
     251
     252    static function getGeoPosition( $m ) {
     253        switch( ShMapperDrive::$options['google_geo_position'] ) {
    262254            case 0:
    263255                return [
    264                     $m[ getSingleGoogleOrder( static::$options['google_geo_lon'] ) ],
    265                     $m[ getSingleGoogleOrder( static::$options['google_geo_lat'] ) ]
     256                    $m[ getSingleGoogleOrder( ShMapperDrive::$options['google_geo_lon'] ) ],
     257                    $m[ getSingleGoogleOrder( ShMapperDrive::$options['google_geo_lat'] ) ]
    266258                ];
    267259            case 1:
     
    273265        }
    274266    }
    275     static function geocode($address)
    276     {
     267    static function geocode($address) {
    277268        //$address = "Москва, Тверская, 12";
    278269        $key = "921be5a4-36cd-4485-8f57-2c24f94dab32";
  • shmapper-by-teplitsa/trunk/shmapper.php

    r2481968 r2508955  
    44 * Plugin URI: http://genagl.ru/?p=652
    55 * Description: Location and logistics services for NKO
    6  * Version: 1.4.1
     6 * Version: 1.4.2
    77 * Requires at least: 5.0
    88 * Requires PHP: 5.6
     
    3636    along with this program; if not, write to the Free Software
    3737    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    38  */
     38*/
    3939
    4040/** Load textdomain */
Note: See TracChangeset for help on using the changeset viewer.