---
title: Moving forum posts to stories in Drupal
url: https://sammy.hk/moving-forum-posts-to-stories-in-drupal/
author: Sammy Fung
published: 2008-07-18T17:12:50+08:00
modified: 2018-03-22T00:50:36+08:00
description: "I feels Slashdot-like stories in Drupal are very similiar as posts in oldie discussion board (aka forum). The only big difference between story and forum are di…"
categories: ["科技"]
source: https://sammy.hk
---
I feels Slashdot-like stories in Drupal are very similiar as posts in oldie discussion board (aka forum). The only big difference between story and forum are discussion grouping, old-style forum are grouped topics into hierarchy style, but story with taxonomy provides free tagging.

So I decided to move forum posts in [opensource.hk](http://www.opensource.hk) to stories, and disabled the forum function 2 weeks ago.

**Forum and Taxonomy**

Taxonomy module is required for forum operation in Drupal. So firstly, we look at how taxonomy module works in Drupal.

Table \*\_term\_data got few fields. tid, vid and name are important fields which represents each terms in taxonomy, vocabulary type (forum/…) id, and name of terms.

Table \*\_term\_hierarchy got 2 fields – tid and parent, which are term id and parent term id for a many-to-one hierarchy relationship of taxonomy terms and their parent terms.

Table \*\_term\_node got 2 fields – nid and tid, which are node id and term id for many-to-many relationship of nodes and taxonomy terms.

So, I should move forum related taxonomy terms to normal one, or simply remove them. But I think old forum name were not good tags for stories, number of posts in forum are few, so I removed them in database and added much suitable tags to them myself.

**Changing node types**

I run the following SQL to change the node type of all forum contents, and promote them to front page,

update node set type=’story’ and promote=1 where type=’forum’

### 相關文章：

1. [再次試用 WordPress](https://sammy.hk/another-wordpress-trial/ "再次試用 WordPress")
2. [Mandrake Linux 改名為 Mandriva Linux](https://sammy.hk/mandrake-linux-%e6%94%b9%e5%90%8d%e7%82%ba-mandriva-linux/ "Mandrake Linux 改名為 Mandriva Linux")
3. [Mandrakesoft 收購 Conectiva](https://sammy.hk/mandrakesoft-%e6%94%b6%e8%b3%bc-conectiva/ "Mandrakesoft 收購 Conectiva")
4. [久違在家中電腦上進行編譯](https://sammy.hk/%e4%b9%85%e9%81%95%e5%9c%a8%e5%ae%b6%e4%b8%ad%e9%9b%bb%e8%85%a6%e4%b8%8a%e9%80%b2%e8%a1%8c%e7%b7%a8%e8%ad%af/ "久違在家中電腦上進行編譯")
