You are not logged in.
Allows you to pre-select articles to limit the scope of an
article_custom tag, using selection criteria not offered by those tags. In short, it’s like adding selection attributes to one of those tags.
Thanks to net-carver for clueing me in to MySQL temporary tables.
Version 0.3.2 (Jan 3, 2011)
Multidoc compatibility update
Version 0.3.1 (Dec 9, 2010)
Version 0.3.0 (Jul 11, 2010)
where, allows you to add a raw
WHERE expression to the selection criteria. (Thanks to Victor for the idea.)
Version 0.2.7 (Jun 6, 2010)
Fixed bug in
index_ignore attribute. (Thanks to th3lonius for spotting it.)
Version 0.2.6 (Mar 8, 2010)
Two new attributes,
update_where, which can be used in tandem to add a custom
UPDATE query on
Version 0.2.5 (Feb 19, 2010)
Checks that temporary table creation was successful, else returns nothing.
Version 0.2.4 (Feb 19, 2010)
Create properly-alphabetized indexes with the new
Version 0.2.3 (Jan 21, 2010)
Fixed custom field handling bug that was probably introduced in version 0.2.1
Version 0.2.2. (Sept 28, 2009)
Version 0.2.1 (July 7, 2009)
Filter now disabled on search results pages
Version 0.2 (July 4, 2009)
Fixed behavior of
Version 0.1 (July 3, 2009)
Initial release. Allows filtering on the
Expires field, and regexp pattern matching on any custom field.
Edit: Errr, see this first; a simple no-plugin solution for matching any non-empty custom field.
Last edited by jsoo (2011-01-03 23:44:05)
I would advise caution with this approach. Use of temporary tables is a clever hack indeed, but it can inflict a fairly steep performance penalty. You might want to consider an optional attribute that will tell the plugin to create the temporary table in memory rather than on disk, as this will increase performance 10x to 100x (at the cost of additional RAM usage).
Thanks for the tip. I don’t think it can be done because, apparently, columns with data type
blob can’t be stored in memory. I haven’t had any performance problems with this technique yet, but haven’t tried it with truly large tables. But this would be a good caveat to add to the documentation.
Just uploaded a slightly modified version plus an alternate. Haven’t changed the version number (except for the alternate). On an earlier project using temporary tables I had problems with a client getting “Not unique table/alias” errors, which I solved by using a second, temporary-temporary, table as an intermediate step. Of course this isn’t great for performance, and I don’t know what configurations are likely to result in this error. Anyway, the main version of the plugin now does the one-step table creation so should be incrementally faster. If that doesn’t work for you, try the alternate version.
Edit: Also see this. Will probably obviate the need for this plugin for most users.
Last edited by jsoo (2009-07-03 22:47:53)
this is great and was working perfectly for my needs until I installed and activated the soo_multidoc plugin (soo_multidoc 1.0.b.1 and soo_txp_obj 1.0.b.1)
with soo_multidoc enabled it stops working and gives the following error message
Tag error: <txp:soo_article_filter expires=“future”> -> Textpattern Warning: Table ‘textpattern’ already exists
create temporary table textpattern select * from textpattern where Expires > now() on line 82
Arghh, the engineer, hoist with his own petard …
I’ll give some thought to this.
Hmm, I wonder if you’re seeing a cached page. Looks correct to me.