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.

EXT: Readable name of your extension

Created:2010-02-18T17:33:18
Changed by:David COQUILLET
Changed:2012-03-19T11:13:51
Classification:extensionkey
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:keywords comma-separated
Author:Author Name
Email:your@email.com
Info 4:
Language:en

img-1 img-2 [Smile] Glossary- smile_glossary[Smile] Glossary

[Smile] Glossary

Extension Key: smile_glossary

Language: en,fr

Keywords: frontend, glossary, definition, replace

Copyright 2000-2011, Smile, <typo3@smile.fr>

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

Table of Contents

[Smile] Glossary 1

`Introduction 3 <#__RefHeading__708_1332002233>`_

What does it do? 3

`Configuration 4 <#__RefHeading__1441_1621881556>`_

Install extension 4

Configure Extension 5

`Users manual 6 <#__RefHeading__714_1332002233>`_

Creating Words 6

Adding glossary plugin to a page 7

Screenshots 9

Frontend plugin : 9

Special Thanks 10

TYPOSCRIPT Configuration 11

Disable replacement on one page 12

Use Keywords for search engine optimization 13

RealURL Configuration example 14

`Known problems 15 <#__RefHeading__730_1332002233>`_

`To-Do list 16 <#__RefHeading__732_1332002233>`_

`ChangeLog 17 <#__RefHeading__734_1332002233>`_

Introduction

What does it do?

  • This extension allows to create Word records, and see them in a frontend plugin “glossary”. The extension can even allows to parse cached content for defined words and replace them with a link pointing towards the glossary.
  • Caution : for the tooltip (see the screenshots) to work, the extension need jQuery to be included. The tooltip can be disabled otherwise.

Configuration

Install extension

img-3

  • Download .t3x file, and import it in the extension manager, then install it,

  • Execute the database modification to add the Words items :

    img-4

  • Clear the cache

Configure Extension

The extension allows to parse cached content for defined words and replace them with a link pointing towards the glossary.

To get this functionality working you will must configure it using the Extension Manager:

img-5 Do not forget to press the “update” button

Mandatory
  • Enable glossary : this is mandatory for the content parsing to work. If not checked the content won't be parsed and words will not be linked to glossary.

  • Tag use to wrap content to parse : This tag has to be be placed in the HTML template where you wish the crawler to parse.For example, place it a the start and end of you central content column.

  • Theses markers <!-- ###SMILE_GLOSSARY###--> are removed by the plugin.

    Example :

    <div class=”content”>

    <!-- ###SMILE_GLOSSARY### begin -->

    [...page content..]

    <!-- ###SMILE_GLOSSARY### end -->

    </div>

Optional
  • Max replacement in a page : maximum number of word replacement in a page.
  • Max replacement for a word, in a page : same, for a word.

Use extension's CSS : disable if you don't want to use the extension's CSS.

Users manual

Creating Words

//Using list mode, placed in a SysFolder, you can create a new type of records : Words.

Create a sysfolder in list mode wherein you can create a new type of records : Words

img-6

Tags items include following fields :

  • Language : Word's language, will allow to create a tag twice, with different values, according to the language
  • Hide / Start date / End date : Allow to completely disable word, or give him a start date (hidden before the date) or/and end date (hiddden after the date) ,
  • Word : Word to search for in content, that will appear in the glossary
  • Aliases : Aliases for the word, which will point to original word's definition. One per line.
  • URL rewrite alias : Will allow to have a nice URL rewrite on links to definitions. See example configuration in following chapter.
  • img-7 Keywords : not used by the extension, but can be used to build page keywords See TYPOSCRIPT example in the following chapter.

Adding glossary plugin to a page

Once you've created words, you can consult them with the glossary plugin.

You can add the plugin by adding a new content on a page. Choose the content type “Glossary” in the plugin section:

img-8

You must configure the plugin using the flexform:

img-9

  • Starting point : Sysfolders containing the words.
  • LetterBar Layout : Define composition of the letterbar that will appear on top of your glossary.
    • Letters: displays the whole alphabet.
    • Numeric: is used for word starting with figures. It displays figures, from 0 to 9, each with a different link.
    • Numeric (grouped): is used for word starting with figures. It displays figures grouped under a [0-9] link.
    • Symbols: is used for word starting with symbols ($,&, etc). It displays every symbol used by at least one word, each with a different link.
    • Symbols (grouped): groups all the symbol word under a [ . ] link.

Example of LetterBar layout with Letters , Numeric grouped and Symbols grouped :

img-10 Example of LetterBar layout with Letters and Numeric :

img-11

Screenshots

Frontend plugin :

img-12

Replaced word, with a tooltip appearing on hover

img-13

Special Thanks

This development was made possible thanks to Poweo (http://www.poweo.com). Thanks to them.

TYPOSCRIPT Configuration

Mandatory

If you enabled content parsing (link to glossary), you must define the following value in your TYPOSCRIPT template:

- glossary_page_uid : Page where the glossary plugin is placed.

Example :

plugin.smile_glossary {glossary_page_uid = 84}

Optional

You can also change other Typoscript constants :

Extension configuration :

  • wordsPid : List of folder(s) which contains word to look for. If not specfied, all words will be searches for.
  • crop : configuration is the same as stdWrap crop. Format is “length | string”.Definition will be cropped to this length. If cropped it will be appended by the second string.Example: 100 | ...
  • parseFunc : RTE parsing function used for description.
  • template : template for the link which replaces words.
  • templateTrim : will trim space from the above template before use. Useful to avoid white spaces.
  • JsFile : Javascript file for tooltip building, if not set, will use default JS
  • cssFile : CSS file for tooltip design, if not set, will use default CSS

Example:

plugin.smile_glossary {

glossary_page_uid = XXX

words_pid = 83,55,47

crop = 150|...

parseFunc = lib.parseFunc_RTE

template = EXT:smile_glossary/res/glossary_link.html

templateTrim = 1

jsFile = path/to/tooltip/javascript

cssFile = path/to/tooltip/css

}

Plugin configuration :

  • template : Template for the glossary plugin
  • enableLocale : Enable the use of localisation
  • hideNoneTranslated : Hide records with no translation for the current language.
  • string.symbolGroup : Name for the symbol group, default value “.”
  • string.numericGroup : Name for the numeric group, default value “0-9”

Disable replacement on one page

You can easily stop the word replacement in a specific page.

In a page “Properties” just check the disable automatic links to glossary.

img-14

Use Keywords for search engine optimization

You can use the Keywords defined in the word items, with a similar Typoscript :


# Build the meta tags : keywords


lib.keywordstag = TEXT

lib.keywordstag.field = keywords

[globalVar = GP:tx_smileglossary_pi1|word > 0]

lib.keywordstag >

lib.keywordstag = COA

lib.keywordstag.10 = TEXT

lib.keywordstag.10.field = keywords

#lib.keywordstag.10.wrap = |,

lib.keywordstag.20 = RECORDS

lib.keywordstag.20 {

dontCheckPid = 1

tables = tx_smileglossary_word

source.data = GPvar:tx_smileglossary_pi1|word

conf.tx_smileglossary_word = TEXT

conf.tx_smileglossary_word.field = keywords

}

[global]

RealURL Configuration example

If you are using RealURL, you can easily configure a URL rewrite according to the URL aliases you've defined in the words records.

To do so, in your RealURL array configuration ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']),you can add the following example :

'postVarSets'=>array(

// Smile Exemple - begin

'word'=>array(

array(

'GETvar'=>'tx_smileglossary_pi1[word]',

'lookUpTable'=>array(

'table'=>'tx_smileglossary_word',

'id_field'=>'uid',

'alias_field'=>'word',

'addWhereClause'=>' AND NOT deleted',

'useUniqueCache'=>1,

'useUniqueCache_conf'=>array(

'strtolower'=>1,

'spaceCharacter'=>'-',

),

),

),

),

// Smile Exemple - end

Known problems

If you encounter problem or a bug using this extension, feel free to contact us at typo3[at]smile.fr

To-Do list

If you have any ideas to improve this extension, feel free to contact us at typo3[at]smile.fr

ChangeLog

1.0.0

Version

1.0.0

Changes

Initial extension publishing

img-2 17