CCK
Migrating LinksDB Module Data to CCK
Submitted by dale on March 25, 2009 - 2:50pm
The LinksDB module provides a nice "it just works" way for implementing a classic Links or Resources page. The standout feature is its hierarchical display of the URLs. Even after Views and CCK arrived, the hierarchical display was worth staying with the module. Sadly, with a site to upgrade and no Drupal 6 version of LinksDB in sight, it was time to convert.
This post is part 1 of 2 of how I migrated the CIPS Vancouver Security SIG Links Directory page from LinksDB to CCK/Views. It covers migrating LinksDB data into Drupal nodes. Creating a hierarchical display with Views is covered in part 2.
Creating a CCK node to replace the LinksDB URL entry is trivial. The two areas requiring work are migrating the data in the LinksDB database tables to standard Drupal data objects (CCK and Taxonomy), and creating a hierarchical listing of the URLs in Views.
Even if you're not interested in LinksDB, this post provides an example of programmatically importing data into Drupal using a command line script.
LinksDB also provides some user-facing tools for suggesting links, counting outgoing link clicks, and flagging dead links. Due to spam the suggestion tool was turned off; users have been savvy enough to use the contact form for suggesting links. The tool for flagging dead links didn't prove that useful and the tool for counting outgoing links was never used. These tools were therefore not re-created.
The CCK Node
The 4 fields defining a link entry are: name, URL, description, and category. Here's how I defined them in CCK.
Create CCK Node Types Programatically
Submitted by dale on July 23, 2007 - 11:09pmThis is very cool: Programatic CCK Now Possible! (http://groups.drupal.org/node/5272)
I just wanted to point out a very important change to content_copy.module that makes it much more fasible to create CCK field programatically as part of an install profile.
Kudos to joshk.
More Lullabot Article Goodness: Forums & CCK
Submitted by dale on March 12, 2007 - 11:53am
A shout-out to the folks at Lullabot for their latest articles:
- What is the Content Construction Kit? A View from the Database
- Private forums in Drupal: Forum Access vs. Taxonomy Access vs. Taxonomy Access Control Lite
Great additions to the list: www.lullabot.com/articles.
