comments

Showcase a User's Comments with Views and Menu Tabs

Published August 27, 2009

By now, you should know and love the Tracker module that comes with core. It has its strengths, but many weaknesses. For one, you can't separate out posts from comments, or sort the list in interesting ways. Views can help you make exactly the list you want, and place it in a tab on the user's profile exactly like the "Track" tab.

For this example, you'll be adding a list of comments. Creating the view is simple enough:

  1. Clone the default view comments_recent, and call it comments_by_user
  2. On the Page display, add a Relationship for Comment:User

Capture (the power of) the Flag (module)

Published March 16, 2009

The Flag module is one of those modules that in its previous incarnation (as the Views Bookmarks module ) was a bit inflexible and often (at least in my cases) required some manual tweaking of the code to get it to do exactly what I wanted (no offense to the original authors, I actually used it a surprising number of times). The updated and renamed module is a breath of fresh air - it is an ease to install and configure for any number of use cases - in this article, I'll demonstrate how you can set up a list of the best comments on your site. The Flag module is extremely useful mainly due to its excellent integration with other Drupal modules - specifically Views and Actions (part of Drupal 6 core). It's also chock-full of AJAX-y goodness (flagging items doesn't require a full page refresh) and a plethora of configuration options.

Moving the comment form without hacking core

Published September 30, 2008

One of the most frustrating things about Drupal's current architecture is that comments, and the form to post them, are attached to nodes and don't easily allow you to move them around in your TPL files. There really should be an easier way to just place them anywhere you'd like. Most times this doesn't get in your way, until you want to do some fancy layouts where your content is split into multiple columns on the page.

Rebuild your node_comment_statistics table

Published September 29, 2008

If you're like me, most of your projects are redesigns of existing sites. And if the site is already on some kind of CMS, this means importing content from the old system into Drupal, and to make it easy you'll do it with MySQL directly. There are pros and cons about this approach, which I am learning, and one of the cons is that content created by the database may not always get plugged into all of Drupal's various tables. Sure, you got the text into node, node_revisions, can your CCK tables, but there is more than meets the eye.