Update of "search function"
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Artifact ID: | 972834d59fa0b13d37fd4319029f80c6786c7be4 |
---|---|
Page Name: | search function |
Date: | 2015-02-04 01:51:50 |
Original User: | mario |
Mimetype: | text/x-markdown |
Parent: | 49e01ddbe5af82b8cb8c2913bda5cbb320edb7f1 (diff) |
Next | 664954461f9ab405bc339fb6368a56de2d36370a |
Status: obsolete
There's now a built-in /search
page in Fossil 1.31 and later. It scans the current contents right away, includes Wiki pages, documents or all files, checkins and timeline events. Furthermore it can be configured vi /srchsetup
to build and utilize a FTS (full text search) table.
Old userland search function
The Stackoverflow and GitHub themes already include this search feature. Its display is implemented as TH1 script.
It requires a litte setup, but works with other themes as well.
Use fossil-search-table.php to have your repositories updated with a fx_search table. (Thanks go to Joel for pointing the
fx_
prefix feature out.)- It traverses existing *.fossil repositories. But the
glob()
could point to just one repo.fossil of course. - Have it run as cron script.
- It traverses existing *.fossil repositories. But the
Unless you use the
so-skin.txt
config, you have to manually import theth1x.tcl
script asth1-setup
to your repository configuration:fossil setting th1-setup "$(cat th1x.tcl)"
In your templates header add following invocation code at the bottom:
<th1> catch {ui::search_on_wiki} </th1>
And following as your search box:
<form action="wiki"> <input name="name" size="28" placeholder="search wiki+files"> </form>
For the
so-skin
you could else still edit the old Google search box in, of course.
Attachments
See features/ for