Release Notes

Features/Enhancement

  • Extended views instead of overriding so no plugins should conflict with it (hopefully)
  • Added geo_location metadata to user's entity, rather than for each wire post (added this for future plans to show community members on a map)
  • Users now has the option to turn locations off, it's on by default (even admins can't see location when turned off)
  • Wire post now have a cool looking icon next to location (icon is free for commercial use without linking back)
  • Removed actual elgg version requirement, only requirement is to run elgg 1.8
  • Cleaned up code
  • I should've been more specific lol. Test it on test server, not local server. This gives me a null value too on my MAMP. Btw in the plugins start.php you can change the $ip_address variable to "New York, New York" and it'll show up on your local server

  • I know why this isnt working for my elgg site now, I'm using the rivertalk plugin instead of the wire. This plugin isnt compatible with rivertalk without the wire as is. If you have the same plugin setup as me this plugin wil NOT work unless you make some coding changes.

    @Cim, incase you cant get to the bottom of geolocate not working, check for this scenario.

  • i see, yeah disabling the wire won't show the locations BUT locations are already saved in a user's entity so you can call it by 

    $location = get_metadata_byname($object->owner_guid,'geo_location');
    echo $location->value; 

  • so as long as geoplugin is activated, it'll automatically save their location in the database by user login or create

  • I see, Ill give it a try calling location in rivertalk activity view, if I manage to get it working I'll post the edit up for others with the same setup :)

    Thanks Cim

  • Ok got it working, tested, th location is a little off though. Anyways, for anyone using 'rivertalk' plugin and has the wire disabled;

    in mod/rivertalk/views/river/object/rivertalk/create.php

    find

    $object = $vars['item']->getObjectEntity();

    and add underneath

    $location = get_metadata_byname($object->owner_guid,'geo_location');

    so it looks like

    $object = $vars['item']->getObjectEntity();                                                                                 $location = get_metadata_byname($object->owner_guid,'geo_location');

    then near the end find

    $readmore_link = elgg_view('output/url', array(

    'href' => $object->getURL() . '#comments',

    'text' => elgg_echo('rivertalk:readmorelink'),

    'is_trusted' => true,

    ));

    $excerpt .= $readmore_link;

    }

    }

    }

    $description = $excerpt;

     

    and add directly underneath

    if ($location->access_id == 0) {

    echo '<div style="display:none">';

    } else {

    echo '<div class="user-location">';

    }

    echo '<img src="' . elgg_get_site_url() . 'mod/geoplugin/_graphics/location.png' . '" />';

    echo $location->value;

    echo '</div>';

     

    so it looks like

     

    $readmore_link = elgg_view('output/url', array(

    'href' => $object->getURL() . '#comments',

    'text' => elgg_echo('rivertalk:readmorelink'),

    'is_trusted' => true,

    ));

    $excerpt .= $readmore_link;

    }

    }

    }

    $description = $excerpt;

                                                                                                                                                              if ($location->access_id == 0) {

    echo '<div style="display:none">';

    } else {

    echo '<div class="user-location">';

    }

    echo '<img src="' . elgg_get_site_url() . 'mod/geoplugin/_graphics/location.png' . '" />';

    echo $location->value;

    echo '</div>';

     

    echo elgg_view('river/elements/layout', array(

    'item' => $vars['item'],

    'message' => $description,

          

    ));

     

    Thats it! Thanks again Cim, hope someone else finds this usefull.

     

  • No problem! And thanks for sharing your modifications for the rest of the community. 

  • All credit to you in the first place for creating this plugin and for giving your time to help me troubleshoot with it :)

  • @mac haha i guess, it really is a simple plugin. i'm surprised no one has made a plugin like this before. 

  • I want the turn Off & On option in users profile editing page please :( 

  • @kiss maybe i should put my version of the edit profile location where it checks if there's a value then it won't autofill, if no value then it will autofill.

  • $('Cim') I am so look forward to it, I played a lot as u know I asked for ur help in private messages as well and u did your best for me. But still I can not do that with codes.

    I want this Turn off & On option for users in their profile editing page which would be much useful and easy for members to go to their profile or accounts setting to Turn it Off or ON.

    Thanks a lot in advance & awaiting for you to do that :)

  • I dunno, here's what I read in the river:

    Deprecated in 1.8: get_metadata_byname() is deprecated by elgg_get_metadata() Called from [#14] /home/romancos/public_html/mod/geoplugin/views/default/geoplugin/river.php:8

     

  • @chicken sorry i barely read your message and yes you can translate the plugin if you want. i didnt make any language files for it so be my guest :)

    @roman i think those deprecated messages are fixed in 1.8.12 so please upgrade

  • hi chicken, this version should be ready for production use as i'm using it live on my site

  • adc

    not working on elgg 1.8.15. tried everything already suggested.

  • @cool-mates i am currently working on a few projects at the moment, one of them is making an ios/android app for my photography services. will test out on 1.8.15 when i can. thanks for your patience

Cim

Creator of Demyx

Stats

  • Category: Third Party integrations
  • License: GNU General Public License (GPL) version 2
  • Updated: 2015-5-19
  • Downloads: 3329
  • Recommendations: 15

Other Projects

View Cim's plugins