Status
API, Brigette. PHP, RoyK. For Hayes+.
Overview
Tagging was implemented as a prototyped feature for Hayes in PHP. For Hayes+, the feature will be moved into the API.
Braindump of features
Thoughts
- "Smart" parsing of the tags will be done by PHP (example, "date:now" will be converted into "Y-m-d' for storage by PHP to the API)
- Should PHP send full tags to the API (e.g. "date:2007-07-02" or send in the tag type separately?)
(First pass by RoyK, MaxM will poo poo on this shortly)
- GET:pages/{pageid}/tags
Returns all tags to a page - GET:pages/{pageid}/tags/related
Returns a list of "related" pages (only happens if the page itself has a "define:" tag associated with it)
- PUT:pages/{pageid}/tags
Puts a line-separated list (\n) of tags onto a page (or an XML doc if content-type: text/xml?)
- type = string? :Special type of tag (date, define, geo)
- GET:site/tags/{tagname}
Returns a list of pages with the associated tag
How is this going to handle date ranges to support Special:Events?
- type = string? : tag type
Initial Implementation
Abstract
Tagging is a means
of categorizing pages. It's page specific. Tags can include (as of now)
a generic text tag or a chrono tag. Text tags are the most common and
are user defined line separated. Chrono tags are a means of defining a
date or a date range with a specific page.
Status
Functionally complete. Due out in Hayes release
Goals
- Easily categorize content
- Folksonomies
- Pivot data about specific categorizations
- Embed metadata like dates, date ranges and other fun stuff into a page
Requirements
- |0-0|: Users can tag any page by clicking a tag icon and providing the tags in a text field
- |0-0|: tags are line separated
- |0-0|: tags may have any non-HTML characters and will be converted to lowercase
- |0-0|: tags of a given page are presented on said page
- |0-1|: While tagging a page some form of auto-suggestion / auto-completion should be present to minimize redundant tagging
- |0-0|: Users must be able to view all pages that have a shared tag in a single view
- |0-0|: User must be able to provide a date tag to a page using any of the following syntaxes:
- date:
/content/body/div[4]/div[4]/ol/li[7]/ul/li[1]/span, line 1, column 5: EOF expected (click for details)MindTouch.Deki.Script.DekiScriptParserException: line 1, column 5: EOF expected
at MindTouch.Deki.Script.Errors.SynErr (Int32 line, Int32 col, Int32 n) [0x00000]
at MindTouch.Deki.Script.Parser.SynErr (Int32 n) [0x00000]
at MindTouch.Deki.Script.Parser.Expect (Int32 n) [0x00000]
at MindTouch.Deki.Script.Parser.Parse () [0x00000]
at MindTouch.Deki.Script.DekiScriptParser.Parse (System.String source, Int32 line, Int32 column) [0x00000]
at MindTouch.Deki.Script.DekiScriptParser.Parse (System.String source) [0x00000]
at MindTouch.Deki.Script.Dom.DekiScriptDomBuilder.Build (System.Xml.XmlElement current, System.Collections.Generic.List`1 list) [0x00000]
, ordered Day, Month, Year - date:this {Monday, ..., Sunday}
- date:next
Friday , would mean Friday after this coming one, or Friday after next.
I don't personally like this, but I believe it's how Zimbra does it.
- RoyK: This is using an internal strtotime() function and i won't have control over this
- clicking a date field will take you to a page where you can see a range of all pages with dates (default is 30 days from now)
- |0-0|:
All dates are automatically converted to the human readable long date
form, e.g.- date:this friday would yield -> April 6, 2007.
- |0-0|: sorting of tags on view: date items chronologically first, then, normal tags sort alphabetically
- |0-0|: a view consisting of a tag cloud (I'll leave reqs on this to another spec)
Where the following definitions apply to the acronyms. evidenced in the above example.
- |1-_|: Currently implemented
- |_-0|: Essential
- |_-1|: Desirable
- |_-11|: This sure would be nice
Notice that in the above examples keywords of each requirement is highlighted to make it easier for the reader to digest at a glance.