Programming

Moving Tabs to the Main Menu

tags:

Developers are all familiar with the default behavior of the drupal menu systems "local tasks" (aka tabs). These appear throughout most Drupal sites, primarily in the administration area, but also on other pages like the user profile.

Generally, developers are pretty good about creating logical local tasks, meaning only those menu items which logically live under another menu item (like view, edit, revisions, workflow, etc... live under the node/% menu item).

Gotcha when editing nodes programatically

tags:

Now this one is pretty annoying to.

I'm writing a module that imports data into nodes. Sometimes this data has already been imported, and I only want to update existing rows with changes, if any.

After pulling in a row of data from the import file, I see if it already exists as a node in my database. If it does, I grab the node ID and load the existing node:

$node = node_load($existing_nid);

I then do some magical stuff and save the node using the standard:

Get Jing

tags:

I just found this very cool screencast creation tool that is free. It's called Jing. Installation is quick and pretty easy (though it does require the .NET 3.0 libraries for the Windows version).

Here's a sample screencast, a quick demo of cscope as a development tool.

 

 

Eating one's own dogfood -vs- dining out

tags:

The importance of project management tools is almost never fully appreciated. I am shocked at how common it is for a group of developers to go working without version control, ticket tracking, development documentation and so on. The very first thing I do when working with a new client is to make sure that they get these tools in place if they haven't already.

Those who are used to working without a complete set of project management tools never fail to appreciate the benefits of them once they are introduced. I consider it next to impossible for a team to work together without managing code and tasks in an efficient and highly organized way.[img_assist|nid=155|title=|desc=|link=none|align=right|width=250|height=156]

Hopefully you do not need to be sold on this idea and are using CVS or SVN to manage your project already. You likely have some sort of ticket system. It is a little less likely that you have both of these components integrated with each other.

When it comes to choosing a solution for project management software, a die-hard Drupal user has a dilemna. On one hand, Drupal seems as though it should be the perfect solution. It's fully customizable, has lots of nifty project management related modules and, most importantly, it's Drupal! Why would you not use it? "Eating your own dogfood" is the way to go, right? Meh...

Google Code Search

tags:


I'm not sure when this came out, but Google now has source code search. These guys never stop amazing me.

So what you need to do now is create a new bookmark in firefox. Point it to: http://www.google.com/codesearch?hl=en&q=+lang:php+%s

Give it a name and in the keyword field, put something like 'phpcode'. Save it.

Now in your address bar, type 'phpcode array_merge' and return.

Syndicate content