Friend System

Hi All,

Was just wondering - as the friend system seems to be more a twitter style follow system than a facebook style mutual system, I was wondering a couple of things.

If you make something friends only view, is it only people you've added as friends or does it include people who added you?

Is there a block function? Users won't neccessarilly like having someone add them and may want to remove themselves.



  • We just had a fairly in depth discussion of the friends system (  You are not the only one that thinks the way it is implemented could be improved.

    I was looking for the block feature myself.  It is definitely useful/necesarry in a following/followed system.

  • Thanks, Daniel.  I've been looking at plugins and found a reciprocal one that seems to work on facebook type system, but it's still not really ideal for what I wanted to do.

  • I am also looking for something that is similar to what is of that on Facebook.

    In other words a friends system that works like a friend request system, in which if one person adds another member then it asks that member and if accepted they both are placed into each others friends list, etc.

    Any thoughts?


    ~ MIKE

  • Hi mike

    Seems to work for me though I've only tested it a little.

    One of the commentators on the other thread said the code isn't brilliant but it seems to work and does so like FB.


  • I hate to be dragging up a conversation from 168-176 days ago, but I was doing a search on the subject of users being able to block others.  This would include blocking them from seeing content or details that other users would be able to see.  I realize that one can create an access level and then drop content into that access level for only those in that created access level, but this is rather an advanced way to do things for most users.  What people like to be able to do is have an easy way to just block someone they don't like, from seeing content or from being able to write them messages.   I think this is critical for any social network or social networking software.  Has anyone developed a plugin for this?  ...I still actually have an active Elgg 0.8 site and even that site allowed users to be able to block others.  Why not in Elgg 1.5 (1.6.1, 1.7)?  ...The only people they should not be able to block, of course, are the admins.

  • I may be cross-posting here ;-)
    This most probably belongs to a "Enemy System" topic !

    if (isloggedin()) {
        if ($_SESSION['user']->getGUID() != $vars['entity']->getGUID()) {
            echo "<p class=\"user_menu_block_user\">"
            . "<a href=\"" // we want to zap this user fro all our content ;-)
            . "{$vars['url']}action/friends/userblock?usertoblock={$vars['entity']->getGUID()}\">"
            . elgg_echo("userblock:zaphim")
            . "</a></p>";
    . . .

    // and later
    $Block = get_metadata_byname($_SESSION['user']->getGUID(), 'BLOCKED');
    $Blocked = $Block->value; // bool
    if ($Blocked) // we zapped him ?
    header("Location: {$CONFIG->url}" ); // do not allow access -> fwd to site home page

  • It is interesting, but more context and cleaner code would be needed.  ...What is zaphim?

  • The working PlugIn "context and cleaner code" is sitting here on my XAMPP ;-)

    I do not follow the question "what is zaphim?" ;-(

  • elgg_echo("userblock:zaphim")
  • [Post removed for offensive content]