The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

My favorite Jeff Eaton quotes

Submitted by nk on Wed, 2008-02-20 17:41

After someone unearthed the good old settings patch, I think it worths putting together a small collection of hilarity from Jeff Eaton. Another is a limerick in exchange for a patch review. And let me finish with an IRC quote: "You know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgets".

As it can be clearly seen, it's great fun to participate in the Drupal community.

Reiterating a good password trick

Submitted by nk on Wed, 2008-02-20 11:34

James said in his recent security article "Also, remembering several (hundreds!) of complicated, strong passwords can be daunting and frequently leads to poor password choices" -- but we learned right here on the Drupal planet from Moshe, there is a good solution to this: SuperGenPass.

A hidden gem of the new menu system

Submitted by nk on Fri, 2008-02-15 15:49

One of the neato tricks of the new menu system is menu_get_object. One of the most common usages would be, I presume showing a block on a certain node type: return ($node = menu_get_object()) && $node->type == 'certain';.

Share the love

Submitted by nk on Thu, 2008-02-14 06:12

Drupal 6 is out and it's Valentine's Day. I love the new features. I love each member of the awesome community that created this release. I love the chance that we can began to develop new features. In short, I love Drupal.

Path caching

Submitted by nk on Wed, 2008-02-13 15:50

Here is my D7 plan now is to solve path aliases, loosely based on what kkaefer did for CSS and JS for NP (which might be released). On every (or every N?) page load, dump the paths that are aliased to a statistics table for a given page -- this is speedy with INSERT DELAYED. On every M page load, pick up the top X percent of those and cache the bunch for the page. This way, the dynamic links in say, blocks won't be cached opposed to the current patch in the Drupal issue queue which caches on every page load effectively making the cache useless for any dynamic site.

Some database plans for Drupal 7

Submitted by nk on Wed, 2008-02-13 14:48

Larry Garfield (Crell) and I are currently working on a PDO database layer -- which does a lot more than merely introducing PDO to Drupal. In itself, adding PDO to Drupal is benefical because instead of our Drupal-specific placeholders we will be able to use a standardized ? placeholder. In addition, you can use :nid style placeholders and pass in an associated array of values.

Drupal global variables are now documented

Submitted by nk on Wed, 2008-02-13 04:22

Thanks to the efforts of GHOP students ezyang and boombatower Drupal has now its global variables documented.

Drupal query problems and a possible solution

Submitted by nk on Sun, 2008-02-10 05:24

One of the ugliest part of Drupal is db_rewrite_sql. It somewhat parses the query to find certains stopwords and adds join and where parts. It works mostly but its brittle and so there are always bugs. That was my first big patch -- it's not that great... One solution would be to define our dialect of SQL and do a complete, proper parsing. If this is the route we want to take, then Doctrine or part of it can be a solution. There are other parsers, too, there is even one in PEAR which seems to be abandoned. However, maintaing a lexer in PHP just sounds a terrible prospect.

Doctrine?

Submitted by nk on Fri, 2008-02-08 17:41

I had a talk with a Doctrine developer.

[chx] Are you familiar with db_rewrite_sql ?
[chx] It is used to add tables and conditions to existing queries to implement an access control
[jwage] Ok.. http://pastebin.com/m3ceac8b5
[chx] and more often than not people want to add fields, too
[chx] so
[jwage] ok, so if you want to add a field, use addSelect()
[chx] a) there should be an easy way to check which tables are already added
[chx] b) there should be an easy way to add additional tables
[jwage] ok, $query->exists()

What makes good core patches

Submitted by nk on Thu, 2008-02-07 18:21

Even wondered what makes me tick? I have added a Favorite music block on my blog. Good music is an important ingredient of my patches :)