New module idea... User Favorites

I've spent a couple hours today beginning to rebuild a website that I intended to offer up as a community activity tracking tool for the open source BASIC derivative language called FreeBASIC called the FB Tracker. Notes about the language itself (which rocks) aside, the site would be a fairly basic matter of allowing users to post and track projects, tutorials, snippets, sites, etc. through a single source. Most of this can be accomplished through some skillful use of Views + CCK, but there are a few community features I'll most likely be writing a module to implement. I have dubbed the module User Favorites and will post a few of my brainstorm ideas below...

I searched for a module similar to what I'm looking for and only found the Favorites module which is a far cry from what I need. The User Favorites module will actually allow users on a site to add content to a favorites list. It makes sense to give users the option of creating multiple favorites lists and will be fairly trivial to implement. Any of these lists may be set to be private or public lists. Users on large community or directory websites will be able to tag and track content through the site itself using their in site favorites list as well as provide feedback to the community regarding the value of content on the site.

Users will be able to browse the public favorites lists kept by other users as well as see who else on the site has favorited a specific piece of content. Favorites lists will be broken down by content type and sorted alphabetically, with users having the option to star a specific piece of content to make it sticky at the top of a list. Integration with Views means site developers will easily be able to create and sort lists of nodes ranked by how many times they've been favorited and/or starred. (Perhaps for the purposes of ranking, favorited content should count as 1 point while starred content should count as 3. Or rather... I can simply make that an administrative decision.) Integration with Userpoints means you can give users some love for providing feedback to other members of the community.

I'm happy to consider any further integrations with this module and am quite excited at the prospect of it being a first of its kind. However, if someone else knows of a module that may do something similar, please post it up here so I don't needlessly duplicate someone else's effort.

EDIT: A Tuesday morning, it's no longer past midnight, idea struck me on the way to work... I forgot to mention the idea of favoriting other users. This would allow you to track content posted by others and allow a ranking system for users similar to the one I mentioned above for content. It could be fun to use these statistics to display user relationships, user favorites compatibility (how much of your favorites match?), and other things like that. Maybe I can get Balazs to draw me up a user relationship graphic with his Drawing API. Lol

EDIT 2: Several folks have been posting up some very helpful pointers to modules that implement different parts of this idea. Let's just say... I'm never going to start a new module without doing a post like this first. This has been an invaluable learning experience, and hopefully I'll find some time to review the various modules and build on someone else's foundation.

Topics: 

Comments

Nice module idea.
I have a site myself where users can add content to their 'favorites'. I developed this with the Views Bookmarks module (http://drupal.org/node/49075). However this only allows for a pretty basic implementation of the 'favorites' concept. Your suggested module seems to add a lot more. Good luck with it Smile

closest relative i know is views_bookmarks.

Thanks for the heads up guys, I'll check 'em out. I was also notified about favorite_nodes, and I'm going to have a look through its code. It seems to offer a few of the basics at least.

You might also look into the user level tagging modules. Multiple favorite lists = private/public tagging per user basically. Why not allow users to tag stuff themselfs and automate some tagging with UI enhancements? There are a few user level tagging solutions: http://hojtsy.hu/node/10

You rock, Gábor. I'll read the post and check out the modules when I get a chance. At the moment, I'm trying to get the translation templates straightened out for the next Ubercart release per our conversation at Drupalcon. Smile

There is also the favorite nodes module. It can be extended to provide views, and then it covers everything. If you install the bio module and make it the profile node, then it can do users as well.

Another module you might look at is the Social Network Analysis module and the content recommendations engine. They might help you implement a few of your ideas.

I really like the idea though. I'm working on building a drupal collaboration site for a class at my university:
http://isyscore.byu.edu/drupal

Your module would be great for helping the students keep track of blog posts and other information on the site and elsewhere that's useful to their studies and research.

This is a job for Node queue module!

Nodequeue 2 has the concept of subqueues, and one of the subqueues I *really* wanted to do is exactly what you want to do. The existing implementation of smartqueues is for taxonomy; whenever they are needed, subqueues are automatically created for taxonomy terms, and links appear to add queues to the right subqueue based on what terms.

smartqueue_user would create subqueues based upon what user it is. Views integration already exists for nodequeues and it would take very little to create a view or two to demonstrate it; it would take a little extra code to let users create their own, labelled subqueues (i.e, whatever favorites lists I want), and the parent queue already has node type restrictions on what can be favorited, and role restrictions on who can do the favoriting.

It's very easy to create subqueues; the API is straightforward and reasonably documented (within the code).

The only problem, I see, with doing this within nodequeue is that it could actually become a little bit difficult to find out that this contains the functionality people want.

In any case, a LOT of the work you've done already exists within nodequeue. If you're going to do this, I beg you, make it smartqueue_user.module! I'll happily give advice and package it directly with nodequeue (or it can be packaged separately and just require nodequeue; that might actually solve the findability problem).

Very interesting... I'll definitely check out the node queue module. I actually heard about this one at Drupalcon in Moshe/Barry's presentation of The Observer and forgot about it till now. It sounds like it would save me quite a bit of time, and I'm certainly game for doing the extra coding necessary to get my other features going. (I was thinking I'd have to do it from scratch anyways. ;))

Keeping it as a separate module dependent on node queue sounds like the best idea to me, that way I can automate some tasks, drop other features onto user profiles and such, and provide some default Views. As you say, too, it should help with "findability."

Thanks for the heads up. Cool