Friend request v2.1

Release Notes

This plugin is based on bosssumon Friend Request.

Please remove any previous version (< 2.0) of this plugin before uploading the current release.

Features

Let a member confirm your request to become a friend.

If a user already has you as a friend, then no request will be sent but the connection will be made immediately.

If a users has sent you a friend request and you also send a request, the friend connection will be made immediately.

Screenshots

Screenshot Friend Request

Version history

2.1:

  • added: CSS fix to hide friendsof on profile and user pulldown menu
  • added: friends menu no longer showing friendsof
  • fixed: collections links now showing
  • changed: menu title language handling
  • changed: CSS for topbar

2.0:

  • added: menu links in Friends and Messages
  • added: option to revoke a request
  • added: listing of sent requests
  • changed: listing of received requests (now works with language file)

1.5:

  • last release of bosssumon

To Do

  • personal message with friend request
  • admin options for showing/not showing menu options

Note:

This plugin has NOT been tested on Elgg 1.6, if someone could test it and share the results here. It would be appreciated.

========================================
ColdTrick IT Solutions
(c) 2009 ColdTrick IT Solutions

Like this plug-in? Consider making a donation.
image

  • @Jerome Bakker

    Sad but the mutual friendship happening dosen't work for me either. Do you have any idea? THANKS

  • solution for mutal friendhip.

    copy the following to engine/lib/relationships.php

    function isRegistering()
        {
            global $CONFIG;
            $p = parse_url($CONFIG->wwwroot);
            $base_url = $p['scheme'] . "://" . $p['host'];
            if ((isset($p['port'])) && ($p['port']))
            {
                $base_url .= ":" . $p['port'];
            }
            $uri = preg_replace('#\?.*|\#.*#', '', $_SERVER['REQUEST_URI']);
            $url = $base_url . $uri;
           
            return stripos($url, $CONFIG->wwwroot . 'action/register') === 0;
        }

    then replace the bellow code to the following one in friend_request/start.php

    if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friend') ) {
                //We don't want anything happening here... (no email/etc)
            }
            return true; //Shouldn't get here...
        }

    replace with this one

    if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friend') ) {
                //We don't want anything happening here... (no email/etc)

                if (! isRegistering())
                {
                    return false;
                }
            }
            return true; //Shouldn't get here...
        }

  • @Thuvalpakshi: I'm against any core modifications as this would break a plugin when you upgrade the Elgg core.

    I will look into the problem shrotly and post an updated version of friend request which will work without any core modifiations

  • @Jerome Bakker

    We are waiting for your upgraded version... Also i had a doubt is there any specific reason to disable Friends of link in your plugin?

  • @Thuvalpakshi

    Also i had a doubt is there any specific reason to disable Friends of link in your plugin?

    Since every user you are a friend with is also a 'friend of' this would create two identical lists. This seamed overkill so i removed it

  • Just tried it on 1.7.4 and added Fix River Privacy for 1.7.x

    Now it runs as close to a FB site as It can be :) Thanks Jerome!

     

  • Not working for me, on 1.7 getting a blank page when I press the [1] and the icon isn't showing the topbar.

    It's linking to http://newsocial.social-me.net/elgg/pg/friend_request

     

  • Fix for the mutual friendship upon registration with invitation:

    1.) Open start.php

    2.) Go to line 39. Locate this line:

    if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friend') ) {

    3.) Replace whole line with:

    if (($object instanceof ElggRelationship) && ($event == 'create') && ($object_type == 'friend') && (get_input("action") != 'register') ) {

    Issue should be fixed. What this does is that it lets the normal friend process flow when you are inside the register action, so the system itself takes care of mutual friendship.

Jerome Bakker

Developer @ ColdTrick IT Solutions

Stats

  • Category: Tools
  • License: GNU General Public License (GPL) version 2
  • Updated: 2016-11-18
  • Downloads: 35517
  • Recommendations: 100

Other Projects

View Jerome Bakker's plugins