So, I want to remove friend functionality...

Hi all,

I'm trying to set elgg 1.5 up in a sort of corporate intranet environment as a directory of personnel.  It's a small company, and everyone is everyone's friend, so I'd rather not have the friend functionality even be there.  Is it possible to remove it?  If so, how would I do it?  And how would I then go about tweaking everything so that certain lists (like to whom I can send a message) are populated with members instead of friends?  Hope to hear from you soon.

 

LJ

  • I don't know how to code it but everyone friends might be a quick fix for you?

  • Unfortunately, I tried that out, and it didn't work so well.  With everyonefriends, users still have the option of removing friends.  There has to be a simple way of changing 'friends' to 'members' somewhere, right?  If they're stored in the same kind of table, anyway...

  • Ok... So LJ.. are you saying you just don't care for the whole friend thing... right? (ie: you dont want people to be able to add others as friends or view each others friends). yeah?

  • Yes, essentially, but I also want 'logged-in users' to have the same access permissions that 'friends' normally would.  The everyone_friends plugin sort of works, but it'd be a messy workaround for what I'm trying to do, i.e. remove friends entirely.

  • well.. I am not sure if removing friends is not going to mess up some other portions of the site (and more importantly the tables in the db)..

    But here's a potential fix..

     

    Why not just take out all friends related links from profiles??

     

    example: take out 'add as friend' link from the profile menu.. You see, if you can't add anyone as a friend, then you will ultimately end up with people who dont have friends on that site..

     

    What do you reckon?

     

  • That was my initial thought, yeah.  Some portions of the site, though, are friends-only by deafault, e.g. in the 'compose message' window, the dropdown list is populated with all of a user's friends.  Do you know of any way I could switch something like that to a list of members relatively painlessly?

  • Well.. I am working on that particular mod at the moment.. but having said that, the 'compose Message' feature itself wont be affected by the fact the user has no friends... and the user may find the only way to send a message is to trigger it from the recipient's profile (ie: click send a message).. 

    In the meantime, if we can find a fix then it wont affect anything either as it will be a modification to the messages mod.

    Even if you use auto complete in your compose a message area, the auto complete wont kick in unless the user enters the first letter of a friend's name.. in effect, your user will get a normal input to put the recipient's name... but that's of course if they know it... but even if they insert the wrong name, the system will throw a message saying 'recipient is not found'.

    I very much doubt populating the recipients' input with all users will be a painless process.. it might take a little sweating to achieve, but I believe it can be achieved, and I think the fact that I designed my own autocomplete would be even more useful as it is fast and allows for letter repititions and so on.

    In short, the compose message function is not dead even if you kill the friends feature because you can switch that dropdown into a normal text input.

     

    -Carlos

  • Ahhh, I see.  Yes, autocomplete might be the way to go.  How did you manage that?

  • I figured out a way to do this with elgg 1.8, if anyone is interested.

    Go into engine/lib/users.php and edit lines 1228-1230 so that they say:

    $url = "";
    $text = '';
    $name = '';

  • That is not a good solution.  All you are doing there is hiding the link not the functionality, and you're hacking the core to do it.  Search around, there was a newer thread about this not long ago.