ted serbinski – entrepreneur & web architect
  • thoughts
  • about
  • contact



Popular content

  • Scheduler module: rewritten
  • My first 15 min of fame!
  • Preventing Drupal from Handling 404s for Performance
  • SimpleFeed 2.1 Release, New Maintainer, and a Look at Performance
  • Getting Textile to work with Digg This button (and other SCRIPT tags)
  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, a list of parts
  • Live again from London
  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, day 6
  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, day 1
  • Rebuilding a BMW intake: S52 to M50 intake manifold conversion, day 7
more

Recent comments

  • Unfortunately this method
    2 weeks 1 day ago
  • I’m using this method to sort
    7 weeks 21 min ago
  • I was interested in reading
    8 weeks 5 days ago
  • Ah yes this code is a bit out
    12 weeks 2 days ago
  • After using the original code
    12 weeks 2 days ago
more

Topic “drupal”

Automatically Extracting Tags from Nodes

Automatically tagging content is becoming easier with services like OpenCalais and Yahoo Terms Extractor, offering their APIs for free semantic analysis of content. There’s even a great Drupal module, Auto Tagging (with a great writeup on usage) that ties these services together and makes it even easier.

However, there is still one common issue with these services: they really need nicely written, rich, keyword dense articles to produce the most logical, semantic tags.

Try any of those services with user generated content and you’ll see a common tag each time around: FAIL.

We experimented with over 20,000 pieces of content on MothersClick and our results showed that these semantic services weren’t producing quality & relevant tags: rather, we were getting very little, if any relevant tags for our user generated content.

After a little more trial and error, I then noticed a simple pattern: more often than not, the title to a user’s post usually had the most applicable keywords to what their post was about, rather than the body of the post.

So how to extract just the keywords and make tags from the title of a node?

posted 20 Nov 2009
  • drupal
  • jquery
  • tags
  • 1 comment
  • Read more
  • 1 attachment

RightScale & Drupal - How to Get Internal IP Address

I’m working on a new project that has a Drupal site running in the cloud—specifically Amazon AWS with RightScale sitting on top to manage our servers and automated scaling scripts.

The advantage of RightScale is it allows us to manage our servers at a further abstracted layer than AWS itself — through the use of “RightScripts” we can script our way through the managing of low level resources.

Things started to get a bit hairy when our scripts needed to talk to Drupal, in particular, registering each new server as it comes online with our Drupal stack, thereby whitelisting its IP address as trustworthy.

posted 1 Aug 2009
  • drupal
  • rightscale
  • 2 comments
  • Read more

Drupal Behavior to Fix IE6 CSS Background Image Flickering

When the new myLifetime community launched we wanted to focus on performance, and one trick was to minimize HTTP requests by using the CSS sprites technique. For a great run down of this technique and examples of other major sites using this, check out this resource on Smashing Magazine.

Double checking this implementation with YSlow! everything was working great.

Well almost. Then we tried IE6. I hate IE6.

Then I discovered this excellent post detailing IE6 and its BackgroundImageCache usage.

After trying that JS trick, we noticed the page was significantly faster & smoother in IE6. With heavy CSS sprite usage this was a necessary fix. And with future sites in the works with this same technique, seems like a reoccurring fix.

To Drupal-ize & jQuery-ize this fix for resuability, I wrote this simple behavior below that works with Drupal 6. You can see in action on the myLifetime community.

  1. /**
  2.  * Fix flickering background images in IE.
  3.  */
  4. Drupal.behaviors.fixIEFlickr = function() {
  5.   if (jQuery.browser.msie) {
  6.     try {
  7.       document.execCommand('BackgroundImageCache', false, true);
  8.     } catch(err) {}
  9.   }
  10. };

May this code save you a few hours/days of head banging!

posted 11 May 2009
  • css
  • drupal
  • ie6
  • jquery
  • 5 comments

myLifetime Community Launches

Recently, the new myLifetime Community launched and it has been an overwhelming success. With members joining at such a fast rate, it’ll soon be surging past 100,000 registered members.

This site is separate from the main myLifetime site (which also is Drupal) and was built to be powered by the MothersClick community platform which Lifetime acquired last year. This new community website was built upon the new version of our community platform, which now has Drupal 6 at it’s core.

While we’ve been quietly working on this new platform, we’ve been brewing up and improving some great APIs in the Drupal community, all of which we consider to be necessities for building rich, online communities with Drupal. Without further ado, here’s a top sampling of where our efforts have been focused:

posted 28 Feb 2009
  • drupal
  • portfolio
  • Add new comment
  • Read more

Blog Redesign and Drupal "Spring Theme" Released

Drupal Spring Theme by Ted Serbinski

Almost exactly 1 year ago I redesigned this blog and today, I unveil yet another new design. This time, it’s running Drupal 6 and all that goodness. I’ve enhanced the contrast on the design quite a bit and really improved the readability on posts and comments, along with using the GeSHi code filter for much better display of code snippets. This theme was built on top of the Drupal Blueprint theme, which I maintain, and also made theming this site quick and simple.

posted 22 Feb 2009
  • drupal
  • 4 comments
  • Read more
  • 1 attachment

Creating an Alpha Pager with Views 2 and Drupal 6

UPDATE: Earl comments below how this is already built in. Two different ways to achieve a similar result, each with their own pros/cons.

Hats off to Earl Miles and the rest the views developers they have done a tremendous job with Views 2. While the interface is entirely different from that of Views 1, it is so much more intuitive that within a few minutes I had quickly forgotten my bewildered “oh no, I know nothing” look :)

From reading all of the docs and quietly watching development commits, I knew Views 2 was going to eliminate a lot of the Views 1 helper modules and open up a whole new world of awesomeness. While I haven’t seen many blog posts detailing just which functionality/modules have been replaced with Views 2, I wanted to kickstart things with my own discovery as I played around with Views 2 quite thoroughly this afternoon.

With Views 1, to build an alpha pager you would use the views alpha pager module in conjunction with your view. But what about Views 2?

posted 21 Aug 2008
  • drupal
  • 29 comments
  • Read more

Getting Drupal to Play Nice with Your CDN


Note: A better version of this patch is going into Drupal 7. View the issue/patch here.

Getting Drupal to play nice with your CDN can be a bit of a hassle. You have to make sure your assets (like JS, CSS, and image files) work not only on your webserver but when copied to the CDN, are served from there instead of your webserver. There is one Drupal module, the CDN module that attempts to make this a bit easier but right now, it’s not in production, and in my opinion, is a bit too complicated. There is a slightly easier way :)

posted 21 Aug 2008
  • drupal
  • 18 comments
  • Read more
  • 1 attachment

Connecting Drupal and Silverlight

My brother wrote an excellent article on how to connect Drupal and Silverlight. This is pretty indepth and shows what needs to be done on the Silverlight side to work with a simple XML-RPC Drupal module. Definitely worth checking out, great job bro!

posted 30 Jul 2008
  • drupal
  • silverlight
  • 1 comment

Preventing Drupal from Handling 404s for Performance

The .htaccess file included with Drupal tells Apache to send all 404 requests to Drupal to handle. While this is great in some cases, the performance degradation can have a huge impact on a site that has millions of users.

When Drupal processes a 404, it has to bootstrap Drupal, which includes Apache loading up the PHP process, gathering all of the Drupal PHP files, connecting to the database, and running some queries. This is quite expensive when Apache can be told to simply say “Page not found” without having to incur any of that overhead.

Now you might say your site doesn’t have any broken URLs as you haven’t changed any. Well that’s great, but as your site grows, it is going to be a target for spammers and hackers. They are going to start requesting all sorts of file to see if they can find an exploit. Instead of bootstrapping Drupal each time to tell them that DLL file doesn’t exist, it would be much better if Apache could just say that, to save resources for your real users.

So, what can you do? How can you stop Drupal from handling 404s but not break modules like imagecache?

posted 15 Jul 2008
  • code
  • drupal
  • 19 comments
  • Read more

Hot Swapping of Drupal Themes

At the ParentsClick Network we are soon to be rolling out many more sites on our platform. Because of our unique community API (which I will be detailing in a future post) we are running many sites (many not yet released) on the same install of Drupal, with the same database, and no shared tables. Yes, no typos there. More on just how that works in a later post.

One thing we have to do is change the theme based on the URL, along with a host of other things. ZivTech recently posted about changing themes, but for our setup, we need something more low level. Hence this technique.

posted 19 Jun 2008
  • code
  • drupal
  • ParentsClick
  • 8 comments
  • Read more
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • next ›
  • last »
Code examples and downloadable zip files of code are licensed under a Creative Commons License.
All other content, unless where noted, ©2010 Theodore Serbinski. All Rights Reserved.