https://trac.habariproject.org/habari/changeset/4380 incorporates
option 3.

Posts::get() is now capable of dealing with multiple vocabularies by
extending the colon syntax we currently use for tags. This may not be
the best way, but it involves relatively few changes and keeps the
parameter syntax for Posts::get() reasonable. AtomHandler, Theme, and
the search box on the manage posts page in the admin have been updated
to deal with the change.

Normal users shouldn't see any difference in behavior. Tags still live
at www.site.com/tag/tagname, the atom feed still lives at
www.site.com/tag/tagname/atom, and the search box on the manage posts
page still uses tag:

Any plugins or themes using custom calls to Posts::get() using the
variations on the tag ( tag, not:tag, tag_slug, not:tag_slug, all:tag,
all:tag_slug) parameter will have to be updated. A new parameter,
'vocabulary', has been added. The syntax is

Posts::get( 'vocabulary' => array( 'tags:term' => 'habari',
'tags:not:term' => 'asides', 'tags:term_display' => 'Community',
'tags:not:term_display' => 'House' ) );

Note that the vocabulary parameter is an array of parameters. Here,
'tags' is where the vocabulary name is prepended. 'term' is the
equivalent of 'tag_slug', 'term_display' is the equivalent of 'tag'.

For example, if one currently has this custom get:

Posts::get( array( 'content_type' => 'page', 'status' =>
Post::status( 'published' ), 'not:tag_slug' => 'site-policy',
'nolimit' => 1 )

the updated version will be:

 Posts::get( array( 'content_type' => 'page', 'status' =>
Post::status('published'), 'vocabulary' => array( 'tags:not:term' =>
'site-policy' ), 'nolimit' => 1 ) )

Plugin authors using tags in where filters will need to make similar
changes.

RIck

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to