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
  • $('Cim') Oops like I was also right, because when I logged out & came back then this plugin was working :)

  • Cim ... you not only geolocated people but also love-located... kissing bros' here! :D

    Kisses thanks yeah, all you say is correct!

  • Iv had no luck with this one either. I am using Cloudflare but i didnt think that it would cause a problem because Im still able to see my visitors i.p addresses in admin. Tried moving the plugin around, aswell, settings are showing in user tools for the plugin but no locations in river activity :(

  • @Cim:

    you wanted to know? ~>
    this vers does not work on my xampp
    i do not have patience to debug any more ;-oO

    *fix it !

     

  • @marc i am on cloudflare too, check out these docs

    https://support.cloudflare.com/forums/21318827-how-do-i-restore-original-visitor-ip-to-my-server-logs

    @dhrup this plugin doesn't work on local host cuz it gets your local IP (127.0.0.1)

  • Cim:
    *everything works on my localhost !
    but @xamp it gives blank null
    i want to see the 127.9.9.1 ( or more correctly  ::1
    i am not testing what everyone else is testing
    - the 'ok' case only
    i am looking at what happens in unusual cases...!
    so when the api returns something like
       'i don't know.. got no idea..'
    what indication will the admin have
    that something may have gone wrong
    which is exactly what the 127. ip# is !;-P
    fix it !!
    you did ask me to "test" !?

  • 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

100% GEEK

Stats

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

Other Projects

View Cim's plugins