No activity today, make something!
afya
TwHelpSearchPlugin
Markdown Help
Search globally
Save Tiddler
Revert Changes
Cancel Edit
/*** |Name|TwHelpSearchPlugin| |Source|http://twhelp.tiddlyspot.com/#TwHelpSearchPlugin| |Documentation|http://twhelp.tiddlyspot.com/#TWHelpSearchDoc| |Version|1.0.8| |Author|Morris Gray| |License|http://www.TiddlyTools.com/#LegalStatements
and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]| |~CoreVersion|2.0 - 2.4| |Type|plugin| |Requires|[[SearchOptionsPlugin|http://www.TiddlyTools.com/#SearchOptionsPlugin]] [[TableSortingPlugin|http://tw.lewcid.org/#TableSortingPlugin]] (only for sorting option)| |Overrides|SearchOptionsPlugin's search results| |Description|Extends the search results from SearchOptionsPlugin to a sortable table showing title, size and tags.| ''Demo search:'' |>|>|>|<
> | |>|>| look for in |>|>|>| | <
> | <
> | <
> | <
> | | titles | text | tags | hold | ''A Plugin Tweak for:'' SearchOptionsPlugin !!!!!Description <<< This plugin defines an alternative format for the SearchResults tiddler that is generated by the SearchOptionsPlugin . It presents the search results in tabular form numbering the rows; and showing the tiddler title, the size in bytes, and the tags. It is ready to be used with the [[TableSortingPlugin|http://tw.lewcid.org/#TableSortingPlugin]] (check versions) so any column can be sorted; such as size in ascending or descending order. <<< !!!!!Installation <<< Import (or copy/paste) the following tiddlers into your ~TiddlyWiki: * http://twhelp.tiddlyspot.com/#TwHelpSearchPlugin *SearchOptionsPlugin from http://www.tiddlytools.com/#SearchOptionsPlugin * Get more documentation here [[TWHelpSearchDoc]] or here: * http://twhelp.tiddlyspot.com/#TwHelpSearchDoc <<< !!!!!Revision History <<< ''2009.02.18 [1.0.8]'' Added modified column. ''2009.02.18 [1.0.7]'' Removed text coloring of headers re: conflict with TableSortingPlugin refresh. ''2008.09.14 [1.0.6]'' Cosmetic - Add header. ''2007.09.12 [1.0.6]'' Added overflow scroll to TWHelp-SearchResults for long titles or tags. ''2006.02.03 [1.0.5]'' Added facility for holding the results of multiple searches with tick box on dashboard. ''2006.02.02 [1.0.4]'' Added several options, cleaned up design.Planning one version basic and one with added options this is the added options version. ''2006.01.27 [1.0.3'' Added a column for the size of the text in each tiddler, this does not include the size of the title or tags. Added overall TW statistics button requires TiddlerStatsPlugin. ''2006.01.23 [1.0.2 ]'' ''a)''Changed function reportSearchResults(text,matches) to window.reportSearchResults=function(text,matches) ''b)''Added a line so that Incremental Search is automatically disabled config.options.chkSearchIncremental=false; turn off key-by-key searching ''c)''Removed space inside parens. bgcolor(#fe8 )" to "bgcolor(#fe8)". This is what was causing IE to 'crap out' halfway through drawing the table headings. ''d)''Added {{{config.options.chkSearchList=true;}}} ''2006.01.20 [1.0.1]'' ELS: reportSearchResults() definition moved to this Plugin Tweak tiddler and removed extranous code ''2006.01.19 [1.0.0]'' This is an adaptation of Eric Shulman's SearchOptionsPlugin. Adapted by MorrisGray to provide search results in table form. All the necessary controls for refining the search is provided within the table including slide-down access to AdvancedOptions. <<< !!!!!Code ***/ //{{{ if (config.options.chkSinglePageMode==undefined) config.options.chkSinglePageMode=false; if (config.options.chkRegExpSearch==undefined) config.options.chkRegExpSearch=true; if (config.options.chkSearchTitles==undefined) config.options.chkSearchTitles=false; if (config.options.chkSearchText==undefined) config.options.chkSearchText=true; if (config.options.chkSearchTags==undefined) config.options.chkSearchTags=false; if (config.options.chkSearchTitlesFirst==undefined) config.options.chkSearchTitlesFirst=true; if (config.options.chkSearchList==undefined) config.options.chkSearchList=true; if (config.options.chkSearchIncremental==undefined) config.options.chkSearchIncremental=false; if (config.options.chkToggleLinks==true) config.options.chkToggleLinks=false; if (config.options.chkHoldSearches==undefined) config.options.chkHoldSearches=false; if (config.options.chkSortTags==undefined) config.options.chkSortTags=false; config.options.chkToggleLinks=false; config.options.chkSinglePageMode=false; config.options.chkHoldSearches=false; config.options.chkSearchIncremental=false; config.options.chkHttpReadOnly = false; config.options.chkRegExpSearch=true; config.options.chkSearchList=true; config.options.chkToggleLinks=false; config.shadowTiddlers.AdvancedOptions += "\n<
> Hold search results"; //}}} //{{{ // Give the report a custom name config.macros.search.reportTitle="TWHelp-SearchResults"; // Override default SearchOptionsPlugin formatting for SearchResults tiddler window.reportSearchResults=function(text,matches) { var title=config.macros.search.reportTitle config.macros.search.reportTitle; var q = config.options.chkRegExpSearch ? "/" : "'"; if (!config.options.chkHoldSearches) body=""; body+="\n|>|bgcolor:#4c4c4c;@@color(#ccc):''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''@@|bgcolor:#4c4c4c; @@color:#ffffc8; Ver: <
>@@ "+"|"+"\n"; body+="|>|>|bgcolor:#999;color:#000;<
> <
> Titles <
> Text <
>Tags <
> Hold |"+"\n"; body+="\n|bgcolor:#4c4c4c; |bgcolor:#4c4c4c; ''Titles'' |bgcolor:#4c4c4c; ''Size'' |bgcolor:#4c4c4c; ''Tags'' |bgcolor:#4c4c4c; ''Modified'' |h"; for(var t=0;t
Autocomplete tags from:
Global tags
Local tags
systemConfig