Commit bf9d98d6 authored by Dries's avatar Dries

- 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.
parent 47f1f7f9
......@@ -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)
......
......@@ -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)
......
......@@ -104,7 +104,8 @@
"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;
}
?>
......@@ -367,9 +367,10 @@ dl.multiselect .form-item {
#permissions td.module, #blocks td.region {
font-weight: bold;
}
#permissions td.permission, #blocks td.block {
padding-left: 2em;
#permissions td.permission, #blocks td.block, #taxonomy td.term, #taxonomy td.message {
padding-left: 1.5em;
}
#access-rules .access-type, #access-rules .rule-type {
margin-right: 1em;
float: left;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment