ericmarden's blog

Moving the comment form without hacking core

4.5
Average: 4.5 (4 votes)

One of the most frustrating things about Drupal's current architecture is that comments, and the form to post them, are attached to nodes and don't easily allow you to move them around in your TPL files. There really should be an easier way to just place them anywhere you'd like. Most times this doesn't get in your way, until you want to do some fancy layouts where your content is split into multiple columns on the page.

Relate all nodes from one taxonomy to another with MySQL

5
Average: 5 (2 votes)

When using taxonomy to group nodes on your Drupal site, you find a need to apply another taxonomy term to all of those nodes (possibly from a different vocabulary) there is nothing that is going to be shorter and sweeter than some quick SQL-fu.

Rebuild your node_comment_statistics table

5
Average: 5 (1 vote)

If you're like me, most of your projects are redesigns of existing sites. And if the site is already on some kind of CMS, this means importing content from the old system into Drupal, and to make it easy you'll do it with MySQL directly.

There are pros and cons about this approach, which I am learning, and one of the cons is that content created by the database may not always get plugged into all of Drupal's various tables. Sure, you got the text into node, node_revisions, can your CCK tables, but there is more than meets the eye.

US States list for CCK select boxes

4.333335
Average: 4.3 (3 votes)

When defining Content Types in Drupal with the Content Construction Kit you are able to add select boxes to them with CCK. It takes its
key/value pairs in this format: Key|Value. One of the most common tasks for this is to create a drop down list of US States. So to save folks some time, I have compiled a list for you to paste right into your own projects. The attached text file will give you US States in the expected format.

Hopefully this will save others a bit of typing when you need such a list for your own Drupal projects. Enjoy!

Syndicate content