r5 - 08 Sep 2007 - 09:19:18 - CrawfordCurrieYou are here: TWiki >  Plugins Web > SearchSummaryPlugin
Tags:
rendering 1 Add my vote for this tag, search 2 Add my vote for this tag, usability 2 Add my vote for this tag, , create new tag

SearchSummaryPlugin

Show search terms and surrounding context in topic summaries

Improves the presentation of summaries for keyword, word and literal searches, by displaying topic content on either side of the search terms wherever they are found in the topic. Especially useful for searches in documentation.

For example, %SEARCH{"cat +spasm" type="keyword"}% produces:

This plugin only works with TWiki-4 or later.

Usage

Install and enable the plugin. It "just works". You can change the size of the context (the number of characters either side of a search term) by setting the TWikiVariable SEARCHSUMMARYPLUGIN_CONTEXT (the default is 30). You can change the CSS class used to highlight search terms by setting SEARCHSUMMARYPLUGIN_CSSCLASS. The default is twikiAlert.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.

Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.

  • If you have TWiki 4.1 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)
    • The webserver user has to have permission to write to all areas of your installation for this to work.
  • If you have a permanent connection to the internet, you are recommended to use the automatic installer script
    • Just download the SearchSummaryPlugin_installer perl script and run it.
  • Notes:
    • The installer script will:
      • Automatically resolve dependencies,
      • Copy files into the right places in your local install (even if you have renamed data directories),
      • check in new versions of any installed files that have existing RCS histories files in your existing install (such as topics).
      • If the $TWIKI_PACKAGES environment variable is set to point to a directory, the installer will try to get archives from there. Otherwise it will try to download from twiki.org or cpan.org, as appropriate.
      • (Developers only: the script will look for twikiplugins/SearchSummaryPlugin/SearchSummaryPlugin.tgz before downloading from TWiki.org)
    • If you don't have a permanent connection, you can still use the automatic installer, by downloading all required TWiki archives to a local directory.
      • Point the environment variable $TWIKI_PACKAGES to this directory, and the installer script will look there first for required TWiki packages.
        • $TWIKI_PACKAGES is actually a path; you can list several directories separated by :
      • If you are behind a firewall that blocks access to CPAN, you can pre-install the required CPAN libraries, as described at http://twiki.org/cgi-bin/view/TWiki/HowToInstallCpanModules
  • If you don't want to use the installer script, or have problems on your platform (e.g. you don't have Perl 5.8), then you can still install manually:
    1. Download and unpack one of the .zip or .tgz archives to a temporary directory.
    2. Manually copy the contents across to the relevant places in your TWiki installation.
    3. Check in any installed files that have existing ,v files in your existing install (take care not to lock the files when you check in)
    4. Manually edit LocalSite.cfg to set any configuration variables.
    5. Run configure and enable the module, if it is a plugin.
    6. Repeat from step 1 for any missing dependencies.

Some Technical Gobbledegook

This plugin uses a technique called monkey-patching where the plugin replaces a section of the core with some different code. It does this dynamically, so you can install the plugin without needing to change the core. However the monkey-patching technique is very sensitive to changes in the core code. If it stops working after an upgrade, and you have some programming knowledge, then check to make sure the core functions it patches still have the same prototype as in the previous release, and if not, fix the plugin.

Plugin Info

Another great TWiki extension from the WikiRing - working together to improve your wiki experience!

Plugin Author(s): Crawford Currie http://c-dot.co.uk for Escape Studios http://www.escapestudios.co.uk/
Plugin Version: 14778 (08 Sep 2007)
Copyright: © 2007 Escape Studios
License: GPL (Gnu General Public License)
Change History:  
8 Sep 2007 Bugs:Item4211 fixed for 4.2.0
11 Jun 2007 Bugs:Item4237 fixed a couple of corner-cases
8 Jun 2007 Minor bugfixes
6 Jun 2007 First version
Dependencies: None
Plugin Home: http://twiki.org/cgi-bin/view/Plugins/SearchSummaryPlugin
Feedback: http://twiki.org/cgi-bin/view/Plugins/SearchSummaryPluginDev
Appraisal: http://twiki.org/cgi-bin/view/Plugins/SearchSummaryPluginAppraisal

Topic attachments
I Attachment Action Size Date Who Comment
elsemd5 SearchSummaryPlugin.md5 manage 0.2 K 08 Sep 2007 - 09:14 CrawfordCurrie  
ziptgz SearchSummaryPlugin.tgz manage 45.5 K 08 Sep 2007 - 09:13 CrawfordCurrie  
zipzip SearchSummaryPlugin.zip manage 46.0 K 08 Sep 2007 - 09:13 CrawfordCurrie  
elseEXT SearchSummaryPlugin_installer manage 32.0 K 08 Sep 2007 - 09:14 CrawfordCurrie  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo