Favorite Nodes Module

Sponsored Links

Favorite Nodes Module

While doing a site with lots of custom node types for a client, I decided to isolate some features into a generic and reusable module, and the favorite nodes module was born.

This is a relatively straight forward module. The admin chooses which node types to enable favorites for, and users with the correct permissions see a link saying "add to favorites" at the bottom of the node. When they click that link, the node is added to a list of their favorites.

When they click their "my account" link, they see a section titled favorites, and under it a section with a link for each node type. Clicking on the link will display all the nodes of that type that they have added to their favorites. Users can delete any node they added to the favorites.

Other users can see what favorite nodes you have added as well. 

The module is only available for Drupal 4.7. 

Update 2006-02-04: The module is now available for download at Drupal.org

Amusing parallel

I am just finishing up writing one that relies on views, and allows the administrator to have complete control over the bookmarks in terms of naming and usability.

There are 2-3 things I still need to do: I want to include a default bookmark, so that lower-level admins can install it and have immediate functionality, and provide default views. And of course I need to provide a readme that describes what can be done.

Look in CVS under views_bookmarks.

(The one thing it doesn't do -- yet -- is allow a user to view other people's bookmarks, but that can be added as a view argument. I'll have to add it).

This is step 1 in my 2,287,897 step plan to get as many things as possible based upon Views.

Different approach

I already looked at what is out there last week before I started this, and contacted Jeff for his favorites module (which is geared towards a block of admin defined links, not necessarily links).

The views approach is much more powerful, but I would imagine that it is heavier on the database (more joins?), and requires the admin to define things that can be bookmarked.

My approach is simpler: the admin defines the type(s) of nodes that can be bookmarked, and then things start to roll.

There is no harm in variety, as long as it is not duplication of efforts for the same things.
--
Khalid Baheyeldin

Drupal needs this

Drupal needs this module very badly, and I mean Drupal.org.

Right now commenting on a topic is the only way to 'bookmark' nodes that we want to follow.

Perhaps it could be installed when Drupal is upgraded?

I never thought of that

I developed this for a client, but found that instead of adding it to their modules, it is better to make it generic and usable for any node.

I will release it at some point to the community.

As for use on Drupal.org, it is up to Dries to decide.
--
Khalid Baheyeldin

Bookmarks Module

Hi Khalid,

Just to note. Bookmarks module is heading in a similar direction as your favorite nodes module. It will work like del.icio.us with the ability to tag and make notes on local page links and (optionally) external links as well. The big change is that in order to benefit from taxonomy and many of the other Drupal tricks, the bookmarks will become nodes. If the nodes part isn't a deal breaker, maybe we could figure out a way to combine favorite nodes and bookmarks module into one.

Backport to 4.6?

Nicely done!

A nice simple solution like this is excellent.

Any plans to backport this to 4.6?

No plans ...

There are no plans to do so.

However, if someone really wants it on 4.6, and are willing to sponsor the effort of such a backport, we can talk.

Click on the "contact" tab at the top right of the page.
--
Khalid Baheyeldin

Very good module thanks

Very good module thanks

Post new comment

  • All spam and irrelevant comments will be deleted.
  • Comments posted here will take some time to appear on the site. Do not post your comment again if you do not see it. Just be patient and it will be published.
  • Note that what you post here will be publicly available on the web and will be indexed in search engines.
  • We reserve the right to unpublish any comments without stating the reasons for that.
  • All postings are subject to our Terms of use
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options