From Mysite to Panels, Views, and Flag...

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

Our university has been using Mysite for a while in a development instance of Drupal that we were hoping to roll out once we upgraded to Drupal 6. However, we had made some significant changes to the way MySite worked: we removed a lot of the pages features, limited people to a single layout and style, added on a feature to restrict applications and droplets to specific roles, and built a public/private interface for our users. Almost all of our applications were simple objects/iframes of an external application framework we developed that talked to Drupal - a simplified PHP version of the OpenSocial framework.

Because our needs deviated from the projected future of Mysite, we decided to try and provide the baseline functionality we needed to start an upgrade using contributed modules and a small amount of glue code. Below is an outline of how we did it. A quick note: we are calling our Mysite features the 'Dashboard' here, and we refer to our Droplets and iFramed content as 'Applications' for our users).

Applications are nodes

We don't really have views or blocks as applications, all of our apps are external objects or iframes. Because of this, we built up a content type using CCK that had basic fields like the description of the application and a little icon (a la Mysite Icon), but also included the application's URL, some internal security layer stuff, and the object attributes (width, height, scrolling). We area also using Content Access to limit role's access to specific applications.

The nice thing about having applications as nodes is that we can use vanilla views to display them, sort them, and categorize them. We are getting on to 30 apps, and growing, so these will need to be able to leverage things like taxonomy in the future.

For building our objects/iFrames, we just outlined that display information in the Contemplate module (so the teaser display is more the information for users who are choosing an application, while the actual full-node display is what the user would see once it's added to their Dashboard.)

Flagging = Adding an Application

To indicate if a user has added the application to their dashboard, we just used the Flag module. We setup a seperate flag type just for the content type of our applications, and that was it. Our dashboard is a panels page with one side holding a custom mix of views and static content, but the right-side being a customizable column of applications. The right side has a view of the user's flagged application nodes in a themed list.

Moving Things Around and Storing Data

A lot of our applications need to store configuration data, so we built a small table that just stored the uid, nid of the application, weight, and serialized data. Because we are very concerned about accessible interfaces in the California State University system, we built both a drag-and-drop sort using jQuery UI, and 'move up/move down' images for the blind to move their applications around.

The moving is done by firing a simple ajax request to a custom module that then updates the weight of the application on ui.sort, or on clicking the up/down arrows. We then built a small views sort so that the view on the user's dashboard was sorted by this weight.

Just Some Ideas

Mysite is very cool, but it almost has too much for our users in terms of the interface, and not enough for our desire to limit control to certain apps. Instead of trying to keep up with MySite and continue to hack it down to our needs, we hope that depending on the good-ole-fashioned Views/Panels modules we'll be able to keep updated.

Contributed Module?

I'll probably be cleaning up the module we used to do all this so that others can use it. Right now it's just a custom module that depends on certain theme and view elements specific to our site, but I could look into moving these out to create the views programatically later.

Comments

code / module

niles@drupal.org's picture

I'd love to take a look at your code! I'm working on just such an implementation and need to get a sense as to how much "glue" it will take to get something like this running.

Have you run into any sort of upgrade issues?

What version of panels are you using?

thanks!

FYI

michelle's picture

To anyone who reads this, MySite's position in D6 is being taken up by Dashboard

Michelle


See my Drupal articles and tutorials or come check out the Coulee Region

FYI 2

noisetteprod's picture

For D6 you can look : http://drupal.org/project/homebox

MySite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: