DisableWikiLinksPlugin: Support for Multiple DisableWikiLinksLists?

31 views
Skip to first unread message

Scott Simmons

unread,
Jul 1, 2012, 3:58:27 PM7/1/12
to tiddl...@googlegroups.com
Help, TiddlyWizards!

Something I've wanted to do for a long time is modify Eric's DisableWikiLinksPlugin to use multiple DisableWikiLinksLists.  For those who are unfamiliar with it, the plugin checks a tiddler called DisableWikiLinksList and prevents the strings listed there from being wikified -- great for preventing accidental linking of CamelCase terms you use on a daily basis.  Over the years, however, my list has gotten quite long, and I'd like to split it up into separate lists -- some of which could be applied to different TWs.  For example, I'd like to have a DisableWikiLinksList_Aviation and a DisableWikiLinksList_Abbreviations.

The best way to do this, I think, would be through tagging.  Like Simon Baird's AutoCorrectPlugin and its siblings, I'd like to make DisableWikiLinksPlugin pull together a list of words from all the tiddlers tagged (say) "DisableWikiLinksList."  That would allow me to create and modify additional DisableWikiLinksLists on the fly in different TWs without futzing around with the original plugin.

I've tried to hack this together in the past for my personal use, but clearly I'm doing something wrong.  I thought it would be as simple as setting this config value:

config.options.txtDisableWikiLinksList = store.getTaggedTiddlers('DisableWikiLinksList');

... but that doesn't do it.

I've also tried setting a variable == store.getTaggedTiddlers('DisableWikiLinksList'), then setting config.options.txtDisableWikiLinksList == that variable, to no effect.

I also tried plugging store.getTaggedTiddlers('DisableWikiLinksList') into the value for "t" in Eric's plugin itself.

What exactly does store.getTaggedTiddlers return, I wonder?  It don't think it returns the cumulative content of all the tiddlers it scrapes.  Maybe there's another parameter I need to use in conjunction with it to do that?

--

Some of the other things I've tried include transcluding different lists into the DisableWikiLinksList (no dice -- and still not as effective as the tagging solution would be) and accessing the store.getTaggedTiddlers value directly in Eric's script as the value of his variable "t," i.e.:

var t = store.getTaggedTiddlers(config.DisableWikiLinksPlugin.txtDisableWikiLinksListTag);

(where I've set the variable previously)

or even directly:

var t = store.getTaggedTiddlers('DisableWikiLinksList');

--

Can anyone set me straight and put me on the path to a solution?
Reply all
Reply to author
Forward
0 new messages