People From The Neighborhood v1.2

Release Notes

Developed in (and for) Elgg 1.7.6 environment.

I didn't test it properly, so I'll appreciate any comment about your experience using it.

Also, I want you to help me fill the ToDo list with good ideas ;-)

Features:

- Dashboard widget!

Fixes:

- It did suggest some befriended users.

ToDo:

- Profile Widget ?

- Hide person support

  • @emdagon  works as advertised - thanks for the great plugin!  

     

  • BTW - I'm using Elgg 1.7.4 and as far as I can tell, it works flawlessly.

  • @survtime thanks! your clarification is very useful!

    Cheers!

  • Hello
        very good plugin. I have a question, no way to remove the link to pulgin in your toolbar, and add the plugin "members"?

        Discula thanks

  • @nicolas sure! You can modify the view 'members/members_sort_menu' adding a tab that point to a page that load that view again (to give the impression that we still in "members") and below print my plugin's view like this:

    $people = people_from_the_neighborhood_get_people($user->guid, 3, 3);

    $body = elgg_view('people_from_the_neighborhood/pftn', array('people' => $people));

    Try not to be too much ambitious with the last two arguments for the "...get_people" function.

    You should take a look to start.php code for "inspiration" =)

    Cheers!

  • Hola ,disculpa hablas español no? me podrias explicar denuevo como hacerlo en español, porque el google traductor no traduce del todo bien. soy de argentina :D .disculpa y gracias

  • @nicolas Hola paisano! yo también soy argentino (aunque estoy viviendo en Chile ahora).  Te explico en argentino =) :

    Create un plugin que tenga la view 'members/members_sort_menu' (copia el archivo del plugin members) y agregale la tab con el título que quieras y que apunte a una página que controle tu plugin.  En la página carga la view de las tabs (para que de la impresión de seguir en "members") y abajo metele la view de mi plugin (mandandole lo que te devuelve la funcion ...get_people()) como explique en mi respuesta en inglés.

    Fijate en el código de mi plugin que es mas facil de lo que parece!

    Saludos!

  • i tried to use this plugin.

    but i want to find people base on location, school, hoppy to suggest add friends.

    any suggestions for me.

  • Some ideas for to do list:-

    I think two things we need must one is location wise and second is school wise , one more thing add friends button under every suggetion, in all suggestions page all need to we shown in grid view instead of list same like facebook with add friends and hide button under every image along with some info like name and location.

    One more thing in my mind I added the widget to riverdashboad and it display about 5-6 suggestions if no body add those then it display same suggestions everytime. Is there a way to show random suggestions and only one or 2 at a single time. if some one hide the person then it hide that person from suggestion list for specific period of time or untill other match found with same person.

    thanks

  • @lina & @ghumanz, I was thinking about add support for matching profile information, have some ideas of how to do it but I couldn't make the time these days.

    @ghumanz I didn't tested it properly, but in theory it shouldn't show the same suggestions all the time because the order of it is given by his/her activity and the activity of those common friends.  There are other activities in your network?

    Thanks a lot for all the suggestions! I'll keep in mind!

    Cheers!

  • I am using Friend Request Plugin . When someone request friendship with someone from PFTN then the person dont go away. 

    Help 

  • @Daljit I can't see your point, can you please try to explain it better?

    Thanks!

  • @emdagon I am using Friend Request Plugin . In Elgg core if you add anyone as friend you do not need approval of other person to be your friend. When I request someone's approval to be my friend or add someone as friend  (because friend request mode requires approval of other party before they appear on your friend list) that person still showing up in 'People you Might Know' List . what should I need to change to make pftn work with Friend request plugin.  

  • @Daljit Thanks! now I get it! I'll work on that asap!

    Thanks for your feedback!

  • Hola,gracias por la respuesta ,ya pude hacer lo que queria:).

  • I test this with friends request but no issue found. on elgg 1.7.5

  • Hi Emdagon,

    i've ported your plugin for Elgg version 1.6.1 (should also work from 1.5 to 1.6.3), as it was build for Elgg 1.7+

    Here it is : http://community.elgg.org/pg/plugins/release/690101/developer/Facyla/people-from-the-neighborhood-contacts-suggestions

    I've also added a french language file which you may want to include in your plugin :

    <?php
    $french = array(

        'pftn' => "Suggestions de contacts",
        'pftn:title' => "Contacts potentiels",

        'pftn:meet:new:people' => "Suggestions de contacts",

        'pftn:people:you:may:know' => "Personnes que vous connaissez peut-être",
        'pftn:widget:description' => "Ce widget vous suggère des contacts potentiels et des personnes que vous connaissez peut-être",
        'pftn:see:more' => "Plus de suggestions",
        'pftn:how:many' => "Combien de personnes ?",

        'pftn:all' => "Tous",
        'pftn:friends:only' => "Contacts de mes contacts",
        'pftn:groups:only' => "Membres des mêmes groupes",

        'pftn:is:friend:of' => "Contacts de %s",
        'pftn:mutual:friends' => "%s contacts en commun : %s",

        'pftn:is:member:of' => "Membre de %s",
        'pftn:shared:groups' => "%s groupes en commun : %s",

        'pftn:people:not:found' => "Aucune suggestion de contact",

    );

    add_translation('fr', $french);

  • @Facyla, thanks so much for your work!, I'll add the french translation and a link to your port in the next release.

    @nicolas, me alegro que te haya servido!

    @ghumanz, thanks for your feedback!

    Sorry to all of you that are waiting for improvements in this plugin, I'm looking forward to add your wonderful suggestions, but I'm realy busy theese days.

    Cheers!

  • NP but keep in mind elgg 1.8 is coming soon so update according to that , So it is easy to make it compatible with 1.8 other wise it will be use less after 1.8 . if you are going to use some scripts try to use the same which are coming with 1.8 .

    Thanks

  • Very nice plugin, however i fund this scratch of code and would like do display view into members index page (members/index.php)

    if (is_plugin_enabled('people_from_the_neighborhood')) {  $people = people_from_the_neighborhood_get_people($page_owner->guid, 3, 3);  $area1 .= '<div class="sidebarBox">' . elgg_view('people_from_the_neighborhood/pftn', array('people' => $people)) . '</div>';}

    Unfortunatelly doesn t work for me, can you test it?

    Also i noticed, that options doesn t work. i set show 2 suggestions, but i have looooong list...

     

  • Nice plugin! I also have the problem with the very long list in the dashboard widget which doesn't listen to the plugin settings. Als maybe add some pagination options particularly for the "all" view as with a big site the list can become very long. But nice work and surely an addition to any Elgg site!

  • with a bit of tweaking it works well on other custom river dashboards with the following code.

    <div class="sidebarBox">

     

        <div class="membersWrapper"><br />

        <h3><?php echo elgg_echo('riverdashboard:friend:suggestions') ?></h3>

            <?php

     

            $people = people_from_the_neighborhood_get_people(get_loggedin_userid(), 3, $groups);

     

    echo elgg_view('people_from_the_neighborhood/people', array('people' => $people)); ?>

     

        <div class="clearfloat"></div>

        <a href="<?php echo $vars['url']; ?>pg/pftn" class="viewall"><?php echo elgg_echo('viewall') ?></a>

        </div>

    </div>

    Stick that into a file called something like friend_suggest.php then call it from the index.php like other views and hey presto!

  • great plugin and works great.  one thing is there anyway to rotate the members in the widget?  it shows the same 3, or remove the members you dont want suggested?  just a suggestion.  thanks

  • @stuartsloan actually, the suggestions are ordered by their activity and the common friends activities (as I remember), so they will rotate (eventually).  I'll implement the "remove suggestion" feature as soon as I can, sadly (for the community) i'm pretty busy right now.

    Thanks for your kind words!

    Cheers!

     

  • its throwing an error.

    DatabaseException

    Column 'time_created' in order clause is ambiguous


    QUERY: SELECT DISTINCT e.*, r.* FROM elgg_entities e JOIN elgg_entity_relationships r on r.guid_two = e.guid WHERE (r.relationship = 'member' AND r.guid_one = '2') AND ((e.type = 'group')) AND (e.site_guid IN (1)) AND ( (1 = 1) and e.enabled='yes') ORDER BY time_created DESC LIMIT 0, 17

emdagon

+8 years since I have been here! xD

Stats

  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3279
  • Recommendations: 19

Other Projects

View emdagon's plugins