Flagging Drupal Planet

flagger_sign.jpg A little over a year ago I blogged about moving to using a Drupal Planet tag to determine which posts about Drupal get posted on Drupal Planet. This is certainly better than having every Drupal related post appear in Drupal Planet. Why not send everything? Well there are a number of smaller posts that don't need to land in the hundreds of RSS inboxes around the globe but should still appear on my site.

However, the separate tag method has its drawbacks. For one thing it means my site now has, by default, two pages of Drupal posts. One contains all the posts and the other just those that went to Drupal Planet. Visitors to my site, however, don't need to see this distinction. In fact they are put off by it because it's a nonsensical differentiation for these visitors. Even somebody following a link from Drupal Planet is left with just a few posts and might not find some other smaller posts that could be helpful.

Given that the ability to post content and selectively send it to Drupal Planet is important and that I'd like to do so without hindering the usability of my website what's the solution. In true Drupal fashion there's a module for that. In this case it's the Flag module to be precise. Here's a quick look at this simple setup.

After installing and enabling the Flag module the next step is to create a Drupal Planet flag. Adding a flag starts with visiting Administration >> Site Building >> Flags >> Add (/admin/build/flags/add) on the site.

A couple of settings are key to making the Drupal Planet flag work well. First it should be a "Global" flag meaning that each node is either flagged or not and individual users can't set the flag differently on each node.

Make the Drupal Planet flag global

When setting up a flag it's necessary to choose what content types it applies to. With that done it works best in this case to set the flag as a checkbox on the node add/edit form.

Edit Drupal Planet flag | Joshua Brauer dot com

With the flag module configured the next step is to configure views to present the page and the feeds properly. The main Drupal page is a pretty easy page based on taxonomy. The only thing that is a little different is having two RSS feed views attached to the page view.

Drupal social publishing software | Joshua Brauer dot com

Attaching two feed displays to the same page is simply a matter of creating these two displays. The Drupal planet feed has an added relationship that depends on the flag. The critical part of this relationship is checking the box include only flagged content.

Edit view drupal_pages | Joshua Brauer dot com

Now if there was just a find more time for blogging module

Category: 

4 Comments

Why so complex?

I'm not sure why such a complex solution is required. Just use core's Taxonomy module and use an actual 'Drupal Planet' tag/term. Then use the taxonomy term's feed as your Drupal Planet source feed. It works pretty well for 99% of the sites out there.

What's the big deal?

I do this all the time. I don't have a blog position on drupal planet (my request has been ignored so far) but I do send postings to some other aggregator sites such as The Energy Collective and Social Media Today. For both I wanted to send only a selection of my postings and be free to post about other stuff on my site. It doesn't always make sense to send every posting from a blog to an aggregation site because the aggregation site may have a specific topic focus whereas the blog sending postings may have a different (though overlapping) topic focus.

Hence using taxonomy tags would be the Drupal way to do it.

For The Energy Collective and Social Media Today I defined a view for each, and told them to aggregate the feed generated by the view. One reason is both those aggregators require full feeds but I want my main feeds to show only teasers.

IIRC I don't generate a page from those views, only a feed. But if I did generate a page it would serve as a good topic hub. For example in my proposal to join planet drupal it was to send only my drupal-specific postings from the drupal-specific topic hub page that I already generate at http://davidherron.com/drupal-blogging

@David Herron

It hasn't been ignored. It's set to 'Needs work' and awaiting a response from you for a couple months now... http://drupal.org/node/611168

The problem with just a tag/term

I'll work on explaining the reason for this better. The problem with core and using a taxonomy term for this is the individual blog ends up with two different tags "drupal" and "drupal planet" which don't mean anything to 99% of the people reading the blog. It also means if someone wants to subscribe to all of a blog's Drupal posts they have to seek out where to subscribe to those posts because it's different than the page visitors land on when coming from Drupal Planet.

It's certainly not a solution for everyone. It is a solution for sites like mine where I like to post about Drupal things that aren't suitable for Drupal Planet but should appear in the Drupal context on the site.