Using Suggested Friends Extended with Profile Manage

Hi Everyone,

Please can you experts give me some pointers to getting Suggested Friends Extended to work with Profile Manager?

I've added e.g Politics (radio buttons Left,Right) as a Profile Field in Profile Manager and that seems to be functioning fine in users Profiles.

However Suggested Friends Extended isn't finding suitable users. I'm just starting to learn my way 'round elgg... and I'm thinking maybe my Suggested Friends Extended isn't interrogating the MySql user data file (assuming the Profile Fields are getting into the data file...).

Clearly I have to make some changes to the appropriate files... and I think I'm up to this - but I would greatly value some suggestions as to what files I need to modify to get Suggested Friends Extended to find users with suitable Profiles!

Striver  

  • Firstly, which Elgg version are you using? The Suggested Friends Extended plugin has been released back in the days when Elgg 1.8 was the current version of Elgg. If you have no other more recent version of the plugin it might not fully work on Elgg 2.x without some code updates.

    As I see it in the code, the profile field names to be used for finding matching other users are hardcoded in the code of the Suggested Friends Extended plugin in several places starting in the plugin settings view and then also in the function where the DB queries are done to actually find suitable matches. If I'm not mistaken, it should be possible to use also profile fields added with the Profile Manager plugin when looking for suggestions. But you would have to customize the code of the Suggested Friends Extended plugin accordingly to also include the profile fields you have added in the search. To get it fully working I can only suggest to go over the whole code of the plugin. Firstly, to understand what the code even does, then maybe to make necessary changes for the plugin to work flawless on Elgg 2 and then to customize it for the profile fields you use.

    A possible other approach might be to look into the code of the Group Tools plugin. One feature of this plugin is to suggest groups for joining based on profile field information. Maybe you can extract the relevant code from this plugin to make a new plugin that adds a widget for suggesting other members for friending based on the same criteria instead of suggestion possible relevant groups. The code used might already take all profile fields into account without the need to customize it for the specific profile fields added with Profile Manager.

  • Thanks for taking the time to reply iionly.

    I'm using Elgg 2.3.10 so maybe Suggested Friends Extended is having problems!

    I really think that the only way I'm going to have success with my plan is to read my "Learning PHP, MySQL & Javascript"! In the past I've been quite successful in modifying code I don't fully understand, but feel now I have to go out of my depth to understand quite a complex sequence of interlinked files... and I can't do this without learning more.

    Basically I need to understand how these plugins work (the interaction of the files) then modify the relevant parts... but I need to have developed greater understanding of the languages.

    Anyway, thanks again,

    Striver

     

     

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking