I have a friend/client that is using a customized version of Diaspora to host a community and allow them to engage with each other. We have made some changes, in order to better serve our community. I'm not a Ruby developer, myself. Some of this stuff may be obvious to those of us who are. However, for the rest of us, I put together this little guide to demonstrate how to do these things on your own.
Adding/subtracting fields from profiles.
We wanted to add the fields: "company," "twitter ID," and "company URL." I found you can do so by following these steps
STEP 1: Add columns to profiles table in MySQL.
I'm going to assume that whomever's reading this doesn't know crap about mysql either (well, you have to be able to login, and get to a mysql prompt). Give your new field an alias. I went with company_name, twitter_url, and company_url. Once you're logged in to mysql, you're going to want to point to the DB (either diaspora_development, or diaspora_production). The command is "use diaspora_development".
Then get information about the profiles table, using the command "DESCRIBE profiles" (this is so you can see what's going on with the table in general, not a necessary step).
You can then add your columns, by using the command
"ALTER TABLE `profiles` ADD `new_column` VARCHAR( 255 ) NOT NULL;"
PLEASE NOTE: I am 100% sure there is a way to do this by altering the schema.rb file, however, I wasn't able to make that happen by just editing and re-migrating so this was easier for me. If you could instruct me on how to do that I will replace this section.
STEP 2: Open up apps/models/profile.rb starting on line 17 you will see some XML Attributes being declared with like so "xml_attr :property" add yours to the bottom like so:
Add them yet again on line 42:
///NOTE REVIEWER: DON'T KNOW IF THIS IS NECC. OR WHAT IT DOES, THOUGHTS?
On line 82 of the same file, you will see a function called from_omniauth_hash, add your new fields to the columns like so:
Now you need to go into the language files and add your fields. Open config/locales/diaspora/en.yml (or, whatever language version you are using) and starting at line 616 you will see the aliases for the different profile fields, add yours like so:
STEP 5: Finally, you need to update your view. Go to app/views/profiles/_edit.haml add the new h4 with your fields in it. Now you are done!