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';
.
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';
.
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.
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.
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.
Thanks to the efforts of GHOP students ezyang and boombatower Drupal has now its global variables documented.
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.
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()
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 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:
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.