Skip to main content

Drupal

Drupal module: Advanced Comment Trigger

Posted in

I have to admit that I've got it pretty good in the website spam department. The Mollom project, started by some of the same folks who started Drupal, uses content analysis to keep spam users from registering accounts on my site, leaving blog & forum comments, and using my site's contact form to spam me via email as well.

The only problem that I've really seen is the rise of spammers who will post blog comments containing text from the blog post itself, almost entirely unchanged, along with one or more links to their sites. Content-based analysis is of no use here, since the majority of the comment is actual text that I would want on my site -- after all, I blogged it!

Until now, I've been following all blog comments to my site via built-in RSS feeds, noticing spam comments some time after they were posted, and going back and deleting them. Drupal allows for comment moderation, but I want comments to go out there right away.

Drupal also allows for some advanced responses using triggers and actions. I could define a trigger such as "comment contains http://" and then assign it an action such as "unpublish comment". In fact, this is what fellow Cocoa developer and Drupal user David Sinclair of Dejal Systems does currently.

But this presents a problem in my use case, as i want to publish comments of my own sometimes containing hyperlinks. Also, I don't have a problem on my forums, just on the blog.

After some back and forth with David on Twitter, I decided to set out and build a small module to help with this. About twenty-four hours later, I give you: Advanced Comment Trigger.

After enabling the module, head to the trigger configuration in Drupal, then the "Advanced comment trigger" tab. Assign the new trigger to the "Unpublish comment" action, then follow the link to fine-tune the module settings. You can configure the trigger to occur on anywhere from one to five or more hyperlinks in the comment body, as well as exempt certain user roles (for example, site admins) or certain content types (for example, forum topics) from triggering the action.


trigger & action configuration


module configuration

I've also included the source to a Drupal view to create an RSS feed of moderated comments so that you can easily follow the comments to which the trigger applies. Checking this from time to time will allow you to easily publish any comments that accidentally get moderated, as well as get an idea of how well this module is working.

In the near future, I hope to add a few more available actions to the trigger such as emailing a site admin or post author or blocking an offending commenter.

Feedback is welcome. You can follow the project at the Drupal project page or on GitHub.

DrupalEasy podcast interview

I'm a bit late in linking to a podcast interview that I had the pleasure of being on recently.

DrupalEasy, an organization focused on training and consulting around making Drupal easier to use, runs a podcast interviewing various folks in the Drupal community. My interview was about my work on Drupal, my business in general, Cocoa desktop and iPhone work, my Drupalcon presentation, my career history (in brief), and a lot more.

I had a great time being interviewed by Ryan and I hope you'll take a listen!

A celebration of open source

In honor of this week's Open Source Bridge conference, as well as in recognition of the role that open source software has played in the development of our business, we're pleased to announce that today, June 16, 2009, Code Sorcery Workshop is offering any open source contributor a free license to Meerkat, our SSH tunnel management application. We are also giving away a $250 gift certificate to the legendary Powell's Books. Read on for the details.

If you'd like a free copy of Meerkat, just leave a comment on this post linking to an open source project that you've worked on with a brief mention of what you did. It could be coding, but doesn't have to be -- it could also be documentation, helping new users, anything that contributes to the common good of the project. We'll collect all the info and send each contributor a full, unrestricted license to Meerkat, a $19.95 USD value.

However, if you'd like to instead try for the $250 USD gift certificate to Powell's Books, a purchase of Meerkat will make you eligible for this drawing. Just register Meerkat today and you will automatically be entered for the drawing. The winner will be announced in a followup post.

In both cases, you must take action by midnight Pacific Daylight Time tonight to qualify.

Meerkat is an application that adds a lot of Mac-specific value to SSH, an open source tool that ships with every Mac (as OpenSSH). And Macs themselves are built on a ton of open source software such as Apache, Postfix, CUPS, Perl, PHP, Python, Ruby, sudo, unzip, zlib, and many others. You can read more about Apple's commitment to open source as well as open source releases pertaining to Mac OS X.

I began knowingly using open source software in the mid-90s and started contributing by releasing my own projects on freshmeat in late 1999. I've always looked for ways to contribute to open source projects when I can, whether it's by bug fixes, new feature patches, documentation, or just community help. Most recently, I've been involved with the Drupal content management system.

Open source is the lifeblood of the internet. So many of the tools that we take for granted everyday have been developed in this way, by generous folks giving their time for the greater good. I am extremely thankful for the many ways that open source has enabled me to teach myself a lot of what I know today about technology, to provide economical solutions for clients who need it, and to make software better and better by degrees.

So, here's to open source!

Drupal meets the desktop

I'm currently at the biannual Drupal worldwide conference, Drupalcon, in Washington, DC. I hope to write more later about the amazing people and innovative technologies that I'm seeing here this week, but for now I just wanted to post an entry for folks arriving here looking for information about the talk I gave yesterday: Beyond The Web: Drupal Meets The Desktop (And Mobile).

I will be posting more information later on the resources & projects mentioned in the talk, but for now, watch this page for that info as I'm able to post it. I covered a number of technologies that can connect Drupal websites to desktop and mobile applications, be they in Cocoa (for the Mac & iPhone) or any other language that you might want to integrate with a PHP-based Drupal site.

Hope to see you at Drupalcon!

Drupal around the world

Posted in

I wanted to take a moment to point out two items of mention related to Drupal from the past week.

First, congratulations to the United Nations World Food Programme, which recently relaunched their website in Drupal! Congratulations as well to both Phase2 Technology and Workshop friend Development Seed for the outstanding job on this beautiful and functional website.

United Nations World Food Programme screenshot
WFP's new Drupal-based website

I had the privilege of working with the WFP a few years ago in preparation for Walk the World 2005. The website for that project was one of the very first Drupal sites that I programmed on (having administered a few before that). I'm glad to see that Drupal has made inroads into the WFP's structure all the way to the top since then, allowing them to maintain this great new website and further their humanitarian efforts around the world.

The other bit of info is about Drupalcon this March in Washington, DC. Today, the final ticket was sold, and the attendee count will be 1,300 people! The tentative session list, based on submitted proposals, is now out. I hope to be involved in presenting two sessions, my own proposed Beyond The Web: Drupal Meets The Desktop (And Mobile), which is likely to become a panel presentation on the topic, and Miglius Alaburda's Introducing a new File Framework, which is likely to become a joint session on file handling in Drupal. I also hope to be releasing a new Drupal module in the next week or two in these areas, so stay tuned.

The amount of momentum around Drupal right now is pretty astounding!

Happy eighth birthday, Drupal!

Posted in

Today is the eighth birthday of Drupal, the PHP website platform that I'm most involved with. In Drupal creator Dries Buytaert's own words from the news release:

When I started work on Drupal as a graduate student, Drupal was just a little hobby project grown out of my own interest in the web. As you can tell from the original release notes, being the only programmer certainly had its charms. ;-)

Fast forward 8 years, and we're a global project with hundreds of thousands of users, thousands of active contributors and a healthy ecosystem. Along the way, I've always tried to listen to the community, and to trust my own instincts and moral compass. We built an amazing community together, and because of that, working on Drupal continues to be a labor of love. Even after eight years.

A big project can't always do what a small project can; there is more legacy and overhead, but nonetheless, I think what is important is that we stayed true to our initial values: innovation, collaboration and a healthy desire to keep the code as small and simple as possible.

I'm very much looking forward to where the next eight years takes Drupal and the web at large!

If you are interested in finding out more about Drupal, have a look at groups.drupal.org to see if there is a group near you or head to DC in March for Drupalcon. I just attended my first Portland Drupal meeting last night and hope to be more involved with the community here going forward.

Viva la Drupal!

Announcing the support forums!

forum icon

At last, I'm happy to announce the Code Sorcery Workshop support forums! These forums will gradually become the official support channel for our Mac products Meerkat and Pukka, as well as a place to discuss what's on your mind with regard to our website, potential future products, our services, or happenings in the Mac & Drupal communities.

The forums have been open for a week or two in unannounced form, but have quite expectedly not garnered much activity, so consider this the official "word". Feel free to go to it!

Feature Run-Down

We are using Drupal for the forum solution, which is what is used for the rest of the website as well. I'd like to take a moment to go over some of the features that this provides. In the near future, I also hope to make another post about the more technical details, such as which modules were used, what kind of custom solutions were implemented, and what administrative features are provided on the backend.

Main Page

The main page gives an at-a-glance view of the latest topics, much like any forum software. Posts are organized into containers, such as Mac OS X Products, and below that, forums addressing a particular product or group of topics, such as Pukka. When new topics are posted under a forum, they bubble up to the top.


Forums main page (click to enlarge)

Your Account

To participate in the forums, you must register for an account. With this account, you can maintain a unique identity across all of the posts. You can include as much or as little information as you like, currently including real name, photo or avatar, physical location, and website. This information is only available to other forum users -- only your username is available publicly.


Account page (click to enlarge)

In addition, you get a box in the right sidebar with easy access to My forum posts (posts created by you) and My forum votes (posts you've voted on).


User box

Search

Just like the blog archives and all of the pages on the site, forum topics are searchable. And these searches are able to be bookmarked, so you can easily check back frequently for updates related to a topic you are interested in.

Topic Voting

Aside from easy access to any forum topics that you may have created yourself, you can also vote on anyone else's topics using a zero- to five-star rating system. Perhaps the best use for this feature is that you can use this to flag topics that you are interested in periodically checking back on. Another use might be a tip that you really want others to see or a feature request that you'd like to weigh in on.

The popular topics get aggregated to a special page called top forum topics where they can be easily tracked. I'm hoping that this can be a useful way to chart the future direction of our applications, as well as to more easily resolve important issues affecting many customers.


Topic voting

Feeds, Feeds, Feeds

One of the strongest features of the forums is easy and plentiful RSS feeds. Currently, you can access feeds for:

  • All forum topic activity: codesorcery.net/forums/feed
  • Container activity: For example, all posts about Pukka. Just add /feed to the end of any container URL.
  • Topic activity: If you make a post, you subscribe to all comments on the post by clicking the link on the topic page or adding /feed to the URL.

Forum feeds (click to enlarge)

Conclusion

In conclusion, I'm happy to launch the forums and I hope that they will be of benefit to users of our products, Mac, iPhone, and Drupal enthusiasts, and folks interested in our services, for starters. Please, if you have any suggestions or feedback, consider using the General Discussion forum topic.

Enjoy the forums!

Drupalcon is coming to DC!

I'm happy to help announce that the next Drupalcon will be March 4-7, 2009, in Washington, DC! As a former member of the awesomely rocking Washington, DC Drupalers, it will be a real thrill to get back to the city as part of our biannual pilgrimage to the hub of all things Drupal.

Expect this to be the biggest Drupalcon ever -- the first 100 tickets sold out in ten minutes, but others are still available. I've attended Drupalcon Barcelona and Drupalcon Boston in the past, but I'm looking forward to this one especially as DC is where Code Sorcery Workshop got started. Plus, we'll have a new president and the whole town will be abuzz.

In addition, I'm proposing a session entitled Beyond The Web: Drupal Meets The Desktop (And Mobile). If you're interested in seeing this session, please head over to the Drupalcon DC site and vote for it. Here's the abstract:

We all know that Drupal is a robust self-contained system for running a social website, but what about when you want to hook it up with the desktop or mobile devices? This session will take a look at the capabilities built into Drupal core, as well as contributed modules, for combining Drupal with desktop and mobile clients. The presenter is a Mac & iPhone developer and the co-maintainer of the DAV API, File Server, Boost, and Trace modules, and inadvertently had code in Drupal core in 2001.

Whether you are a Drupal veteran, a web developer who's been meaning to try it out, or a newbie (technical or not) who's wondering what all the talk is about, Drupalcon is a great (and relatively affordable) way to tap into the vibrant Drupal community. There's no better place to be if you are, or want to be, involved with Drupal in any way.

Hope to see you there!

Getting around... table

I recently had the pleasure of participating in the excellent Mac Developer Roundtable podcast, where the featured topic was open source software. I've been involved in open source software myself for about ten years, so it was great to, first, be asked onto the show, but also, to share my experiences and knowledge -- not to mention, to "meet" and discuss software with some great fellow Mac developers!

This podcast was particularly satisfying because it brought together the two main halves of my business -- Cocoa and Mac development, where I tend to use open source software, and Drupal and web development, where I tend to contribute open source software.

So, have a listen to the show and if you'd like to check out my main open source efforts, I have an info page with more details.

Mollom anti-spam service is out of beta

Like many other people, I received an email this morning announcing that Mollom, a project of Drupal founder Dries Buytaert, is out of beta. I use Mollom on this website, as well as another personal one, to reduce and sometimes outright eliminate blog comment spam. In my configuration, Mollom works by using heuristics against blog comments and if they are considered spammy enough, the user is challenged to a simple CAPTCHA system to prove that they are not an automated spammer.

Mollom is a great system, since some studies (direct PDF link) have shown that as much as 75% of all attempted comments on blogs are spam!

I've been using Mollom for a few months and have been very happy with it. If you run a blog, even one that isn't in Drupal, I would encourage you to check it out. It's free for many uses, so you lose nothing by at least giving it a shot. There is a developer API and Mollom has already made downloadable integration available for Drupal, WordPress, and Joomla, as well as language-specific libraries.

Congratulations to Dries and the Mollom team! I look forward to the system only getting better as more and more folks start to use it.

Update: A couple folks asked if I'd mind posting my Mollom statistics graph, so you can find it here. There were many hundreds of spams stopped in the past month!

Syndicate content