.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ========== EXT: YATSE ========== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2009-08-19T09:19:39.700000000 :Classification: Yet another TYPO3 search engine :Description: This EXT is a new way of searching your website. Please read the manual carefully. :Keywords: yatse :Author: Mischa Heißmann :Email: typo3.YYYY@heissmann.org :Info 4: :Language: en |img-1| |img-2| EXT: YATSE - Yet another TYPO3 search engine .. _EXT-YATSE: EXT: YATSE ========== Extension Key: Yet another TYPO3 search engine Language: en Keywords: yatse Copyright 2000-2008, Mischa Heißmann, 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.org `_ For further information see: http://www.heissmann.org .. _Table-of-Contents: Table of Contents ----------------- `EXT: YATSE 1 <#1.EXT:%20YATSE|outline>`_ **`Introduction 3 <#1.1.Introduction|outline>`_** `What does it do? 3 <#1.1.1.What%20does%20it%20do_|outline>`_ `Screenshots 3 <#1.1.2.Screenshots|outline>`_ **`Users manual 4 <#1.2.Users%20manual|outline>`_** `Installing the fe\_plugin 4 <#1.2.1.Installing%20the%20fe_plugin|outline>`_ `FAQ 5 <#1.2.2.FAQ|outline>`_ **`Administration 6 <#1.3.Administration|outline>`_** `FAQ 6 <#1.3.1.FAQ|outline>`_ **`Configuration 7 <#1.4.Configuration|outline>`_** `FAQ 7 <#1.4.1.FAQ|outline>`_ `Reference 7 <#1.4.2.Reference|outline>`_ **`Developper's Zone 8 <#1.5.Developper's%20Zone|outline>`_** `1. Indexing the content 8 <#1.5.1.1.%20Indexing%20the%20content|outline>`_ `2. Searching for results 8 <#1.5.2.2.%20Searching%20for%20results|outline>`_ .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ - This extension provides a new way of searching your website. It stores the content of each page into a special table. With a special MySQL- Query, this table is searched in milliseconds. - Searchresults can be grouped by pages, e.g. all tt\_news-results first, then all the rest. - Working only with MySQL 5+ - Please be aware, this version is only developer-version. Make backups, backups and more backups. .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-3| *Image 1: Config of fe\_plugin* |img-4| *Image 2: Searchresults* |img-5| *Image 3: Adding the static template* .. _Users-manual: Users manual ------------ This EXT is divided into two parts. A class using a T3-hook that is responsible for saving the pagecontent into the database A fe\_plugin with searchbox and resultlist. .. _Installing-the-fe-plugin: Installing the fe\_plugin ^^^^^^^^^^^^^^^^^^^^^^^^^ - Download and install the EXT from TER - Go to the root template an include the static template “YATSE - Searchbox” - Go to the page, where the searchbox should be displayed. - Insert a pagecontent and select the plugin “YATSE” |img-6| - Configure the plugin |img-7| - Under **1.** you set the rootpage of your website or the page from which the search should begin. - In point **2.** you can set pages which should show searchresults first. - Finish. .. _FAQ: FAQ ^^^ - Is this extension compatible with the flag “no index” in pagesettings? Yes. Of course! - Will pages be stored, if page is not cached? Yes. It doesn't matter, if page is cached or not. - Can asterisk be used? - Yes please! You can search for Exa\* to get all results starting with Exa... like Examination or Example. If you type \*exa\* the result will contain words like hexadecimal. - See `http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html `_ for all possible searchoperators. .. _Administration: Administration -------------- Some small settings can be done. Read carefully the chapter “Configuration” .. _FAQ: FAQ ^^^ Can I add a searchbox on every page. Will mean: can I add a searchbox via TypoScript? Of course you can. Just add an HTML-object with value ::
.. _Configuration: Configuration ------------- .. _FAQ: FAQ ^^^ .. _Reference: Reference ^^^^^^^^^ Configuration of pi1 .. ### BEGIN~OF~TABLE ### .. _Template: Template """""""" .. container:: table-row Property Template Data type String Description URL to your templatefile Default: EXT:yatse/res/tx\_yatse\_template.html Default .. _result-chars-before: result.chars.before """"""""""""""""""" .. container:: table-row Property result.chars.before Data type Int Description Number of letters before the searchword Default 100 .. _result-chars-after: result.chars.after """""""""""""""""" .. container:: table-row Property result.chars.after Data type Int Description Number of letters after the searchword Default 100 .. _result-strftime: result.strftime """"""""""""""" .. container:: table-row Property result.strftime Data type String Description Formatting the date and time in resultlist. Use the syntax on strftime() in php-ref: `http://de3.php.net/manual/en/function.strftime.php `_ Default %d.%m.%Y .. _result-box-wrap: result.box.wrap """"""""""""""" .. container:: table-row Property result.box.wrap Data type Wrap Description How to wrap the single boxes of the searchresults. Default:
\|
Default .. _result-box-titlewrap: result.box.titlewrap """""""""""""""""""" .. container:: table-row Property result.box.titlewrap Data type Wrap Description How to wrap the titles of the searchresults Default

\|

.. _stats-saveIP: stats.saveIP """""""""""" .. container:: table-row Property stats.saveIP Data type Boolean Description Stats will store the IP of the visitor. Set to 0 to avoid saving. (eg. for German governmental websites) Default 1 .. _CSS-DEFAULT-STYLE: \_CSS\_DEFAULT\_STYLE """"""""""""""""""""" .. container:: table-row Property \_CSS\_DEFAULT\_STYLE Data type Description See setup.txt Default .. ###### END~OF~TABLE ###### [plugin.tx\_yatse\_pi1] .. _generated: ((generated)) """"""""""""" .. _Example: Example ~~~~~~~ Here you would show an example of the stuff from the reference or so: Example for pi1: :: plugin.tx_yatse_pi1 { template = EXT:yatse/res/tx_yatse_template.html result { chars { before = 100 after = 100 } strftime = %d.%m.%Y box { wrap =
|
titlewrap =

|

} } stats { saveIP = 1 } _CSS_DEFAULT_STYLE ( .tx_yatse_highlight { background-color: yellow; } a.yatse_helplink div.yatse_helpbox { display:none; } a.yatse_helplink:hover div.yatse_helpbox { display:block; position:absolute; width: 300px; margin-left: 10px;margin-top: -10px; padding: 4px; border: 1px solid black; background-color: white; font-size: 8pt; } h4.yatse_helpheader { font-size: 10pt; margin-bottom: 6px; } ) } .. _Developper-s-Zone: Developper's Zone ----------------- Here's a short explanation how this ext works. .. _1-Indexing-the-content: 1. Indexing the content ^^^^^^^^^^^^^^^^^^^^^^^ After TYPO3 has rendered all the content and before it is sent to the browser, the plugin will do several steps get the rendered content and remove all HTML-tags, linebreaks and tabs. So we get a pure text-version. check if the page should be indexed or not. If yes check for an entry in database: with the same pid and with the same cHash. if exists: check the content . Is the new content different to the stored or has the pagetitle changed? if yes: update the entry. else: do nothing. else: create a new entry. So the whole pagecontent is stored in one field into the database. The table has a fulltext-index on this content field which can be used for a boolean fulltext-search. .. _2-Searching-for-results: 2. Searching for results ^^^^^^^^^^^^^^^^^^^^^^^^ The plugin (pi1) does nothing else than perform the query :: SELECT *, MATCH (content) AGAINST (\''.utf8_decode($this->cObj->removeBadHTML($this->piVars['sword'], $this->conf)).'\' IN BOOLEAN MODE) AS data FROM tx_noindexedsearch_content WHERE MATCH (content) AGAINST (\''.utf8_decode($this->cObj->removeBadHTML($this->piVars['sword'], $this->conf)).'\' IN BOOLEAN MODE)... .. _3-Hooks-in-YATSE: 3. Hooks in YATSE ^^^^^^^^^^^^^^^^^ The frontend-plugin offers some hooks for manipulation. .. ### BEGIN~OF~TABLE ### .. _YATSE-BeforeFormWrapMarkerHook: YATSE\_BeforeFormWrapMarkerHook """"""""""""""""""""""""""""""" .. container:: table-row Name YATSE\_BeforeFormWrapMarkerHook File / Class class.tx\_yatse\_pi1.php class\_txyatse\_pi1 Parameters $this->markerArray, $this->wrappedSubpartContentArray, $this->conf, $this Description This hook manipulates the markerArrays for the result-output. With this hook you can add your own markers to the template. .. ###### END~OF~TABLE ###### 8 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 273 .. :id: Grafik1 .. :name: Grafik1 .. :width: 377 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :id: Grafik3 .. :name: Grafik3 .. :width: 100% .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 190 .. :id: Grafik4 .. :name: Grafik4 .. :width: 441 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 186 .. :id: Grafik5 .. :name: Grafik5 .. :width: 508 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 345 .. :id: Grafik6 .. :name: Grafik6 .. :width: 475