Commit Graph

71 Commits (5a82bc5e8799e2569cd256ef8274f00e8eff5d76)

Author SHA1 Message Date
Joey Hess d991ccf134 use cgitemplate, remove misctemplate 2011-01-05 17:15:38 -04:00
Simon McVittie 296e5cb2fd Use local paths for the CGI URL 2010-11-23 00:12:17 +00:00
Joey Hess fee00fdb7a Use Digest::SHA built into perl rather than external Digest::SHA1 to simplify dependencies. Closes: #591040 2010-07-31 15:54:25 -04:00
Joey Hess b300bc9650 use new disable hook
clean up xapian db when plugin is disabled
2010-07-26 16:23:10 -04:00
Joey Hess c8b34aa31c allow misctemplate callers to pass params to suppress actions etc
Suppress disiplay of small search for on search results page, and of
Prefrences link on prefs page.
2010-05-14 21:45:54 -04:00
Joey Hess 4c6fa6413f avoid showing redundant search box on search results page 2010-05-14 21:42:48 -04:00
Joey Hess 575080d6ef respect permalinks 2010-05-06 23:28:40 -04:00
Joey Hess ea4967f184 inline: Call indexhtml when inlining internal pages, so their text can be indexed for searching. 2010-05-06 23:20:48 -04:00
Joey Hess 121e2ffc2f Renamed postscan hook to indexhtml, to reflect its changed position.
Probably only the search plugin uses it, so this seemed safe.
2010-05-06 23:14:36 -04:00
Joey Hess b21df5029b Add placeholder text in search form (in html5 mode only). 2010-05-02 13:49:56 -04:00
Joey Hess a1575b0c83 bugfixes 2010-04-24 20:41:35 -04:00
Joey Hess ca9c6cc254 add support for mass dependencies
Registered by passing "" as page name to add_depends.
2010-04-24 20:22:20 -04:00
Joey Hess abd2339312 look for templates in srcdir and underlays, first
This entailed changing template_params; it no longer takes the template
filename as its first parameter.

Add template_depends to api and replace calls to template() with
template_depends() in appropriate places, where a dependency should be
added on the template.

Other plugins don't use template(), so will need further work.

Also, includes are disabled for security. Enabling includes only when using
templates from the templatedir would be nice, but would add a lot of
complexity to the implementation.
2010-04-22 15:55:58 -04:00
Joey Hess 1239fa55d5 no need to return content from postscan hook 2010-04-20 00:07:41 -04:00
Joey Hess 45dfdcb257 search: Avoid '$' in the wikiname appearing unescaped on omega's query template, where it might crash omega.
Really, a more general fix, this deals with any $ that might appear on the
misctemplate.
2010-03-11 16:10:04 -05:00
Joey Hess 20ba12802b add section information 2010-02-12 04:22:15 -05:00
intrigeri 14a79751e3 po: gettext-ize error messages
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-02 15:00:34 +01:00
Joey Hess 678d467a40 finalise version 3.00 of the plugin api 2008-12-23 16:34:19 -05:00
Joey Hess bb93fccf06 Coding style change: Remove explcit vim folding markers. 2008-12-17 15:22:16 -05:00
Joey Hess 9ec9d6901d Export pagetitle, titlepage, linkpage. 2008-09-27 14:27:42 -04:00
Joey Hess 39195de96e add plugin safe/rebuild info (part 2 of 3)
(brain.. melting..)
2008-08-03 17:20:21 -04:00
Joey Hess 82f0facb62 fixups 2008-07-26 21:14:07 -04:00
Joey Hess 42ac4ec009 remove default values in getsetup
They were a bit confusing, since they did not actually set the default, and
example values are sufficient.
2008-07-26 21:07:15 -04:00
Joey Hess 84c905ec20 finish adding getsetup hooks to plugins 2008-07-26 00:38:13 -04:00
Gabriel McManus e3b0584a49 Use correct term prefixes when searching.
The Z term prefix is for stemming and shouldn't be used here.
X is for custom fields.
2008-07-19 13:23:02 -04:00
Joey Hess 584f3e3061 Add a postscan hook.
* Add a postscan hook.
* search: Use postscan hook, avoid updating index when previewing.
2008-07-17 16:17:15 -04:00
Joey Hess dbbc1e4040 minor improvements 2008-07-07 01:54:28 -04:00
Gabriel McManus 7b8f4d2d06 search: generate configuration files once only when rebuilding 2008-07-07 01:53:06 -04:00
Joey Hess 5807f1de04 fix two build bugs
* ikiwiki-mass-rebuild: Make group list comparison more robust.
* search: Work around xapian bug #486138 by only stemming locales
  in a whitelist.
2008-06-13 13:05:44 -04:00
Joey Hess 3215b5a982 finishing touches on the new search plugin
- Add a Help link.
- If the pageterm is too long, hash it.
2008-06-04 15:24:28 -04:00
Joey Hess e4119f048c The search interface now allows searching for a page by title ("title:foo"), as well as for pages that contain a given link ("link:bar"). 2008-06-04 14:13:21 -04:00
Joey Hess 295e958da5 don't use meta title
Using the title obscured path info, and made search results look
inconsistent. Since nothing else uses the title like that, it didn't make
sense for search to.
2008-06-04 13:12:10 -04:00
Joey Hess bf9829352b have the xapian stemmer use a language based on LANG 2008-06-04 02:41:02 -04:00
Joey Hess 27376abb3c also decode html entities in the title 2008-06-04 01:50:51 -04:00
Joey Hess 4a51e384eb decode html entities 2008-06-04 01:34:26 -04:00
Joey Hess 9976c31aca fix clearing index on page deletion 2008-06-04 01:28:35 -04:00
Joey Hess 1dddec0ba9 Pass a destpage parameter to the sanitize hook.
Because the search plugin needed it, also because it's one of the few
plugins that didn't already have it.

I also considered adding it to htmlize, but I really cannot imagine caring
what the destpage is when htmlizing. (I'll probably be poven wrong later.)
2008-06-04 01:24:23 -04:00
Joey Hess 1546b48b97 move indexing to sanitize hook
I think this will give better results overall.

I made %IkiWiki::preprocessing accessible and used it to avoid indexing
at unnecessary points.
2008-06-04 00:58:46 -04:00
Joey Hess ce826411b2 more search improvements 2008-06-04 00:38:40 -04:00
Joey Hess aefe5dd9cb more substr fixes 2008-06-04 00:25:56 -04:00
Joey Hess 53b188ed35 add a colon to disambiguate
The omega docs suggest doing this if the term may contain upper case, which
it could here.
2008-06-03 23:59:25 -04:00
Joey Hess 9c717d0873 avoid warning
"substr outside of string"
2008-06-03 23:58:19 -04:00
Joey Hess 7fc29119db use "U" term
this seems to be the thing to use for a unique id
2008-06-03 23:56:45 -04:00
Joey Hess 3ba723d79a don't loop forever 2008-06-03 23:55:00 -04:00
Joey Hess 6b7d90d88a fixed most of the xapian todos 2008-06-03 23:52:56 -04:00
Joey Hess 18b0aa1f13 prettify page names, and drop the redunadant url display 2008-06-03 22:11:33 -04:00
Joey Hess 02357b0b32 fix toindex 2008-06-03 21:59:21 -04:00
Joey Hess 44fde6cbff first pass at doing xapian indexing
Still some TODOs to fill in.
2008-06-03 21:14:56 -04:00
Joey Hess 8a6a5320ed search: Converted to use xapian-omega.
Everything is done except for the actual indexing. I plan to do incremental
indexing as pages change.
2008-06-03 15:29:54 -04:00
Joey Hess 8be2b60aac * The search plugin needs to override <base> to point to the directory
containing ikiwiki.cgi, but this should not change the urls to the style
  sheets etc. Add a new forcebareurl parameter to misctemplate to allow
  it to do that.
2008-02-14 15:20:49 -05:00