Ticket #1265 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Enhancement: Ability to add filters

Reported by: jdlrobson Owned by: psd
Priority: minor Milestone: 2.6.2
Component: core Version:
Severity: low Keywords: filter
Cc:

Description

In TiddlySpace? I would like to extend the filter syntax to recognise [is[Private]] [is[Draft]] and [is[Public]].

To be able to do this I would like a hook

A config.filters dictionary which could hold custom filter definitions would meet my needs. So in the above case I might define a filter "is" which is called with the parameter public/private/draft by filterTiddlers.

e.g.

config.filters = {
  is: function(value) {
    // get tiddlers
    return tiddlers;
  }
}

Change History

Changed 3 years ago by FND

  • milestone set to 2.7.1

Changed 3 years ago by psd

I've been working on a plugin which could be turned into a core patch if it's an acceptable approach:

 http://whatfettle.com/2008/07/ExtensibleFilterPlugin/

-- needs more tests than the current core ones ..

Changed 3 years ago by psd

  • keywords filter added
  • owner changed from JeremyRuston to psd
  • severity changed from undefined to low
  • priority changed from undefined to minor

Changed 3 years ago by psd

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:12514

Changed 3 years ago by FND

  • milestone changed from 2.7.1 to 2.6.2

Changed 3 years ago by jdlrobson

I notice there are seemingly several incorrect references to "this" Should they not reference store?

e.g. this.getValueTiddlers(match[2],match[3]); should be store.getValueTiddlers(match[2],match[3])

It seems to work but I'm worried about side effects.

Note: See TracTickets for help on using tickets.