Chris Hunter's Blog
Migrate from SMF Forum to Drupal
Recently I needed to do a migration from the Simple Machines Forum (SMF) to the Drupal Native Forum. I think most people by this point have heard of Drupal, and if you're reading this, chances are you're in a similar situation. If you want to migrate from SMF to Drupal, there is no direct route beyond writing your own Migration software from scratch in PHP. In this project I'm migrating from a Bridged Joomla and SMF site that has roughly 16,000 posts and about 1100 users.
Acquia: Best Practices for Scaling Drupal
This is a fantastic primer for scaling LAMP architecture.
Wysiyg API and Input_formats quick start
-- phpMyAdmin SQL Dump SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `chrihu3_port112209` -- -- -------------------------------------------------------- -- -- Table structure for table `filters` -- DROP TABLE IF EXISTS `filters`; CREATE TABLE IF NOT EXISTS `filters` ( `fid` int(11) NOT NULL auto_increment, `format` int(11) NOT NULL default '0', `module` varchar(64) NOT NULL default '', `delta` tinyint(4) NOT NULL default '0', `weight` tinyint(4) NOT NULL default '0', PRIMARY KEY (`
{syntaxhighlighter brush: css;fontsize: 100; first-line: 1; }-- phpMyAdmin SQL Dump SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `chrihu3_port112209` -- -- -------------------------------------------------------- -- -- Table structure for table `filters` -- DROP TABLE IF EXISTS `filters`; CREATE TABLE IF NOT EXISTS `filters` ( `fid` int(11) NOT NULL auto_increment, `format` int(11) NOT NULL default '0', `module` varchar(64) NOT NULL default '', `delta` tinyint(4) NOT NULL default '0', `weight` tinyint(4) NOT NULL default '0', PRIMARY KEY (`fid
Some imagacache presets
I use the following SQL to get some quick presets up and rolling. I know this can be cleaner, but it works for many smaller sites I do. Just dump this into an SQL statement in Phpmyadmin or from the command line.
Backing up w/ Drush
Drush, my favorite new tool, is proving to be quite useful. Drush saves you time by picking up your connection string from the sites settings.php folder that you're backing up, you no longer need to configure each backup script individually.
sample usage for this script would be:
bash backup.sh /full/path/to/drupal/site <optional> archive_prefix <optional> #of days to keep archives for
Powershell and LDAP
If you've ever needed to create an LDAP aware powershell script, well you're in luck. You can use any .Net namespace within a powershell script. In this article you will find various functions that I have written to work with an LDAP directory.
Gather all LDAP directory properties into a Hashtable as key/value pairsThe purpose of this function is to return a simple object of key/value pairs that you can reference in other parts of your application without connecting to the directory again.
Taxonomy data as term view header
If you would like to create a page view that takes a term id as an argument (like my technology, portfolio pages), You can use the following code in the header of the Views 2 Taxonomy Term view.