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

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 :)

Postgresql quick start

Submitted by nk on Sun, 2008-02-03 21:15

Postgresql is user friendly in the old fashioned way: it's just picky about it's friends. After getting postgresql up and running on my laptop, I can't say I love it more than before -- let's say, even less. Let me remind you that after installing mysql, you are up and running immediately, and if you use mysql for localhost only, having a single, passwordless root works fine.

But postgresql... first you change your Unix user to postgres, enter psql and run these:

Let's have some fun

Submitted by nk on Sat, 2008-01-26 12:21

Without a doubt, core hacking is fun but there are other ways of fun, too. I suggested playing laser tag in Boston during the DrupalCon. If you are in, please comment in the forum topic.