summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-04-08 14:59:14 +0000
committerDries Buytaert <dries@buytaert.net>2005-04-08 14:59:14 +0000
commitbf9d98d6649472394e44eed988bd4778e90abb2e (patch)
treedf6af210eb17373cf7e5d7701959c1b1f0532da8 /database
parent47f1f7f90ab4a3bb64bed4de6a4b9e3f312d470c (diff)
downloadbrdo-bf9d98d6649472394e44eed988bd4778e90abb2e.tar.gz
brdo-bf9d98d6649472394e44eed988bd4778e90abb2e.tar.bz2
- Patch #19697 by Morbus: FOLKSONOMY.
This patch adds folksonomy support to Drupal (named internally as "Free tagging"). In a nutshell, the core difference is the input method: unlike normal taxonomies which are administratively controlled, a "free tagging" vocabulary allows tag creation when the node is submitted. It does this through an text input box, as opposed to a dropdown or selectbox. This patch: * Removes the useless "Preview form" of a vocabulary. * Alters the vocabulary table to include a new "tags" column. * Adds a new "Free tagging" preference on vocabulary creation/editing. * Modifies the vocabulary overview to support pagers for free tagging vocabs. The new code integrates tightly with the existing taxonomy code. The only additional processing occurs on node save and edit, where we parse through the tags associated with a node. All other display (and thus, code) remains the same.
Diffstat (limited to 'database')
-rw-r--r--database/database.mysql1
-rw-r--r--database/database.pgsql1
-rw-r--r--database/updates.inc16
3 files changed, 17 insertions, 1 deletions
diff --git a/database/database.mysql b/database/database.mysql
index 82298abef..b50d80cab 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -739,6 +739,7 @@ CREATE TABLE vocabulary (
hierarchy tinyint(3) unsigned NOT NULL default '0',
multiple tinyint(3) unsigned NOT NULL default '0',
required tinyint(3) unsigned NOT NULL default '0',
+ tags tinyint(3) unsigned NOT NULL default '0',
module varchar(255) NOT NULL default '',
weight tinyint(4) NOT NULL default '0',
PRIMARY KEY (vid)
diff --git a/database/database.pgsql b/database/database.pgsql
index 700338608..64a63215d 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -738,6 +738,7 @@ CREATE TABLE vocabulary (
hierarchy smallint NOT NULL default '0',
multiple smallint NOT NULL default '0',
required smallint NOT NULL default '0',
+ tags smallint NOT NULL default '0',
module varchar(255) NOT NULL default '',
weight smallint NOT NULL default '0',
PRIMARY KEY (vid)
diff --git a/database/updates.inc b/database/updates.inc
index 7630c3000..076d647ad 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -104,7 +104,8 @@ $sql_updates = array(
"2005-02-23" => "update_125",
"2005-03-03" => "update_126",
"2005-03-18" => "update_127",
- "2005-03-21" => "update_128"
+ "2005-03-21" => "update_128",
+ "2005-04-08: first update since Drupal 4.6.0 release" => "update_129"
);
function update_32() {
@@ -2350,4 +2351,17 @@ function update_128() {
return $ret;
}
+function update_129() {
+ $ret = array();
+
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql("ALTER TABLE {vocabulary} ADD tags tinyint(3) unsigned default '0' NOT NULL");
+ }
+ elseif ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql("ALTER TABLE {vocabulary} ADD tags smallint default '0' NOT NULL");
+ }
+
+ return $ret;
+}
+
?>