Help - Search - Members - Calendar
Full Version: Filter Tags Based On Date
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
Steve Springett
I'm working on enhancing an existing plugin and have run into an issue I can't seem to resolve.

I want to get a collection of tags, filtered by date.

My current plugin code:
CODE
my @tags = MT::Tag->load_by_datasource( $type, { 'is_private' => 0, 'blog_id' => $blogId }, );


The code I can not get working:
CODE
my @tags = MT::Tag->load_by_datasource( $type, { 'created_on' => [ '20011008000000', undef ], 'is_private' => 0, 'blog_id' => $blogId }, {range => { created_on => 1 } });


Do I have to do a join on these? Any code examples or corrections to the above would be appreciated.

Thanks...
OtherNiceMan
QUOTE (Steve Springett @ Nov 16 2008, 01:00 AM) *
I'm working on enhancing an existing plugin and have run into an issue I can't seem to resolve.

I want to get a collection of tags, filtered by date.

My current plugin code:
CODE
my @tags = MT::Tag->load_by_datasource( $type, { 'is_private' => 0, 'blog_id' => $blogId }, );


The code I can not get working:
CODE
my @tags = MT::Tag->load_by_datasource( $type, { 'created_on' => [ '20011008000000', undef ], 'is_private' => 0, 'blog_id' => $blogId }, {range => { created_on => 1 } });


Do I have to do a join on these? Any code examples or corrections to the above would be appreciated.

Thanks...


The Developer Mailing may be able to help http://www.sixapart.com/mailman/listinfo/mtos-dev
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.