DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Indexed Search Auto completer

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2009-07-20T10:02:58.210000000
Author:Peter Klein
Email:peter@umloud.dk
Info 3:
Info 4:

Indexed Search Auto completer

Extension Key: pmkisac

Copyright 2007-2009, Peter Klein, <peter@umloud.dk>

Mootools Autocompleter.js Copyright 2007-2009 Harald Kirschner < mail@digitarald.de >

JQuery & Prototype Autocomplete.js Copyright 2008-2009 Tomas Kirda and DevBridge Inc.

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

Indexed Search Auto completer 1

Introduction 1

What does it do? 1

Screenshots 2

Users manual 2

Adminstration 2

FAQ 3

Using PMKISAC with the T3mootools extension 3

Configuration 3

Known problems 4

To-Do list 5

Bugreporting 5

Updates 5

Changelog 5

Introduction

What does it do?

Extends the build-in Indexed Search searchform with an AJAX-based autocomplete feature as seen on Google Suggest and a variety of other places.

As the user type in the searchword, a list will appear containing suggested searchwords along with the frequency count of each word (optional).

Supports multiple Javascript frameworks (Mootools, Jquery & Prototype) Note: As this extension was originally written for the Mootools Javascript framework, there might be options/features not availabel in the JQuery and Prototype versions. (If you want to help extend the Jquery/Prototype functionality, let me know)

Screenshots

img-1 Screenshot showing the progressindicator.

img-2 Screenshot showing the dropdown of matching words.

Users manual

When the user enters some text in the search field, the extension will make a database lookup and return a list of matching words.

Adminstration

Once the extension is installed, you need to include the static typoscript of the extension, in order for the autocomplete script to be activated correctly.

img-3

Add the "autocomplete (pmkisac)" script to the list of selected static scripts.

FAQ

In order for the extension to work, the Indexed Search input field must have an id. In the normal setup it should be:

id="tx-indexedsearch-searchbox-sword"

Also if the “Sections” settings should be used, the settings input field must have the id set as this:

id="tx-indexedsearch-selectbox-sections"

And if the “Language” settings should be used, the settings input field must have the id set as this:

id="tx-indexedsearch-selectbox-lang"

Inside the extension, in the folder “res/template/” folder, you'll find a copy of the default Indexed Search templates, with the above modifications + a small modification to place the progressindicator correctly.

Using PMKISAC with the T3mootools extension

If the "t3mootools" extension is installed, the PMKISAC extension will automatically use the mootools library created from the t3mootools extension.

To create a mootools library that works with PMKISAC, you can use the 3rd option of t3mootools to analyze the PMKISAC javascripts for dependencies, and create the library with the mootools parts you need.

Configuration

All configuration of the extension is done using Typoscript Constants. Use the "Constants Editor" of TYPO3 to change these options.

img-4

((generated))

Reference

- Possible subsections: Reference (TypoScript)

minLength

Property

minLength

Data type

int

Description

Minimum length of word to activate auto completer.

Default

3

maxChoices

Property

maxChoices

Data type

int

Description

Maximum number of suggested words.

Default

10

progressIndicator

Property

progressIndicator

Data type

boolean

Description

Enable progress indicator: If set to 1, a progress indicator (spinner) is shown inside the inputbox.

Default

1

showWordcount

Property

showWordcount

Data type

boolean

Description

Show wordcount: If set, wordcount is shown after the word in the suggested fields.

Default

1

allowMulti

Property

allowMulti

Data type

boolean

Description

Allow multiple lookups: Allow more than one value, seperated by a delimeter.

Default

1

startingWordOnly

Property

startingWordOnly

Data type

boolean

Description

Match start of word only: If set, text must match start of word, otherwise text can also be part of word.

Default

1

useSelection

Property

useSelection

Data type

boolean

Description

Select completed text part.

(Not active if allowMulti is enabled or if startingWordOnly is not set)

Default

1

markQuery

Property

markQuery

Data type

boolean

Description

Mark queried string with <span class="autocompleter-queried">*</span>

(Not active if allowMulti is enabled)

Default

1

autoSubmit

Property

autoSubmit

Data type

boolean

Description

Autosubmit form?: If set, form will be auto submitted after a lookupword has been selected.(Not active if allowMulti is enabled)

Default

1

InheritWidth

Property

InheritWidth

Data type

boolean

Description

Inherit width for the autocompleter overlay from the input field

Default

1

cssFile

Property

cssFile

Data type

string

Description

CSS file for Autocompleter. Leave it blank if you place the CSS in your main stylesheet.

Default

typo3conf/ext/pmkisac/res/Autocompleter.css

cssId

Property

cssId

Data type

string

Description

Id of search input form field.

(Not available via Constants Editor)

Default

tx-indexedsearch-searchbox-sword

sectionInputId

Property

sectionInputId

Data type

string

Description

Id of sections input form field.

(Not available via Constants Editor)

Default

tx-indexedsearch-selectbox-sections

languageInputId

Property

languageInputId

Data type

string

Description

Id of language input form field.

(Not available via Constants Editor)

Default

tx-indexedsearch-selectbox-lang

framework

Property

framework

Data type

string

Description

Javascript framework?:Available values: mootools, jquery & prototype.Note: As this extension was originally written for Mootools, there might be some options not available in the JQuery and Prototype versions.

Default

mootools

[tsref:(cObject).TEST]

Example

It is also possible to activate the extension using Typoscript, using the same parameters as above.

This makes it possible to attach the autocompleter to other inputfields than the default indexed Search input field. This could be Macina Searchbox, or a Typoscript generated searchbox like the one at http://www.typo3wizard.com/en/snippets/cool-stuff-typoscript/ts- based-searchbox-for-indexed-search.html

lib.mySearchbox = USER
lib.mySearchbox.userFunc = user_pmkisac
lib.mySearchbox.userFunc < plugin.tx_pmkisac
# "mySearchbox" is the id of the custom search field
lib.mySearchbox.userFunc.cssId = mySearchbox

page.100 < lib.mySearchbox

Known problems

  • Conflicts with Claus Bruun's Indexed Search AutoComplete (cb_indexedsearch_autocomplete) as it also uses the hook in Indexed Search. (But since both extensions provide the same functionality, there's no point in having both extensions installed.)
  • Probably won't work if you have extensions that uses other JavaScript Frameworks than Mootools, such as Prototype or JQuery. This is not a bug, since this extension was written using the Mootools framework.
  • Contact me if you find a bug.

To-Do list

Nothing. Contact me if you have an idea for improvement.

Bugreporting

If you find a bug, please post it at the PMKISAC bugtracker at Forge. http://forge.typo3.org/projects/extension- pmkisac/issues

Updates

If you like this extension, please rate it. `http://typo3.org/extensions/repository/view/pmkisac/current/rating/ < http://typo3.org/extensions/repository/view/pmkisac/current/rating/>`_

As ratings are the only way I can see if there's an interest in this extension, updates depends on people rating it. (No ratings = No Updates!)

Changelog

  • 1.0.0 First version.
  • 1.1.0 Added support for the language field of Indexed Search (Advanced Search)Cleaned up the manual a bit.
  • 1.2.0 Added support for using inline spinners.Added support for highlighting subpart of word and not just the start.Added autosubmit functionality (Thanks to Christian Ehret for suggesting and testing these features)
  • 1.3.0 Fixed IE6 AJAX errors.Fixed problems with multidomain sites, where searchwords from all domains would turn up in the seach results. (Thanks to Jaco Lammer for reporting this.)Updated internal Mootools js file to version1.2.1Updated Autocompleter script to version 1.1.Updated t3mootools.txt to match the new Autocompleter.jsAdded support for Jquery and Prototype Javascript frameworks. (Note: As this extension was originally written for Mootools, there might be some options not available if the JQuery and Prototype framework is selected.)
  • 1.3.1Added spinner support for jQuery and Prototype versions.Added autosubmit functionality to jQuery and Prototype versions.Added config option to disable inclusion of the JS framework (jQuery and prototype versions)Added info on constants, showing which config options are available for the various JS frameworks.
  • 1.3.2 Added support for multiple words lookup to the jQuery version.
  • 1.3.3 Updated the jQuery autocompleter script to version 1.0.7Fixed problem with Mootools autosubmit option (Bug #3848) Thanks to Sonja Scholz for reporting and providing afix for this.

img-5 Indexed Search Auto completer - 5