I am building a very basic social networking site. It is not supposed to have any fancy features, but it should provide the following functionality:
a) themed profile (the standard list is just too ugly)
b) named relationships between users
I use these modules:
- profile (core)
I already managed to theme the profile thanks to the profile customization snippets. For this I modied garland's template.php file and create a user-profile.tpl.php file where I wrote the PHP code which generates the profile layout.
However, I am not sure if this is a good approach. For example, without specifically parsing and displaying the passed categories, added blocks are not displayed. This brings me to my first question: Is it possible to sort of encapsulate my profile layout, as a block/page/view or such, and make it selectable in the site building/site configuration menus?
The relationships module is more difficult for me. I would like to show a short list of contacts of the user on the profile page. The standard user_relationship-block shows me a list with usernames. But I want it to show the contents of the fields from the profile fields, i.e. first name and last name. I managed to do this with custom PHP code, but this is certainly not elegant. In particular, I would like to only show the first 10 contacts and then a "more" link which shows all contacts of the currently viewed user on a new page.
For this purpose, I feel I should be able to use the views module, but so far I only found out how to do this if a user views his own profile. So my second question is: Is there a way to use views to show a customized view of the user's relationships with content from the user profiles?
Finally, I would like to hear your opinion: Is it possible (and better) to use views and encapsulate the functionality described above, or do I have to manually code everything? Given the modularity of Drupal - which I still do not really understand after reading documentation and tutorials - this just feels unelegant. Maybe someone of you has experience with a basic setup like this.
Thank you very much in advance!