Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Thomas Hop Posted August 3, 2018 Posted August 3, 2018 Is it possible to add another table column to the Member Map application based on member id? I want to add core_pfields_content -> field_1 I inserted another hook but all I get is the table core_pfields_data when I try. try { $groupId = $this->getMemberGroupId(); $db = \IPS\Db::i()->select( '*', array( 'membermap_markers', 'mm' ), array( 'mm.marker_member_id=? AND mm.marker_parent_id=?', intval( $memberId ), intval( $groupId ) ) ); $memberPfield = \IPS\core\ProfileFields\Field::load( $memberId ); error_log(print_r($memberId,true)); error_log(print_r($memberPfield->data,true)); if ( $loadMemberdata ) { $db->join( array( 'core_members', 'm' ), 'mm.marker_member_id=m.member_id' ); $db->join( array( 'core_groups', 'g' ), 'm.member_group_id=g.g_id' ); } $_marker = $db->first(); if ( ! $format OR ! $loadMemberdata ) { $_marker = \IPS\membermap\Markers\Markers::constructFromData( $_marker ); } $marker[ $memberId . '-' . ( $format ? '1' : '0' ) ] = $_marker; } Any help here would be appriciated!
Martin A. Posted August 4, 2018 Author Posted August 4, 2018 17 hours ago, Thomas Hop said: Is it possible to add another table column to the Member Map application based on member id? I want to add core_pfields_content -> field_1 I inserted another hook but all I get is the table core_pfields_data when I try. Any help here would be appriciated! Hi, You can add that table as a DB join. $db = \IPS\Db::i()->select( '*', array( 'membermap_markers', 'mm' ), array( 'mm.marker_member_id=? AND mm.marker_parent_id=?', intval( $memberId ), intval( $groupId ) ) ); $db->join( array( 'core_ofields_content', 'pc' ), 'mm.marker_member_id=pc.member_id' );
Thomas Hop Posted August 6, 2018 Posted August 6, 2018 Yes that did add the table to $markers. When I print it inside the file: try { $groupId = $this->getMemberGroupId(); $db = \IPS\Db::i()->select( '*', array( 'membermap_markers', 'mm' ), array( 'mm.marker_member_id=? AND mm.marker_parent_id=?', intval( $memberId ), intval( $groupId ) ) ); if ( $loadMemberdata ) { $db->join( array( 'core_members', 'm' ), 'mm.marker_member_id=m.member_id' ); $db->join( array( 'core_groups', 'g' ), 'm.member_group_id=g.g_id' ); $db->join( array( 'core_pfields_content', 'pc' ), 'mm.marker_member_id=pc.member_id' ); } $_marker = $db->first(); if ( ! $format OR ! $loadMemberdata ) { $_marker = \IPS\membermap\Markers\Markers::constructFromData( $_marker ); } $marker[ $memberId . '-' . ( $format ? '1' : '0' ) ] = $_marker; error_log(print_r($marker,true)); } catch( \UnderflowException $e ) { return false; } } However when I print $markers inside the template popupContent there are only like 25 items left of the array. What am I missing here?
Unlucky Posted August 6, 2018 Posted August 6, 2018 Feature request. It would be great to be able to create an IP pages custom block containing the new map markers that have been added. Would this be possible?
Martin A. Posted August 12, 2018 Author Posted August 12, 2018 On 8/6/2018 at 11:48 AM, Thomas Hop said: Yes that did add the table to $markers. When I print it inside the file: However when I print $markers inside the template popupContent there are only like 25 items left of the array. What am I missing here? Hello, What you're missing here is that popup content is loaded with AJAX (this was done to reduce the size of the cache). See \IPS\membermap\modules\front\membermap\ajax getPopup(). You can do this in the template: {{if $marker->container()->type == 'member'}} {{$profileFields = $marker->author()->contentProfileFields();}} {{error_log( print_r( $profileFields, 1 ) );}} {{endif}}
Thomas Hop Posted August 16, 2018 Posted August 16, 2018 On 8/12/2018 at 8:24 AM, Martin A. said: Hello, What you're missing here is that popup content is loaded with AJAX (this was done to reduce the size of the cache). See \IPS\membermap\modules\front\membermap\ajax getPopup(). You can do this in the template: {{if $marker->container()->type == 'member'}} {{$profileFields = $marker->author()->contentProfileFields();}} {{error_log( print_r( $profileFields, 1 ) );}} {{endif}} Hey Martin, Been a bit inactive for a few days but I have seen your post and I will check up on it when I have the time! Thanks a lot!
derpunker Posted August 27, 2018 Posted August 27, 2018 Hello, is there any reason why this extension is based on MapQuest and not on the OpenStreetMap API? The OpenStreetMap API provides all the required information and doesn't need a registration.https://wiki.openstreetmap.org/wiki/Nominatimhttps://wiki.openstreetmap.org/wiki/Static_map_images (http://staticmap.openstreetmap.de/)
Martin A. Posted August 27, 2018 Author Posted August 27, 2018 21 minutes ago, derpunker said: Hello, is there any reason why this extension is based on MapQuest and not on the OpenStreetMap API? The OpenStreetMap API provides all the required information and doesn't need a registration.https://wiki.openstreetmap.org/wiki/Nominatimhttps://wiki.openstreetmap.org/wiki/Static_map_images (http://staticmap.openstreetmap.de/) Because their Nominatim policy does not allow the kind of usage Member Map require. And when I initially developed this 3 years ago, I used a different API endpoint at MapQuest. If I remember correctly, there was also a difference in the results from OSM Nominatim and MapQuest Nominatim, where the latter was far better at getting addresses. This may of course have changed over the years. https://operations.osmfoundation.org/policies/nominatim/ Quote No heavy uses (an absolute maximum of 1 request per second). .... Auto-complete search This is not yet supported by Nominatim and you must not implement such a service on the client side using the API. And they're not happy about automated bulk requests, which the profile sync feature would violate. derpunker 1
derpunker Posted August 27, 2018 Posted August 27, 2018 Hi Martin, thanks for your quick answer. Unfortunately you are absolutly right. I read the policies / licence of the OpenStreetMap maps but not of nominatim. My fault 😞 Another question: Is there a way to customize the scroll / resize behavior? The initial setMapHeight is absolutly great, but I want to disable the behavior for scrolling and resizing? The scrolling behavior makes the map a little bit hard to use on a smartphone (e.g. getting to the community footer). I reviewed the javascript code and found no setting. My first (and currently only) idea is to write a template hook and rename the ID of the div element.
Jason Back Posted September 9, 2018 Posted September 9, 2018 Hi all. hope great. Is there anyway I can remove that overlay of different options on the map? Please see attached. Thanks in advanced. Jay
Martin A. Posted September 10, 2018 Author Posted September 10, 2018 9 hours ago, Jason Back said: Hi all. hope great. Is there anyway I can remove that overlay of different options on the map? Please see attached. Thanks in advanced. Jay Add the following to your custom.css body[data-pageapp="membermap"] .leaflet-top.leaflet-right { display: none; } Jason Back 1
broni Posted September 12, 2018 Posted September 12, 2018 When I try to merge two members I'm getting following error. I contacted Invision support and they told me it's Member Map related.
Martin A. Posted September 12, 2018 Author Posted September 12, 2018 v3.5.2 have been uploaded fix the issue with merging members.
BN_IT_Support Posted September 14, 2018 Posted September 14, 2018 Hi Martin, The 3.5.2 Membermap Zip will not open on Windows 10. Thanks very much... Martin A. 1
Martin A. Posted September 14, 2018 Author Posted September 14, 2018 3 hours ago, Edward Shephard said: Hi Martin, The 3.5.2 Membermap Zip will not open on Windows 10. Thanks very much... Thanks for letting me know. I've uploaded a repacked version, as the first one was compressed in the TAR format (but named .zip),
BN_IT_Support Posted September 14, 2018 Posted September 14, 2018 43 minutes ago, Martin A. said: Thanks for letting me know. I've uploaded a repacked version, as the first one was compressed in the TAR format (but named .zip), Martin, Thanks very much for the quick fix! John Martin A. 1
.Ian Posted September 26, 2018 Posted September 26, 2018 Just upgraded to the latest version. All looks fine, except all the pins are doubled. I have two of each slightly apart. Any suggestions?
Martin A. Posted September 27, 2018 Author Posted September 27, 2018 10 hours ago, .Ian said: Just upgraded to the latest version. All looks fine, except all the pins are doubled. I have two of each slightly apart. Any suggestions? Are the markers duplicated in the database too? Click Browse Markers, and have a look. If they're not this is a cache issue. Rebuild both server and browser cache.
.Ian Posted September 27, 2018 Posted September 27, 2018 (edited) 59 minutes ago, Martin A. said: Are the markers duplicated in the database too? Click Browse Markers, and have a look. If they're not this is a cache issue. Rebuild both server and browser cache. Show twice in browse markers. So I assume I am safe to delete from the Browse Markers section? Edited September 27, 2018 by .Ian
Martin A. Posted September 27, 2018 Author Posted September 27, 2018 5 minutes ago, .Ian said: Show twice in browse markers. So I assume I am safe to delete from the Browse Markers section? That's weird. I see that it appears as if all markers were added 12 hours ago too, is that correct? Have you done any imports or anything? What version did you upgrade from? Yes, you can delete the duplicated markers from that section.
.Ian Posted September 27, 2018 Posted September 27, 2018 I am going to say 3.4.6 - it was 5 years old that is all I know! Just ran the upgrade . I'll delete from there. Thanks 🙂
Martin A. Posted September 27, 2018 Author Posted September 27, 2018 3 minutes ago, .Ian said: I am going to say 3.4.6 - it was 5 years old that is all I know! Just ran the upgrade . I'll delete from there. Thanks 🙂 Oh, so you upgraded the whole software from 3.4.6 yesterday? Or you upgraded/installed Member Map and it took the marker data from a 3.4.6 database/table? That can explain any weirdness.
.Ian Posted September 27, 2018 Posted September 27, 2018 1 minute ago, Martin A. said: Oh, so you upgraded the whole software from 3.4.6 yesterday? Or you upgraded/installed Member Map and it took the marker data from a 3.4.6 database/table? That can explain any weirdness. Both. IPS upgraded for me, then I am upgrading the apps. Some are fine, others are failing big time and some have the odd issues. Incidentally when I ticked and unticked various people, whilst the number of items being selected didn't alter, the number to confirm that I wanted to delete was much higher.
Pablo BJB Posted September 30, 2018 Posted September 30, 2018 Hello, After upgrading my IPS self hosted instance to 4.3.6 and member map application to the latest version 3.5.2, I'm experiencing issues with rebuilding member map cache cron job being stuck. I did run them manually, but again it gets stuck on the next cron job. It also blocks other cron jobs to perform... Also, my member map shows 0 markers. Please let me know what should I check/do. Thanks! Ivan
Recommended Posts