Good work, and Thanks for Sharing.

Using My newly released plugin MyMenu you can do the following
http://tiddlywiki.psat.com.au/mymenus/

Create a tiddler eg MySearch

Wrap the above in 
\define mysearch()
above code here
\end

Add this line at the bottom
<<showmenu MySearch>>



Now add a new field
menu-caption  "My Search"
*This will make it a menu tiddler*

Now add a menu item as follows
menu-item-1 {{MySearch}}
*This will transclude the MySearch Text and display it in the menu*

Now you can open the MyMenus Manager and place your search in the one or 
more of following locations
ViewHeader ViewFooter TopLeftBar TopRightBar AboveStory BelowStory 
SideBarTab

You can even add conditions like to only show in the Tiddler View when 
tagged with "research"

Of course when editing tiddler text you can always add <<showmenu 
MySearch>> and/or <<showmenu MySearch inline>> and/or <<showmenu MySearch 
details>> for different way to see the menu.

I have attached the MySearch Tiddler, here which contains your code.
With MyMenus plugin installed you can just import this (drag and drop as 
well) to your tiddly wiki

Please find this demonstrated on the MyMenus site with your code actually 
running, simply select the "My Search" menu on the Top left bar.

Let me know if you approve and send me any additional credits info you 
would like me to add, eg; Want to advertise your website?

This demonstrates how we can share solutions with a MyMenus Tiddler.

Regards
Tony


On Wednesday, February 7, 2018 at 9:37:51 AM UTC+11, Diego Mesa wrote:
>
> All,
>
> For me, search is the most important thing in TW. Its how I get around. As 
> I've mentioned before my dream would be a keyboard shortcut to bring up a 
> search bar with fuzzy finding to open any tiddler (doesnt seem to be much 
> interest there). 
>
> As a quick/dirty hack, you can simple copy/paste the default search 
> defined in 
>
> $:/core/ui/SideBarLists
>
> <$set name="searchTiddler" value="$:/temp/search">
> <div class="tc-search">
> <$edit-text tiddler="$:/temp/search" type="search" tag="input" 
> focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify 
> "$:/state/popup/search-dropdown">> class="tc-popup-handle"/>
> <$reveal state="$:/temp/search" type="nomatch" text="">
> <$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} 
> aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} 
> class="tc-btn-invisible">
> <$action-setfield $tiddler="$:/temp/advancedsearch" 
> text={{$:/temp/search}}/>
> <$action-setfield $tiddler="$:/temp/search" text=""/>
> <$action-navigate $to="$:/AdvancedSearch"/>
> {{$:/core/images/advanced-search-button}}
> </$button>
> <$button class="tc-btn-invisible">
> <$action-setfield $tiddler="$:/temp/search" text="" />
> {{$:/core/images/close-button}}
> </$button>
> <$button popup=<<qualify "$:/state/popup/search-dropdown">> 
> class="tc-btn-invisible">
> {{$:/core/images/down-arrow}}
> <$list 
> filter="[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]" 
> variable="listItem">
> <$set name="resultCount" value="""<$count 
> filter="[!is[system]search{$(searchTiddler)$}]"/>""">
> {{$:/language/Search/Matches}}
> </$set>
> </$list>
> </$button>
> </$reveal>
> <$reveal state="$:/temp/search" type="match" text="">
> <$button to="$:/AdvancedSearch" 
> tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} 
> aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} 
> class="tc-btn-invisible">
> {{$:/core/images/advanced-search-button}}
> </$button>
> </$reveal>
> </div>
>
> <$reveal tag="div" class="tc-block-dropdown-wrapper" 
> state="$:/temp/search" type="nomatch" text="">
>
> <$reveal tag="div" class="tc-block-dropdown tc-search-drop-down 
> tc-popup-handle" state=<<qualify "$:/state/popup/search-dropdown">> 
> type="nomatch" text="" default="">
>
> <$list 
> filter="[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]" 
> emptyMessage="""<div class="tc-search-results">
> {{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
>
> {{$:/core/ui/SearchResults}}
>
> </$list>
>
> </$reveal>
>
> </$reveal>
>
> </$set>
>
> Paste that into a new tiddler, lets say called MySearch and tag it with:
>
> $:/tags/TopLeftBar
>
> Now you can have your sidebar hidden, and still always have access to the 
> search bar. 
>
> To do: add some left padding and other styling to make it nice to look at. 
> If anyone comes up with something, please share!
>
> Best,
> Diego
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a2cd94b0-7458-422c-9e22-dd3aa67e5fcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: MySearch.tid
Description: Binary data

Reply via email to