This is amazing, thank you! It's actually much more functionality than
I want to give users; I just want their search to spit back only
tiddlers with the "Content" tag, without giving them the option to
change this. But I'll see what I can tweak to get it that way. It will
give me chance to learn what's going on under the hatch. I won't be
afraid. :-)

Andres

On Sep 22, 1:14 pm, Eric Shulman <[email protected]> wrote:
> > > I'm afraid you're gonna need to write some custom code.
> > I'm afraid you're right. Thanks for the clarification.
>
> Don't be afraid... :-)
>
> Here's some custom code:
>
> ----------------------
> <<tiddler {{config.options['txtMySearch']='';'';}}>><<option
> txtMySearch>>/%
> %/<html><nowiki><form style='display:inline'>
> <select name='tags'><option value=''>Filter by tag:</option></select>
> <input type='button' value='search' onclick="
>         var text=config.options['txtMySearch'];
>         var useRE=config.options['chkRegExpSearch'];
>         var useCase=config.options['chkCaseSensitiveSearch'];
>         highlightHack=new RegExp(useRE?text:text.escapeRegExp
> (),useCase?'mg':'img');
>         var matches=store.search
> (highlightHack,'tags',this.form.tags.value,true);
>         highlightHack=null;
>         var q=useRE?'/':'\x27';
>         if(matches.length>0) {
>                 story.closeAllTiddlers();
>                 story.displayTiddlers(null,matches);
>                 displayMessage(config.macros.search.successMsg.format
> ([matches.length.toString(),q+text+q]));
>         } else
>                 
> displayMessage(config.macros.search.failureMsg.format([q+text+q]));
>         return false;
> "></form></html><<tiddler {{
>         var list=place.lastChild.getElementsByTagName('form')[0].tags;
>         var tags=store.getTags()
>         for (var t=0;t<tags.length;t++)
>                 list.options[list.length]=new Option(tags[t][0],tags[t][0]);
> '';}}>>
> ------------------------
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
>
> P.S. GoogleGroups adds word-wrapping, so the formatting of the code
> may be a bit messy.  You may even have to remove some extra newlines
> in order to get this to work.  If you get stuck, let me know.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
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/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to