Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter upyup

    (@upyup)

    Sorry, the proper php code should be:

    $mymap = new Mappress_Map( array( “width” => 600, “height” => 450 ) );
    $mypoi = new Mappress_Poi( array( ‘address’ => $address[0], ‘title’ => “”, ‘body’ => $address[0] ) );
    $mypoi->geocode( );
    $mymap->pois = array($mypoi);
    var_dump($mymap->pois);
    $mymap->display( );

    The pois var dump returns:

    array(1) { [0]=> object(Mappress_Poi)#187 (8) { [“point”]=> array(2) { [“lat”]=> float(42.7047338) [“lng”]=> float(2.8932853) } [“title”]=> string(34) “8 Avenue du Palais des Expositions” [“titleUrl”]=> NULL [“body”]=> string(23) “66000 Perpignan, France” [“address”]=> string(63) “8bis, avenue du palais des expositions, 66000 Perpignan, France” [“correctedAddress”]=> string(59) “8 Avenue du Palais des Expositions, 66000 Perpignan, France” [“iconid”]=> NULL [“viewport”]=> array(2) { [“sw”]=> array(2) { [“lat”]=> float(42.7015923) [“lng”]=> float(2.8901326) } [“ne”]=> array(2) { [“lat”]=> float(42.7078876) [“lng”]=> float(2.8964279) } } } }

    which is lot better as the lat and lng datas are there…

    but still no map

    Thread Starter upyup

    (@upyup)

    well

    I have had a look at the geocode function and this is what I get when sending the datas directly to google through

    https://maps.google.com/maps/api/geocode/json?address=8bis avenue du palais des expositions, 66000 perpignan&sensor=false&output=json&region=FR&language=FR

    returns

    {
    “status”: “OK”,
    “results”: [ {
    “types”: [ “street_address” ],
    “formatted_address”: “8 Avenue du Palais des Expositions, 66000 Perpignan, France”,
    “address_components”: [ {
    “long_name”: “8”,
    “short_name”: “8”,
    “types”: [ “street_number” ]
    }, {
    “long_name”: “Avenue du Palais des Expositions”,
    “short_name”: “Avenue du Palais des Expositions”,
    “types”: [ “route” ]
    }, {
    “long_name”: “Perpignan”,
    “short_name”: “Perpignan”,
    “types”: [ “locality”, “political” ]
    }, {
    “long_name”: “Pyrénées-Orientales”,
    “short_name”: “66”,
    “types”: [ “administrative_area_level_2”, “political” ]
    }, {
    “long_name”: “Languedoc-Roussillon”,
    “short_name”: “Languedoc-Roussillon”,
    “types”: [ “administrative_area_level_1”, “political” ]
    }, {
    “long_name”: “France”,
    “short_name”: “FR”,
    “types”: [ “country”, “political” ]
    }, {
    “long_name”: “66000”,
    “short_name”: “66000”,
    “types”: [ “postal_code” ]
    } ],
    “geometry”: {
    “location”: {
    “lat”: 42.7047338,
    “lng”: 2.8932853
    },
    “location_type”: “RANGE_INTERPOLATED”,
    “viewport”: {
    “southwest”: {
    “lat”: 42.7015923,
    “lng”: 2.8901326
    },
    “northeast”: {
    “lat”: 42.7078876,
    “lng”: 2.8964279
    }
    },
    “bounds”: {
    “southwest”: {
    “lat”: 42.7047338,
    “lng”: 2.8932752
    },
    “northeast”: {
    “lat”: 42.7047461,
    “lng”: 2.8932853
    }
    }
    },
    “partial_match”: true
    } ]
    }

    which seems absolutely perfect.

    So it should work with this php code:

    $mymap = new Mappress_Map( array( “width” => 600, “height” => 450 ) );
    var_dump($address);
    $mypoi = new Mappress_Poi( array( “title” => “”, “body” => “”, “point” => array(“address” => $address[0]) ) );
    $mypoi->geocode( );
    $mymap->pois = array($mypoi);
    $mymap->display( );

    the var dump returns:

    array(1) { [0]=> string(63) “8bis, avenue du palais des expositions, 66000 Perpignan, France” }

    but my POI doesn’t show up ??

    Any other hint ?

    Sincerely
    Olivier

    Thread Starter upyup

    (@upyup)

    solved!

    for any reason, one of the parameters for the twitter app was wrong (client instead of browser)…

    With the application callback set to my website, the plugin settings has been properly achieved

    sorry for this…
    Olivier

    iiich, previous post sent too early, so here are the answers to your questions ??

    I definitely was logged as an administrator, so I do not think it’s a role or capavbilities problem… and the only plugin I can see modifying the admin edit screen list is EG-Series, if it is of any help…

    hi lopo

    version 3.1.1 does work very well, thanks for changing the function name! Upgrading wasn’t sufficient to make the duplicate link reapper, so as suggested I de and reactivated the plugin and now the duplicate link is back. Do not understand why, but it works !

    Many thanks for your proactivity ?? To me the case is closed

    There is a conflict with the smooth slider (https://www.clickonf5.org/smooth-slider) plugin as both define a function named register_mysettings() wich causes a fatal error

    I had to change it to register_mysettings_dp() for it to pass

    Last but not least, the “Duplicate” link under each post in the admin edit creen has disappeared since the plugin upgrade. It was very convenient, a pity it is not here any more

    Hope it helps !

    as a quick and dirty fix, I’ve put this:

    if (!$opt['taxonomies']) return $content;

    just before the foreach and the warning is now gone

    Thread Starter upyup

    (@upyup)

    Hi John

    I confirm new v3.4.1 doesn’t break up my pages any more, thanks for all!

    Thread Starter upyup

    (@upyup)

    Sorry not to have seen your previous comment before, well anyway I couldn’t have been of any more help as strangely no error was reported which has made me crazy a while before I thought to have a look at the last plugin updates made on the server files and fortunately the latest was yours…

    I’ll upgrade to the 3.4.1 version in a few days when back home and able again to safely access my server, in the meantime many thanks for your so useful plugin and your proactivity as well ?? Have a nice Xmas !

    Thread Starter upyup

    (@upyup)

    switching back to 3.3.0 looks fine so there is somthing into 3.4.0 which goes wrong with my configuration

    You can see them in the user’s profile, or directly in the usermeta table.

    There is something missing in the code anyway to display it properly whatever the data type you have chosen (try to set a date custom field by example).

    here’s the hack I’ve made:

    open register-plus.php

    find

    if( $v['profile'] ){
       $id = $this->Label_ID($v['label']);
       $value = get_usermeta( $user_ID, $id );
       $extraops = explode(',', $v['extraoptions']);
       switch( $v['fieldtype'] ){

    add

    Default:
       $outfield = '<input type="text" name="' . $id . '" id="' . $id . '" value="' . $value . '"  />';
       break;

    at the end of the switch statement (before it’s closing “}” )

    Hope it helps

Viewing 11 replies - 1 through 11 (of 11 total)