.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ===================== EXT: PMK Autokeywords ===================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2009-07-18T20:14:10.650000000 :Author: Peter Klein :Email: peter@umloud.dk :Info 3: :Info 4: .. _EXT-PMK-Autokeywords: EXT: PMK Autokeywords ===================== Extension Key: **pmkautokeywords** Copyright 2008-2009, Peter Klein, 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: Table of Contents ----------------- **EXT: PMK Autokeywords 1** **Introduction 1** What does it do? 1 Screenshots 2 **Users manual 2** **Adminstration 3** Enabling the "useautokeywords" checkbox on existing pages 3 Using the autokeywords as META keywords in the frontend 4 **Configuration 4** Reference 4 Special configuration for tt\_news keywords 5 **Known problems 5** **Updates 5** **To-Do list 5** **Changelog 5** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ - This extension generates META keywords for your TYPO3 pages automatically. - Each content element and the page itself is parsed and words are extracted from the textbased fields. (The list of fields to extract the words from, can be configured using Page TSConfig) - The words are then ordered by frequency (so the word that apperars most times, is listed first.) and inserted into the keywords (or autokeywords) field of your page. - Keywords are generated upon saving, updating or deleting content element and/or the page itself. - Once installed, you get a readonly textarea field in the pages table, which holds the META keywords collected from the content of the page. - It can be configured using Page TSConfig, but has a default setup which works in most cases. - If you have a multi-language site, it will add a similar setup to the pages\_language\_overlay table, and collect keywords in the correct language. - Works with or without TemplaVoila installed. - NEW: Now also support autogeneration of keywords on tt\_news records. The setup is similar to that of the pages record.IMPORTANT! Remember to set the constant defining the location of your tt\_news records, otherwise it won't work! .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-1| Screenshot showing the pages record when the The custom "autokeywords" field is used. |img-2| Screenshot showing the pages record when the The original "keywords" field is used. .. _Users-manual: Users manual ------------ - Just install the extension, and choose one of the 2 modes of operation, then the autokeyword generating will be triggered by changes in the textfields defined in the Page TSConfig setup. Default setup is like this: - For "pages", the following fields triggers the the autokeyword generating. “title,subtitle,description,abstract” - For "tt\_content", the following fields triggers the the autokeyword generating. “header,subheader,bodytext” - If you want to enable the autokeywords in the FE, you just include the static template. .. _Adminstration: Adminstration ------------- This extension offers 2 different modes of operation, which is defined in the extension configuration of the plugin. .. _generated: ((generated)) ^^^^^^^^^^^^^ .. _Using-the-custom-autokeywords-field: Using the custom "autokeywords" field. """""""""""""""""""""""""""""""""""""" - A custom read-only textarea field named “tx\_pmkautokeywords\_autokeywords” is added to the pages and pages\_language\_overlay tables. This field holds the autogenerated keywords, and is ALWAYS updated. - A checkbox field named “tx\_pmkautokeywords\_useautokeywords”is added to the pages and pages\_language\_overlay tables. Default is checked. If this checkbox is unchecked, the content of the original keywords field will be used to generate the page META tags in the frontend. (Note that the autokeywords field will STILL be updated!) - **Pros** : You can have both the original keyword field and the autokeyword field, and copy content from the autokeywords to the keywords field. - **Cons** : The original keywords field is empty unless you insert keywords manually. .. _Using-the-original-keywords-field: Using the original "keywords" field. """""""""""""""""""""""""""""""""""" - The original keywords field named “keywords” is used to holds the autogenerated keywords. - A checkbox field named “tx\_pmkautokeywords\_useautokeywords” is added to the pages and pages\_language\_overlay tables. Default is checked. If this checkbox is unchecked, NO autokeyword will be generated. - **Pros** : Keywords is dirrectly accessable for other extensions, like Indexed Search. - **Cons** : It's not possible to edit the keywords field, as the content wil be overwritten each time the autokeywords is updated. .. _Enabling-the-useautokeywords-checkbox-on-existing-pages: Enabling the "useautokeywords" checkbox on existing pages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Go to the Extension Manager and select the PMKautokeywords extension. Then in the selectbox. Select the UPDATE! Item. - |img-3| - You will then be presented with 2 selecteboxes. In the 1 :sup:`st` selectbox you choose which branch of the tree to apply the checkbox changes to. The 2 :sup:`nd` selectbox determines state of the checkbox (checked or unchecked) - |img-4| .. _Using-the-autokeywords-as-META-keywords-in-the-frontend: Using the autokeywords as META keywords in the frontend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - The extension comes with a static template for using the autokeywords as META keywords in the frontend. Just install the static template for “pmkautokeywords” and the META keywords/description tags will be generated on the page. - Two sets of static templates is included, one for each mode of operation .. _Configuration: Configuration ------------- - The plugin is configurable using Page TSConfig. - You can configure which fields to use as base for the keywords, list of stopwords (or file), minimum length of words, maximum number of words and default language. See Reference section for an example of setting the Page TSConfig options. .. _Reference: Reference ^^^^^^^^^ (Page TSConfig) .. ### BEGIN~OF~TABLE ### .. _stopwords-language: stopwords.[language] """""""""""""""""""" .. container:: table-row Property stopwords.[language] Data type string Description Comma seperated list of stopwords. Where [language] is one of the following: default, dk, de, no, it, fr, es, nl, cz, pl, si, fi, tr, se, pt, ru, ro, ch, sk, lt, is, hr, hu, gl, th, gr, hk, eu, bg, br, et, ar, he, ua, lv, jp, vn, ca, ba, kr, eo, my, hi, fo, fa, sr, sq, ge, ga **Example:** :: stopwords.dk= dette,denne,kommer,fire,seks,otte .file (string): stopword file. **Example:** :: stopwords.file.default = fileadmin/stopwords.txt Default .. _maxKeywords: maxKeywords """"""""""" .. container:: table-row Property maxKeywords Data type int Description Maximum number of keywords to add to the autokeyword field. Default 150 .. _minWordLength: minWordLength """"""""""""" .. container:: table-row Property minWordLength Data type int Description Minimum length of words used to generate the autokeywords. Default 4 .. _defLangCode: defLangCode """"""""""" .. container:: table-row Property defLangCode Data type string Description Default TYPO3 language code. This is used for the default language. If your default language is not english you should change this. Possible values: default, dk, de, no, it, fr, es, nl, cz, pl, si, fi, tr, se, pt, ru, ro, ch, sk, lt, is, hr, hu, gl, th, gr, hk, eu, bg, br, et, ar, he, ua, lv, jp, vn, ca, ba, kr, eo, my, hi, fo, fa, sr, sq, ge, ga Default default .. _respectHiddenHeaders: respectHiddenHeaders """""""""""""""""""" .. container:: table-row Property respectHiddenHeaders Data type boolean Description Respect the settings of the header\_layout field? If set, and the header\_layout field is set to “hidden”, the header field will not be used for generating the autokeywords. Default true .. _pageFields: pageFields """""""""" .. container:: table-row Property pageFields Data type string Description Text-based fields in the table “pages”, from which text should be used to generate the autokeywords. Default title, subtitle, description, abstract .. _contentFields: contentFields """"""""""""" .. container:: table-row Property contentFields Data type string Description Text-based fields in the table “tt\_content”, from which text should be used to generate the autokeywords. Default header, subheader, bodytext .. _newsFields: newsFields """""""""" .. container:: table-row Property newsFields Data type string Description Text-based fields in the table “tt\_news”, from which text should be used to generate the autokeywords. Default title, bodytext .. ###### END~OF~TABLE ###### [tsconfig:(tx\_pmkautokeywords)] .. _generated: ((generated)) """"""""""""" .. _Example: Example ~~~~~~~ Here is an example of how to override the default settings, by adding custom Page TSConfig: :: tx_pmkautokeywords { stopwords.file.dk = fileadmin/stopwords_dk.txt defLangCode = dk maxKeywords = 50 minWordLength = 5 pageFields = title,description contentFields = header,bodytext newsFields = bodytext } .. _Special-configuration-for-tt-news-keywords: Special configuration for tt\_news keywords ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To enable usage of keywords from the tt\_news records on the page where you have the tt\_news plugin inserted in SINGLE mode, you need to set a constant pointing to the location of your tt\_news records. The constant is named “news\_pid\_list” and can be set from the Constant Editor. .. _generated: ((generated)) """"""""""""" .. _Example: Example ~~~~~~~ Note: This should be put in the TypoScript CONSTANTS field, not the SETUP field. :: news_pid_list = 12,17 // tt_news records stored in sysfolders with pid=12 & pid=17 .. _Known-problems: Known problems -------------- None that I am aware of. .. _Updates: Updates ------- If you like this extension, please rate it. `http://typo3.org/extensio ns/repository/view/pmkautokeywords/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) For latest version, always check the Forge repository: `http://forge.typo3.org/projects/show/extension-pmkautokeywords `_ .. _To-Do-list: To-Do list ---------- \- Nothing, but if you have any suggestions, drop me an email. .. _Changelog: Changelog --------- - 16.July.2009 - Fixed problem with Update function not working with pages below a shortcut page. Now autokeywords is updated on pages type 1 & 6 (“Standard” and “Backend User Section”) and pages under type 1,4,6,7 (“Standard” , “Shortcut“, “Mount Point” and “Backend User Section”) is processed. (Thanks to Rene Schuster for reporting this.) - 21.June.2009 - Fixed Call-time pass-by-referenceproblem in class.ext\_update.php. (Thanks to Stefano Kowalke for reporting this.) - Fixed the problem with error "NO entry in the $TCA-array for the table "tt\_news". This means that the function enableFields() is called with an invalid table name as argument." which was returned in FE view if tt\_news wasn't installed. (Thanks to Stig Kjeldsen for reporting this.) - 19.April.2009 - Fixed problem with content of table cells getting truncated to one large word. (Thanks to Stefan Hörndlerfor reporting this.) - 18.April.2009 - Added support for autogeneration of keywords for tt\_news records. - 19.Februar.2009 - Added single quotes to the split pattern. This fixes problems with words enclosed in single quotes. (Thanks to Stefan Hörndlerfor reporting this.) - Removed the <> chars from the split pattern as those screwed up and other custom RTE tags (Again thanks to Stefan Hörndlerfor reporting this.) - 23.December.2008 - Cleaned up the typoscript and removed unused files. - 16.December.2008 - Fixed problem with empty page array when used in Workflow environment. (Thanks to Jens Wolters for reporting this.) - 6.December.2008 - Fixed typos in manual regarding the stopword files. I had written it as “stopwords.lang.file”, but it should be “stopwords.file.lang”. (Thanks to Kai Draeger for reporting this.) - The stopword filepath is now parsed through t3lib\_div::getFileAbsFileName(). This should fix problem with relative paths not working. (Again thanks to Kai Draeger for reporting this.) - Added a new config option: “respectHiddenHeaders”. If set then the hidden settings of the tt\_content “header\_layout” field will be respected. (If “header\_layout” is set to hidden, then the header field will not be used for generating the autokeywords.) Feature sponsored by OpenGate ApS. - Improved the UPDATE! Function. Now it can be used to trigger updates on the entire site. (Very useful if you install the extension on a existing website) - - 3.October.2008 - Changed the palettes key from “9” to “pmkautokeywords” to ensure maximum compability with other extensions that might extend the pages palettes. - Converted all double quotes to single quotes. - - 30.September.2008 - Added missing $GLOBALS['TYPO3\_CONF\_VARS']['FE']['pageOverlayFields'] to ext\_localconf.php (Thanks to Mads Brunn for reporting this.) - - 24.September.2008 - Fixed position of comma, so now space is added AFTER comma, and not BEFORE. (Thanks to Stig Kjeldsen for reporting this.) - Enabled the “minWordLength” option, which wasn't active (Minimum word length was hardcoded to 4) - Extension now marked “Stable” - - 26.May.2008 - Changed config name “plugin.pmkautokeywords” to “tx\_pmkautokeywords”, to according to the guildelines in `Page TSConfig `_ . - Added UPDATE! Function in the Extension Manager, for setting the “tx\_pmkautokeywords\_useautokeywords”checkbox field on existing pages. - Fixed problems with duplicate stopwords, by changing the array\_diff\_assoc() function to array\_diff\_key(). (Thanks to Karl Schlicker for reporting this.) - - 13.May.2008 - First version released on TER. |img-5| EXT: PMK Autokeywords - 6 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 433 .. :id: Graphic4 .. :name: Graphic4 .. :width: 499 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 327 .. :id: Graphic5 .. :name: Graphic5 .. :width: 495 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 264 .. :id: Graphic2 .. :name: Graphic2 .. :width: 431 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 220 .. :id: Graphic3 .. :name: Graphic3 .. :width: 502 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102