User login

Modules

An upgrade module proposal

http://groups.drupal.org/node/7423#comment-23147
Benjamin Melançon - Sat, 2007-12-15 11:55

Like everyone else using a lot of Drupal, I want sophisticated change management where we have:

Another need for CMT functionality... well, a little piece of it: user-editable term descriptions

Editable Description for Taxonomy Term
http://drupal.org/node/152970

I need to be able to set permissions for editing the description for the term. That is, the administrator can give edit and revision permissions for the term description.

Editable Description for Taxonomy Term
http://drupal.org/node/152970

I need to be able to set permissions for editing the description for the term. That is, the administrator can give edit and revision permissions for the term description.

Delete from multiple tables that may have a one-to-many relationship

NOTE: Conclusions here are provisional and input from a genuine SQL guru would be greatly appreciated.

SQL multiple table delete

Delete rows in three tables that share a key and satisfy a WHERE condition (in one of the tables). Table T3 will have a single row for each of these keys, as will table T2 for that matter, but table 1 will have multiple entries for each key.

The MySQL docs show up to two tables deleted, using three:

DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;

NOTE: Conclusions here are provisional and input from a genuine SQL guru would be greatly appreciated.

SQL multiple table delete

Delete rows in three tables that share a key and satisfy a WHERE condition (in one of the tables). Table T3 will have a single row for each of these keys, as will table T2 for that matter, but table 1 will have multiple entries for each key.

The MySQL docs show up to two tables deleted, using three:

DELETE FROM t1, t2 USING t1, t2, t3 WHERE t1.id=t2.id AND t2.id=t3.id;

Possible performance optimization of table structure

It would be possible to do a performance optimization of table structure by moving (or rather, duplicating) the votingapi-calculated score into the cmt tables.

I will revisit this later.

It would be possible to do a performance optimization of table structure by moving (or rather, duplicating) the votingapi-calculated score into the cmt tables.

I will revisit this later.

Merging terms: dealing with the aftermath

Current thinking is to secretly store a term ID for every synonym

How do we ensure that a term ID that existed once passes on to whatever term Id supersedes it? That is, taxonomy term 12 on example.com, after a lifetime of dedicated service, has been merged into term 18, so how do make sure existing links to example.com/taxonomy/term/12 get you to example.com/taxonomy/term/18?

URL aliases?

Or an addition to the code in taxonomy.module that catches /term?

We'll deal with this later.

Current thinking is to secretly store a term ID for every synonym

How do we ensure that a term ID that existed once passes on to whatever term Id supersedes it? That is, taxonomy term 12 on example.com, after a lifetime of dedicated service, has been merged into term 18, so how do make sure existing links to example.com/taxonomy/term/12 get you to example.com/taxonomy/term/18?

URL aliases?

Or an addition to the code in taxonomy.module that catches /term?

We'll deal with this later.

CMT database schema, mark II

cmt_term_description
vapi_id : corresponds to votingapi content_id
tid : same as in term_data
description : same as in term_data. Don't see a reason to put a key on description

cmt_term_weight
vapi_id : corresponds to votingapi content_id
tid : same as in term_data
weight : same as in term_data

name (inserted into synonym-modeled table cmt_term_name, where votes for names are tracked)
LEFT OUT: vid (for now, cannot vote on what vocabulary a term belongs in)

<

pre>
cmt_term_description
vapi_id : corresponds to votingapi content_id
tid : same as in term_data
description : same as in term_data. Don't see a reason to put a key on description

cmt_term_weight
vapi_id : corresponds to votingapi content_id
tid : same as in term_data
weight : same as in term_data

name (inserted into synonym-modeled table cmt_term_name, where votes for names are tracked)
LEFT OUT: vid (for now, cannot vote on what vocabulary a term belongs in)

cmt_term_hierarchy

Possible use case and taxonomy thoughts from a linguist

At the U.S. Social Forum in Atlanta I met a person who really wants CMT. (See, even when I'm not working, I'm working!)

It's nice to meet someone enthusiastic about potential!

His name is Sam Boyer, and he's working on the Drupal site Student Trade Justice Campaign.

He also happens to be a linguistics scholar, so I tried to get all his thoughts on taxonomy.

(Short version: Drupal's taxonomy is good, and quite exhaustive for anything one might want to do.)

At the U.S. Social Forum in Atlanta I met a person who really wants CMT. (See, even when I'm not working, I'm working!)

Taxonomy terms attach to nodes

Taxonomy terms attach to nodes, not to revisions. Naturally, you don't want to lose all your tags and categorization when a node is edited, but it's worth noting that adding or deleting terms does not create a new revision, that nodes do not keep a history of terms applied to them.

There are differing opinions, and I'm a little scared to look at the guts again after reading this issue, Revisions and taxonomy don't play well.

Taxonomy terms attach to nodes, not to revisions. Naturally, you don't want to lose all your tags and categorization when a node is edited, but it's worth noting that adding or deleting terms does not create a new revision, that nodes do not keep a history of terms applied to them.

There are differing opinions, and I'm a little scared to look at the guts again after reading this issue, Revisions and taxonomy don't play well.

Grokking Voting API for Community Managed Taxonomy

I hope this will also be useful to people trying to use votingapi to rate arbitrary content, such as the promised fish.

From votingapi_add_vote (which should not be called directly, but is used by )

One thing which is incorrect in the module's in-code documentation is this:

@param $value_type
* An int representing the value_type shared by the aggregated votes.

I hope this will also be useful to people trying to use votingapi to rate arbitrary content, such as the promised fish.

From votingapi_add_vote (which should not be called directly, but is used by )

One thing which is incorrect in the module's in-code documentation is this:

@param $value_type
* An int representing the value_type shared by the aggregated votes.

Taxonomy's unused tables: related terms and synonyms

fago__: drupal doesn't use them for anything, afaik
fago__: so it's up to contribs to add value to them
agaric: http://drupal.org/node/148080
bot_module: http://drupal.org/node/148080 => Add related terms & synonym editing => Node Auto Term [NAT], Code, normal, patch (code needs review), 1 IRC mention

fago__: drupal doesn't use them for anything, afaik
fago__: so it's up to contribs to add value to them
agaric: http://drupal.org/node/148080
bot_module: http://drupal.org/node/148080 => Add related terms & synonym editing => Node Auto Term [NAT], Code, normal, patch (code needs review), 1 IRC mention
agaric: And contribs are just starting to do so. But one would think that somewhere taxonomy would have a written rationale for having them in the first place?
fago__: I'm not aware of any.. but yeah, for what synonyms are thought is quite obvious

Syndicate content