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: 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¶
Extension Key: pmkautokeywords
Copyright 2008-2009, Peter Klein, <peter@umloud.dk>
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¶
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¶
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¶
Screenshot showing the pages record when the The custom "autokeywords" field is used.
Screenshot showing the pages record when the The original "keywords" field is used.
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¶
This extension offers 2 different modes of operation, which is defined in the extension configuration of the plugin.
((generated))¶
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.¶
- 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¶
- Go to the Extension Manager and select the PMKautokeywords extension. Then in the selectbox. Select the UPDATE! Item.
- You will then be presented with 2 selecteboxes. In the 1 st selectbox you choose which branch of the tree to apply the checkbox changes to. The 2 nd selectbox determines state of the checkbox (checked or unchecked)
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¶
- 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¶
(Page TSConfig)
stopwords.[language]¶
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¶
Property
maxKeywords
Data type
int
Description
Maximum number of keywords to add to the autokeyword field.
Default
150
minWordLength¶
Property
minWordLength
Data type
int
Description
Minimum length of words used to generate the autokeywords.
Default
4
defLangCode¶
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
pageFields¶
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¶
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¶
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
[tsconfig:(tx_pmkautokeywords)]
((generated))¶
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¶
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.
Known problems¶
None that I am aware of.
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¶
- Nothing, but if you have any suggestions, drop me an email.
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 <link> 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.
EXT: PMK Autokeywords - 6