A personal/community workspace, or another look at social networking

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
bonobo's picture

I've been thinking about some of the specifics of creating a personal workspace within Drupal -- although my main area of interest is education, these thoughts have applications outside education -- these are some rough notes, and I'm curious to see/hear reactions about what I'm missing/overlooking. These notes are not intended to be comprehensive, but a starting point in a conversation about some specific functionality

Some basic functionality--

  1. Let users define who can see their posts --

    To accomplish this, I was thinking about some integration between BuddyList (http://drupal.org/project/buddylist) and the ACL (http://drupal.org/project/acl) or NodeAccess (http://drupal.org/project/nodeaccess)module -- members of a user’s Buddylist can be used to form an access control list on a node by node basis-- I’m leaning toward the ACL module as I think a generalized API that can be used by other modules provides some advantages long term. However, was the ACL module designed to work primarily with roles, or with individual users?

  2. Profiles as Nodes and Field Level Access Control

    This is tricky, but could be pretty useful -- using Node Profile (http://drupal.org/project/nodeprofile), Buddylist integration with ACL, and field level access control as implied in this thread (http://drupal.org/node/91030), it appears to be possible to create profiles where certain fields could be off-limits to certain users. Thoughts?

  3. OG compatibility -- any module that sets node-level access control needs to play nice with, at minimum, Organic Groups. I suggest that “playing nice” means giving priority to OG access controls first, and user-defined node level access controls second.

    As an example: Sally is a member of Group A, and is Buddies with Jimmy and Ted. Jimmy is a member of Group A, and Ted is not. If Sally creates a post in Group A, and gives Jimmy and Ted access to it, Ted would *not* be able to see it because he is not in Group A.

  4. MySite (http://drupal.org/project/mysite) as a starting point for a customizable homepage -- this is the area I have thought least about -- what should a user’s home page look like? How much customization could be achieved using Node Profile with a profile node build from CCK?

Comments

Will do some drilling down

victorkane's picture

Intereseting...

Will do some "drilling down..."
...to see what comes up!

Victor Kane
http://awebfactory.com.ar

These are great ideas. I'm

techczech's picture

These are great ideas. I'm working on a nodeprofile setup for one of my sites and it works pretty well, particularly when integrated with pageroute and views fusion. It does get a bit confusing so I removed some of these options from the Create Content Menu.

The one idea I'd like to throw into the mix is multiple authors or true collaborative projects. One of the problems with nodes right now is the fact that each can only have one author / owner and that makes it difficult to show who all the people who are collaborating on them are.

Specifically, in the context of education I would like to be able to indicate that a research project was worked on by more than one person or that a class is taught by more than one person. Right now I have to indicate that manually in each person's profile and have no way to reflect that in a filter with views. So purely allowing that person access to edit that file will not be enough because they can't get any 'credit' for it.

I have been playing with MySite, too and it has great functionality but it would be nice to allow 'collaborative' MySites - which would basically boil down to a MySite-like or Panels-like interface for OG. Speaking of which, MySite could really benefit from integration with Panels.


Dominik Lukes
http://dominiklukes.net
@techczech

MySite features

agentrickard's picture

I have been playing with MySite, too and it has great functionality but it would be nice to allow 'collaborative' MySites - which would
basically boil down to a MySite-like or Panels-like interface for OG. Speaking of which, MySite could really benefit from integration with
Panels.

What would the Panels integration look like? What would the end-user benefit be? I have never used Panels. In looking at it, there doesn't seem to be an obvious integration. The only integration I see is that Panels, which currently reads from the blocks menu, might benefit by using the MySite approach of defining content according to rules specific to each content type.

You can, however, define new Layouts for use with MySite, which would enable multicolumn views.

In the architecture of MySite, there is a concept that the end-user might create their own page view with a Panels-style interface, but that is down the road in terms of development.

Same with OG integration. The issue for OG right now is that a MySite page is tied to a single $user->uid (because that is the dominant Drupal ownership metaphor). Is the major idea to let any or all members of a Group edit the group MySite page?

I love Panels - along with

techczech's picture

I love Panels - along with Views it really makes Drupal extremely powerful. I didn't really mean necessarily integration but panels-like functionality because MySite already does a lot of what Panels is for. All Panels adds is allow you to put bits of content in different areas of the page and choose a layout of the areas for your page. So for instance, you have your newsfeeds in a left column, Site updates in a top strip and a photo roll in your right column and some personal info in your footer. And I'm really excited about plans for Panels 2.0 that will support arguments which will basically allow for a generation of users' pages for outward facing portion of the site. MySite does the same for private pages and will be even more useful once it has more layout options - right now the two-column view is less useful then it might be because it inadvertently puts things at the top of your page simply because there's a column-break before them. A panels-like layout would allow for something like this:

----------
|         |
----------
|    |    |
|    |    |
|    |    |
----------
|         |
----------

I think it would be useful if multiple users could add feeds and/or flag items that should go on a MySite page but to be honest I don't have a very clear idea how this could be implemented. I guess, I'm thinking more about an improvement to the OG module that would allow for more flexibility of layout and perhaps add either Digg-like voting or del.icio.us like tagging of items. So on second, thought, maybe the multiuser MySite doesn't really make sense. The way I'm planning to use MySite is to have a page on the site for users to set as their home-page and I can leave all the other stuff to OG.

Sorry, some of these ideas are a little half-baked at the moment.


Dominik Lukes
http://dominiklukes.net
@techczech

I get it

agentrickard's picture

Half-baked isn't so bad....

Take a look at the Layout API for MySite. You can define your own Layout files quite easily, and allow for whatever type views you would like. The 'columns' layut is really there as a demo more than anything.

It is also not required that Layouts use print theme('page', $output); your layout could just print $output, to have a more MySpace style page.

For advanced layouts to really work, though, we'll have to write the drag-and-drop placement feature, which I consider less critical than testing core functionality.

I have been planning to allow site admins to define generic header/footer elements to MySite pages -- that might be a Panels-style implementation. Then user content could be presented within a 'custom' view that still had some sitewide elements to it, sort of like Blogger pages.

The OG implementation is trickier, since the concenpt of group-owned pages really insn't supported. I'd need to rewrite the mysite table to use id_type and id instead of uid. I just don't see that happening right now.

MySite, OG, and personalization

bonobo's picture

Hello, all,

Given that half-baked isn't all that bad, here are some more half-baked thoughts :)

I've been thinking about this as well, and I think the tools are pretty close to being there --

RE more flexible mysite customization (drag and drop, etc): another road through this would be exposing views for inclusion in mysite -- if a view was set up to take the argument of the current user's uid, this would allow content to be customized by user. The drag and drop ordering/placement would also be nice -- we have developed some code for the nodeorder module that might be of use here.

RE OG homepage customization -- I wonder if an easier way through this would be to allow groups to specify a specific node (aliased via a url) as the homepage. Then, members of the group could be given edit rights over the node -- given that views can be inserted into node, and that (I think) the ability to specify a custom homepage already exists in OG, this might be an easier way to get this done. This would also allow us to leverage the revisions system, which could be useful if a well-intentioned group member broke the layout :) In a sense, though, I see groups as different than individual users, and think that the different functions of groups and individuals might be better met using different functionality --

RE the layout API: for individual users, this could be the thing that really makes this problem easy to solve -- mysite could effectively become "panels for individuals"

In the next few weeks, I'm going to be setting up some test sites in an attempt to zero in on precisely what code needs to be written to address what needs.

Cheers,

Bill

Hmm

agentrickard's picture

A views.inc could, I think, easily allow the addition of defined Views into a user MySite page. I'll take a look at how this might work, but I think this is supported now (we just need to write the Views include).

I'd love to see the drag-and-drop. I have been hoping that someone else would take this on. Right now, in all the layouts, each content group is wrapped in a DIV, so controlling those DIVs would be easy using JavaScript. All that's needed is a function handler to allow multistep re-ordering (that is, promote/demote of more than one step at a time). Fairly trivial, given the current code.

A simple OG solution would be to allow the group owner to specify which MySite page should belong to the group. This shouldn't be too difficult. Not sure if it's best, though. What people really want is a group-editable MySite page, right?

As for layouts, I am hoping that people will run with the API and create some new ones. All a Layout does is define the structure for presenting the content groups. It is intentionally open to promote creative thinking. Take a look at defaut.php and change line 38 to:

print $output;

And you'll see how customizable the layouts might become.

Drupal 5

agentrickard's picture

I should note that new features are only being added to the Drupal 5 branch.

MySite 4.7.x is closed.

Views

agentrickard's picture

The short answer is that Views is supported by the current MySite structure. One would write a views.inc file to enable the inclusion of content groupings defined by the Views module. In the mysite_data table, you would store UID = $user->uid, TYPE = 'view', TYPE_ID = vid, and so on. A Views settings page could enable admins to select which Views could be added to a MySite page.

Looking at the View tables and module code, it does not, however, seem trivial to comprehend. Views is fabulous, but complex. Knowing how to build the appropraite query once you know the vid is the challenge. (Take a look at views_query.inc, for instance).

The views.inc file would also be the appropriate place to store the ViewsAPI hooks (http://drupal.org/node/42609).

Views.inc

agentrickard's picture

See http://drupal.org/node/100871 or http://drupal.org/files/issues/view.inc.txt

I have uploaded a quick take on a Views.inc file, and it highlights several issues.

'Views' are meant to be seen in a variety of ways (pages, tables, etc.) and lose much of their value by being taken out of context. MySite takes content out of context, by design.

The goal would be to allow the admin to configure which Views could be added to a MySite page, so perhaps only certain types of views should be eligible.

Another solution is to reconstruct the Views query to generate the list of nodes, and then format them using standard MySite methods.

I should also note that I declined a feature request to add Blocks to a MySite page, on the grounds that duplicating Block functions wasn't the purpose of this module. Perhaps the same applies to Views?

Thanks for the

techczech's picture

Thanks for the clarification, I'll investigate some more.


Dominik Lukes
http://dominiklukes.net
@techczech

if a view was set up to take

techczech's picture

if a view was set up to take the argument of the current user's uid, this would allow content to be customized by user.

That was what I was thinking, as well. It would be great feature for a personal site. Of course, the Panels module does that at the moment - which is what got me thinking about these similarities. (And it does it quite well even without drag&drop - even though that would be nice). As you said turning MySite into Panels for individual users would be great (although at the moment, I'm just grateful for both of them individually).

members of the group could be given edit rights over the node -- given that views can be inserted into node, and that (I think) the ability to specify a custom homepage already exists in OG,

the problem with this is the reverse - I need to be able to indicate ownership of a node (or membership in OG) to a views filter which is something simple access control doesn't do (unless I'm mistaken)


Dominik Lukes
http://dominiklukes.net
@techczech

I had similar half-baked ideas...

gusaus's picture

This is pretty similar to what I was asking agentrickard about a few weeks ago. It's great to see some discussions on this.

Gus Austin

RE: One of the problems with

bonobo's picture

RE:

One of the problems with nodes right now is the fact that each can only have one author / owner and that makes it difficult to show who all the people who are collaborating on them are.

ACL has the potential to solve the editing/access issues. I'm also thinking that with ACL/Buddylist integration, it should be possible to show a list of people with rights to the node as the node is output. While the code doesn't exist yet, what we're talking about isn't impossible -- as I mentioned in an earlier comment, I'm going to be getting a testbed live to help clarify the functionality that exists now, and where that functionality needs to be extended.