This page was adapted from one by John VanDyk - Why the Metadata Plugin is Important - about his Metadata Manila plugin, which was the predecessor of addedValues. Thi article can be found on the web at http://zelotes.ent.iastate.edu/metadata/why.
A database consists of tables of structured data. In Manila, messages are stored in a message table. You can think of the message table as a table like this
| msgNum |
| 1 |
| 2 |
| 3 |
Each message is a record in our little database. What other information does Manila have? Well, if you look at the database table where Manila stores this, you'll see plenty. Check out yourManilaWebsite.["#discussiongroup"].messages.["0000001"] if you have your own copy of Frontier. For each record we know
among other things.
Notice that each of these could be considered an attribute of the record. This is a basic database table. To make it simple, think of attributes as columns, keyed on message number:
| msgnum | Subject | Posted by | When |
| 1367 | do these get read or answered ? | ben@dp.co.nz | 2007.08.6 |
| 1364 | Added Values logo thing .. | ben@dp.co.nz | 2007.06.18 |
| 1363 | Removing variable uniqueness (and forms) | ben@dp.co.nz | 2007.06.18 |
| 1362 | AV accross Manila sites | ben@dp.co.nz | 2007.06.6 |
| 1352 | tinyMCE not working as Edit this Page editor. | josh_allen@dpsk12.org | 2007.05.10 |
| 1169 | HOW TO : Make an Export of addedValues Data in Tab, CSV and XML formats | ben@dp.co.nz | 2006.09.17 |
| 1002 | Different date formats in multilanguage sites | cat@catconsulting.ch | 2006.06.18 |
| 469 | Fluffing your cat | mo@zzzzzzz.com | 2005.04.26 |
| 468 | What to feed your cat | mo@zzzzzzz.com | 2005.04.26 |
| 467 | Shedding on the rug | mo@zzzzzzz.com | 2005.04.26 |
| 466 | Getting rid of fleas | mo@zzzzzzz.com | 2005.04.26 |
| 465 | How to Frisk a Cat | mo@zzzzzzz.com | 2005.04.26 |
What the addedValues Plugin lets you do is add columns to this table.
This gives you a lot of flexibility. Suppose you are using Manila to build a how-to site about cats. Let's add a Topic column and a few more records:
| msgnum | Subject | Posted by | When | Topic |
| 1367 | do these get read or answered ? | ben@dp.co.nz | 2007.08.6 | use of discussion |
| 1364 | Added Values logo thing .. | ben@dp.co.nz | 2007.06.18 | Added Values logo |
| 1363 | Removing variable uniqueness (and forms) | ben@dp.co.nz | 2007.06.18 | variable uniqueness |
| 1362 | AV accross Manila sites | ben@dp.co.nz | 2007.06.6 | AV query |
| 1352 | tinyMCE not working as Edit this Page editor. | josh_allen@dpsk12.org | 2007.05.10 | WYSIWYG |
| 1169 | HOW TO : Make an Export of addedValues Data in Tab, CSV and XML formats | ben@dp.co.nz | 2006.09.17 | Exports |
| 1002 | Different date formats in multilanguage sites | cat@catconsulting.ch | 2006.06.18 | Different date formats in multilanguage sites |
| 469 | Fluffing your cat | mo@zzzzzzz.com | 2005.04.26 | Grooming |
| 468 | What to feed your cat | mo@zzzzzzz.com | 2005.04.26 | Diet |
| 467 | Shedding on the rug | mo@zzzzzzz.com | 2005.04.26 | Grooming |
| 466 | Getting rid of fleas | mo@zzzzzzz.com | 2005.04.26 | Pest Control |
| 465 | How to Frisk a Cat | mo@zzzzzzz.com | 2005.04.26 | Thievery |
Now we can ask the computer questions like, "Show me all the stories related to grooming posted after April 25th." This is easy for the computer. All it does is check each record to see if the Topic entry is "Grooming", right? Well no, we could do it that way, but after we've got 10,000 records it's going to take a while to check every one. That's why databases make indices (one index, two indices).
The addedValues Plugin can make an index of each column you define, although you have to ask it to do so. So it's got an index of Topic already built. It built it a little at a time as our friend Mo was posting web pages (that is, creating new records). Now all it has to do is check the index entry for "Grooming", and return what it finds there, namely messages number 467 and 469. We're done.
But wait! We also asked the computer only for records after April 25th. So the computer can now filter the results by checking them one by one. Since addedValues can be told to build an index for the When column also, it can use its index for that and that's a fast operation too.
I can see you mulling this over. You're thinking, but wait...couldn't an article fit into more than one topic? Maybe we'd like to write about your cat's bad habit of stealing Frosted Flakes from the cupboard and gorging on them. This would fit under both Thievery and Diet, you point out. Good thinking.
To satisfy that need, it's allowed to define a column (or addedValues variable) which has multiple values. They are stored in Frontier as a table inside the message table; but the important detail is really how these values appear in the index. They appear individually, so we can still look up one topic at a time very quickly.
You delimit the list using commas.
Can you begin to sense the power of addedValues? Manila becomes the front-end to a database that you can use any way you wish. The most common uses will be what we've demonstrated here (show me all messages that have attribute x) and building tables of contents or indices. In addedValues we call that a query and we write it like this
name of attribute = value of attribute
The query is entered into a dictionary of queries and named, and we can call it up with a macro. The answers are formatted by another addedValues entity called a report, in this case a search report.
{addedValueMacros.query(query name, report name)}
This is a tad more complicated than how things were done in the Metadata plugin, but the tradeoff is greater flexibility in formatting the answer. And to keep things simple, the minimum needed to create new report is to name it and identify it as a search report for messages, all the rest can be tweaked at yoru convenience.
Let's get that list of Grooming articles:
{addedValueMacros.query("someCatTopics","someCatTopics")}
Results:
| *Shedding on the rug | |
| *Fluffing your cat | |
Want to crank through the Topics column to generate an index of articles by topic? No problem. How about adding another column called Breeds, and generating a topical index by breed? No problem. Assign a Price column and charge for each article! Assign a Ranking column and increment it each time a user clicks a This Is Useful button. Assign a FreeBinkyToy column and send everyone an appropriate cat toy for reading an article! You can take it from here.
How do you get the information into Manila? Easy. When you choose Edit this Page, you get fields for two Manila values, Title and Text. Additional addedValue values show up below this. Here's a screenshot of creating a message that has a column called topic:
Screenshot:

The additional values gets posted right along with the traditional Title and Text you've been entering. The values of a message are soemtimes called metadata or metainformation, and of the interestign things you can do with metainformation is make it available inside HTML META tags in the HEAD section of your document. If that's all you want the addedValues Plugin to do, it will accomplish that task without fuss.