Development Question

Paul Leo Posted in Beginning Developers 3 months ago

If using OSSN:
OSSN version: newest version
Website URL (optional):

Can someone point me in the direction of how database additions are made? I'm looking to add develop some features that will require new tables to store information.

My other question, maybe this exists already but an interest selection upon sign up. So someone signs up and can select interests of theirs and then the wall/timeline can be filtered to only show others with the same interests.

If it doesn't exist I'm going to create it so I would need to store the interests of that new user in the database. I would also need to add some admin controls where the admin can add default interests ( these will be shown to the new user upon signup or selected in the users options if they didn't select any interests during signup).

Does this exist already? Would I be able to create this as a component or would something like this require me to change the core OSSN code?

Thanks for any input you might have before I start this project.

Replies
us Paul Leo Replied 3 months ago

@Arsalan Shah I see with custom fields it says it will show on About Me page but I don't see how to access the about me page. Am I missing something?

us Paul Leo Replied 3 months ago

Ahhh, I found it under user manager user fields.

us Paul Leo Replied 3 months ago

I would probably need a multiselection list box so multiple interests could be selected. I do have premium however I don't see it listed in the components.

us Paul Leo Replied 3 months ago

Is this included in the premium version?

Indonesian Arsalan Shah Replied 3 months ago

You don't need to alter table to add new fields to user

$user = ossn_loggedin_user()  or $user = ossn_user_by_guid(integer); //integer =1, 2, 3 etc
$user->data->interests = 'abc, def,  ghi';
$user->save();

$user = ossn_user_by_guid(integer);
echo $user->interests;

https://www.opensource-socialnetwork.org/component/view/959/signup-fields