Question
I want to do a simple search form whose results will be almost identical to the default TWIki Search with no specified format - but I want to add one item, whgich means I want to specify the format.
I haven't found the docs that explain the "default format".
hat format string would I use to precisely replicate the default output from an otherwise format-not-specified search?
Environment
--
VickiBrown - 22 Jul 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Sorry. closing this after more than 30 days...
--
PeterThoeny - 03 Sep 2007
Strange, thought that this had been answered somewhere (maybe in Codev), but can't find it now.
--
FranzJosefGigler - 19 Nov 2007
Did some experimenting and replaced the standard SEARCH in my local WebChanges by a formatted version. The code for my WebChanges is now:
---+ %MAKETEXT{"[_1] Recent Changes in [_2] Web" args="%URLPARAM{"limit" default="50"}%, <nop>%INCLUDINGWEB%"}% <span style="font-size: 50%">%MAKETEXT{"retrieved at [_1]" args="%DISPLAYTIME{"$hour:$min ($tz)"}%"}%</span>
%SEARCH{".*" web="%INCLUDINGWEB%" type="regex" nosearch="on" noheader="on" order="modified" limit="%URLPARAM{"limit" default="50"}%" reverse="on" format="<div class='patternSearchResult'><div class='twikiTopRow'><div class='twikiLeft'><a href='%SCRIPTURLPATH{"view"}%/$web/$topic'><b>$topic</b></a></div><div class='twikiRight twikiSRAuthor'> [[$wikiusername][$wikiname]]</div><div class='twikiRight twikiSRRev'>$percntCALC{\"$IF($rev > 1, r$rev, <span class='twikiNew'>%MAKETEXT{"NEW"}%</span>)\"}$percnt - <a href='%SCRIPTURLPATH{"rdiff"}%/$web/$topic' rel='nofollow'>$date</a> </div><br class='twikiClear' /></div><!--/twikiTopRow--><div class='twikiBottomRow'><div class='twikiSummary twikiGrayText'>$summary</div><!--/twikiSummary--></div><!--/twikiBottomRow--></div><!--/patternSearchResult-->"}%
<strong><em>%MAKETEXT{"See also:"}%</em></strong>
%ICON{rss-small}%
%MAKETEXT{"<a href='[_1]'>RSS feed</a>, recent changes with <a href='[_2]'>50</a>, <a href='[_3]' rel='nofollow'>100</a>, <a href='[_4]' rel='nofollow'>200</a>, <a href='[_5]' rel='nofollow'>500</a>, <a href='[_6]' rel='nofollow'>1000</a> topics, <a href='[_7]' rel='nofollow'>all changes</a>" args="%SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/WebRss, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%?limit=100, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%?limit=200, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%?limit=500, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%?limit=1000, %SCRIPTURLPATH{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%?limit=All"}%
I did this because I had turned off autolinking in a web (set NOAUTOLINK in WebPreferences) and the standard search output doesn't link the AUTHOR entries when autolinking is turned off (probably a bug?)
--
FranzJosefGigler - 19 Nov 2007
BTW: The default formatting of search results depends on the skin template
search.<nameofskin>.tmpl.
--
FranzJosefGigler - 19 Nov 2007