JoostKiens / dc-meta-tags

WordPress plugin to add Dublin Core meta data (Element Set v1.1) to wp_head()
GNU General Public License v3.0
7 stars 3 forks source link

Using controlled vocabularies for metadata #6

Open Tintazul opened 10 years ago

Tintazul commented 10 years ago

The Dublin Core documentation indicates that it’s best to use controlled vocabulary for some fields. We should give the option of restricting the input of some fields to controlled vocabulary; or to at least suggest this, by presenting a drop-down with the controlled terms, and offering a text box to allow the input of a term not present in the vocabulary.

For instance, the Type metadata should accept one of the elements from the list at http://dublincore.org/documents/dcmi-type-vocabulary/#H7 – these are:

I would be happy if I could restrict the data input to these values.

For language codes, it would be nice if the system suggested previously entered values, but allowed the entry of new values.

JoostKiens commented 10 years ago

Agreed, I don't have time at the moment though.

Tintazul commented 10 years ago

Well, do you let me do it? I can always do it for my own code, anyway.

JoostKiens commented 10 years ago

Yeah sure, any ideas about the UI?

Tintazul commented 10 years ago

Yes, I have some ideas. The multivalue is a higher priority for me (because I expect to be doing all of the input for my website myself, so I can discipline myself), but here it goes:

Option 1: In the settings page, under Type, we show a checkbox: "Limit to DCMI Type controlled vocabulary", and then in the meta box, we show only a drop-down list box, not an input box.

Issue: What happens if there is a value already inserted that isn't in the vocabulary?

Option 2: In the settings page, under Type, we show a checkbox: "Suggest DCMI Type controlled vocabulary", and then in the meta box, we show both a drop-down list box first, and then an input box. If the value in the field is one of the terms of the controlled vocabulary, we select the term in the drop-down; if not, then we fill in the input field. Maybe there should be a radio button before the drop-down and the text input box.

What do you think?

Tintazul commented 10 years ago

The WP mechanism for custom taxonomies should do what I want… except we want all of the Dublin Core metadata to happen inside a single Dublin Core metadata box. Bettet than have a “Language” meta box, a “Type” meta box etc.