Enabling New Modules Via Update.php

UPDATE: There's a better way.

I work with 3 other developers, all of whom have their own local sandbox of our site. Since we're constantly adding new modules, I found a simple way to enable a new module via another module's .install file. That way, all we have to do is run update.php when we update our source tree.

Here's a simple example update function:


Six Conditions that Form Online Communities


Like a tornado, online communities only form under certain conditions. If you're looking to build an online community, understand that they are very difficult to build artificially. They seem to only emerge from natural conditions. Indeed, you can help them emerge, but you can't *create* them in my experience.

The Five Lessons of the Last Internet Bubble

Journalists warn us that "it feels like we're partying in 1999"... "Watch out for bubble 2.0.", they scream. They never elaborate on why, beyond a few token indicators like "crazy silicon valley parties", and stupid companies with stupid names, selling stupid products (if any products at all..) getting venture capitol from stupid VCs. The more educated of these whistleblowers points out that Microsoft gave facebook a ridiculous valuation. I'd give them a+ if I was grading their freshman rhetoric paper. Good support....  Yet, at same time, I have to ask, "You think of the people that built Vista, and IE6 as a canary in the mine of public sanity?"

The Stupid Filter

Anyone who works a lot online will agree that this project is a godsend.:

The concept behind the StupidFilter Project originated during a conversation between Gabriel Ortiz and Paul Starr. StupidFilter was conceived out of necessity. Too long have we suffered in silence under the tyranny of idiocy. In the beginning, the internet was a place where one could communicate intelligently with similarly erudite people. Then, Eternal September hit and we were lost in the noise. The advent of user-driven web content has compounded the matter yet further, straining our tolerance to the breaking point.

Drupal trick: Returning a themed menu tree with nothing more than the system path

I remember something a long time teacher said, "Nick, if you make a suit out of a gorrilla, the arms are too long." I forgot why that was relevent to the topic of theming menu trees.

Moving on, here's a nice little function I wrote to return a themed menu tree by path.

// will return all menu items under "administration".
print theme('menu_tree_by_path','admin');

// will return links to all node submission forms
print theme('menu_tree_by_path','node/add');

// return the correct menu array by path
function menu_get_mid_by_path($path) {
// oddly, menu_get_item accepts a path, but returns the parent id.

Quote of the Day: Annoying, Tragic, Apple Fans

In fact, the best way for fanboys to get me to replace my BlackBerry with an iPhone is probably to stop trying. Apple's products sell themselves better than an overbearing guy in a "Geek Pride" t-shirt ever will. -Paul Boutin, Valleywag

Quote of the Day: Hugh's Second Law

"All online social networks eventually turn into a swampy mush of spam."

-Hugh Macleod [click the link for a brilliant business plan]

7 jQuery Plugins That Made Our Lives Easier at ON Networks

We, the developers of ON Networks released version 1.1 of our website this evening (its built off of drupal of course... if it weren't, than I would go sharing it with the planet, would i?). The notable improvements are ajax comments, tooltips for episodes, and a global navigation.

The real quote of the day

The other quote of the day was chic, but this quote of the day is 100X times scarier (for americanski). "When I start seeing rap stars flashing euros instead of U.S. dollars, I know our economy is in trouble." -Mark Olson

Quote of the Day

"Once you accept that mushrooms and warp zones can be punishments rather than rewards, you start to question the nature of the game and to ponder strategic gambits you would never have considered while playing the original Super Mario Bros." -Chris Suellentrop, Slate, "Super Mario Bros: The lost levels"


Subscribe to Nick Lewis: The Blog RSS