EXT: news

Extension Key: tt_news

Copyright 2000-2007,
Rupert Germann, <rupi@gmx.li>,

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: news	1

Introduction	1

What does it do?	1

Screenshots	3

Users manual	8

Installation	8

How to update:	9

Quick start:	11

The tt_news content element	14

The tt_news database-record	18

Categories	20

The tt_news category manager	23

The tt_news_cat database-record	24

The category menu (CATMENU)	25

The SINGLE view	27

The Archive	28

The Search	29

Version Preview	30

Troubleshooting	30

Administration	32

Link Configuration	32

34

User TSconfig	35

Page TSconfig	35

The Rich-Text-Editor	35

Rights & Permissions	37

Caching	38

Configuration	39

Files:	39

Reference	41

TypoScript Examples:	60

Registers	62

RealUrl and SimulateStaticDocuments	63

Date and Time formats	65

Multilanguage News	66

XML feeds from tt_news	69

Extending tt_news	72

List of tt_news add-ons	72

Sponsoring tt_news development	73

Known problems	73

To-Do list	73

Changelog	73

Introduction

What does it do?

Extension for displaying and managing news.

Features:

3 types of news items: standard news articles, external links and links, pointing to internal pages.

Full multilanguage support with TYPO3 since version 3.7.0.

News-articles can be related to each other and/or to internal pages. If two news articles are related, the link back to the source article is inserted automatically.

The view of the complete news article (single view) can be splitted to multiple pages. Pagebreaks can be inserted manually by a userdefined “pagebreak token” or after a certain amount of words.

All types of mediafiles can be assigned to news-articles.

Very flexible news content-element with the following functions: List, Latest, Archive-menu, Single-view, Search, a menu from nested categories (CATMENU) and a special kind of single view: the “version preview”.

The appearance of the news plugin on the website can easily be changed by editing the html-template.

2 different html templates included: A table-based template which is kown from older tt_news versions and a new CSS-based template (see screenshots below).

News-categories, that can be assigned to news (multiple selections possible). Categories can also be nested to each other. News can be selected (or de-selected) for display by their categories or parent-categories.

New in version 2.5.0: If the extension xajax is installed, the category trees in BackEnd forms can now be expanded and collapsed. If you have a huge category tree this will speed up the rendering of the tree significantly.

New in version 2.5.0: “tt_news category manager” a BackEnd module for managing news categories (located under Web->Info). It shows the complete category tree - of course expandable and collapsable - and offers drag and drop for moving and copying news categories.

Category-images and category-titles can act as link to a specific page or function as category-selector.

The Single view of an article can show a list of news, having the same categories assigned as the current article.

In the BackEnd categories can be used to configure the editing permissions for news records. A list of allowed categories can be configured for a BackEnd usergroup. If a member of this group tries to edit a news record that does have at least one category assigned that is not in this list saving of the record will be disabled.

Internal search function with configurable “search fields” (can be combined with the category-selector function to filter results by categories).

“Editlock”: By activating the checkbox “Restrict editing by non-Admins” a news record can be locked for editing by non-admin users.

“Automatic archiving”: After a given number of days has passed, news are automatically in the archive, no need to set an archivedate manually for each item.

Supports caching and Indexing: If caching is enabled news-articles are indexed by the extension “indexed search”.

Supports “direct preview”: When the “save & view” button in a news record (in the BackEnd) has been pressed the “single view” of this record will be opened on the website. (see section “Page TSconfig”)

Several possibilities to add user-defined scripts to process the output of the extension f.e. to add your own markers and templateparts. (-> see sections “Configuration/files” and “Extending tt_news” for some examples)

Supports export to the following XML-feed formats: RSS 0.91, RSS 2, RDF Atom 0.3 and Atom 1.0.

Supports versioning for news records (TYPO3 > 3.7.0 & MySQL 4.x required). “Versioning preview” is supported with a special mode of the tt_news content element (VERSION_PREVIEW) which will be available if the extension “version” is installed.

“Context sensitive help” (CSH) for all fields in the tt_news and tt_news_cat BackEnd forms.

Support for workspaces (TYPO3 4.0 required)

Compatibility

This version of tt_rews requires at least TYPO3 3.8.0 to run, some features require TYPO 4.1 which is recommanded to use.

WARNING !! Do not install this tt_news version on TYPO3 prior to version 3.8.0 because it requires features that are not present in older TYPO3 versions. Don't even try it, because it might break your TYPO3 installation!

The rich-text-editor rtehtmlarea which is shipped with TYPO3 as a system extension collides with the ajax functionality of the tt_news category in TYPO3 versions < 4.1. For this reason the expand/collapse feature is disabled for the category tree in tt_news records in TYPO3 < 4.1 when rtehtmlarea is enabled.

PHP version: tt_news should work on all PHP versions that are also supported by TYPO3 (from 4.1.2 to 5.2.x).

Note: If you use PHP 5.2.0 on your server you'll need TYPO3 4.1 – This PHP version contains a bug that causes PHP to crash when you edit a tt_news content element. TYPO3 4.1 contains a workaround for this bug. For more info see: http://bugs.typo3.org/view.php?id=4678

MySQL version: 3.23, 4.x and 5.x. If you want to use tt_news with the extension “Versioning Management” (extkey: version) at least MySQL 4.0.18 is required:

Cited from the TYPO3 3.7.0 release announcement (24/09/2004):

“...- DO NOT use the new "version" extension if you are running a MySQL version below 4.0.18! If you do a bug in MySQL will mess up the "Next Autoindex" of tables in the database meaning that unique IDs are raised to nearly 2 billion and you will get a lot of trouble. This is NOT a bug in the versioning extension, but a problem with MySQL which seemingly is fixed in versions only above 4.0.18”

Screenshots

List View & Archive-menu:
News extension in a two column design, showing the Archive-menu (AMENU) in the left column and the “LIST” view in the normal column.

Latest news:

Search-Form:

Single View:
For news with type “normal news” the single view shows the full article with related news, links and - not in this image - attached files and “related news by category”.

The category menu (CATMENU)
The catmenu offers two different render modes. The left image shows the catmenu in mode “nestedWraps”, the middle and right catmenu are working in mode “tree”. The right one uses userdefined icons (See section “The category menu”)

News Database record in BackEnd:
The editing form is divided in two sections (Tabs) “General” and “Related”. Here you see all possible fields, including the secondary options. Of course it is possible to hide some fields. So the editors see only e.g. “datetime”, "title" and "bodytext".

News Category Manager
Since version 2.5.0 tt_news has a BackEnd module for managing news categories (located under Web->Info). In this module you can edit, copy, move, hide and delete categories. Moving and copying can also be done by drag&drop (TYPO3 4.0 or higher required).

Users manual

Installation

WARNING !! Do not install this tt_news version on TYPO3 prior to version 3.8.0 because it requires features that are not present in older TYPO3 versions. Don't even try it, because it might break your TYPO3 installation!

Install the extension with the extension manager. If you already use an older version of tt_news that's installed in the “global” location (typo3/ext/), it's recommended to install the new extension in the “local” folder (typo3conf/ext/) without overwriting the old one. In case something fails you'll have thereby a possibility to re-establish the original installation state from where you started the update.

For further information about upgrading an existing tt_news installation to a newer one, see section “How to update”.

Important: Deactivate all extensions that depend on a prior version of tt_news (<1.4.0)

After the extension manager created the new database tables and fields for tt_news you should see a page with the main configuration options. Here you can configure some basic options (mostly BackEnd related).

Handling of Categories

You can configure the handling of news-categories with a checkbox in the extension manager:

The default is, to display categories only from the “General record storage page”. For more Information about categories and the “General record storage page” have a look at the “FAQ” in section “Quickstart”.

Tab-Dividers

“Dividers to Tabs” is a feature introduced with TYPO3 3.7.0 which divides the BE form of a news record to smaller parts (“Tabs”) see screenshot in the section “Screenshots”. Here you can disable this if you don't want to use it.

Labels in List Module

You can configure which field is taken as label in the web/list module. Default is to display the title as label but you can change it f.e. to the date field (datetime) if you want to see the datetime as title.

The other options configure the alternative labels which will be shown if the title is empty. If the first alternative label is also empty, “Alternative label 2” will be displayed instead. If “Force alternative label” is activated the alternative labels will be shown always, even if the label field is not empty.

Example:

The author field is configured as “News label”, the title field is the “Alternative Label” and the datetime field is “Alternative Label 2”. Now the titles in lists will look like this:

Localization settings

Localization mode for text fields
By default, all text fields (text, subheader, imagecaption ...) from a new localized news article will be prepended with "[translate to ...]". If this is not wanted you can disable it here.

Localization mode for images
The image field of a localized news article is excluded by default (images are alwas taken from the record in the default language). If you need localized images (f.e. if the images show texts) you can enable the "image" field in translated news by setting "l10n_mode_imageExclude" to 0.

Hide new localizations
By default, all text fields (text, subheader, imagecaption ...) from a new localized news article will be prepended with "[translate to ...]". If this is not wanted you can disable it here. If "l10n_mode_prefixLangTitle" is disabled the text "(copy [#])" will be added to the titles of this records unless "prependAtCopy" is disabled (see "prependAtCopy").

Prepend at copy

Here you can disable adding of the text "(copy [#])" to titles of copied records.

Category form fields

Category ordering in BackEnd trees
Here you can configure the the ordering of categories in the category tree in BackEnd forms.

Width of the left category field
This field shows the selected categories in the tt_news db-record (or parent categories in the category db-record). If "categorySelectedWidth" is set to 0 (zero) the default width (=180px) will be taken.

Width of the right category field
This field shows the category tree in the tt_news db-record (or in the category db-record). If "categoryTreeWidth" is set to 0 (zero) the default width will depend on the browser which displays the TYPO3 BackEnd. The default width for all browsers except IE is 280px, for IE the default width is 320px to suppress the unneeded horizontal scrollbar below the category tree.

Max height for category trees
Here you can configure the maximum height of category trees in BackEnd forms. If you have xajax enabled for the expandable category tree, set this value to 30 because the height of the tree field will then be adapted to the tree height automatically.

How to update:

If you upgrade your tt_news extension from a prior version (< 1.2.x), its required to use the “UPDATE!” function to synchronize table data.

The Updater does two things:

it transfers the content of the field “CODE” (e.g. LIST//1) from the old content element to the new flexform based parts of the content element

it creates relations to the categories in a new relation table (tt_news_cat_mm).

To perform this action, open the extension manager and click on the tt_news extension:

then click on the dropdown menu in the upper right corner and choose "UPDATE!"

If you don't see the option named "UPDATE!" the updater didn't find anything to update.

The update script will inform you about what it is going to do by showing the number of items found to be updated.

Note: This action will not change your old data in the tt_news or tt_content table. So even if you perform this action, you will still be able to downgrade to an earlier version of tt_news retaining the old category relations and CODE field data.

Just click the "DO IT" button to perform the update.

FAQ

Q: can this update-script update the tables and fields of any version of tt_news to the current one?
A: No. First thing to know: from which version of tt_news do you upgrade to the current version?

case 1: If you upgrade from the "classic" 1.0.4 version without any other news-extension installed, you can use the updater and all should be ok. :-)

case 2: if you upgrade from a tt_news version 1.0.x with one of the news-extensions installed that provides the "multiple categories"-feature, the updater will only update the content elements to flexforms but won't touch the category relation-table because its already present.

case 3: if you upgrade your tt_news extension from a version higher than 1.2.0 the updater will find data in the flexforms fields and also a category relation table. In this case the option "UPDATE!" won't appear in the extension manager.

Q: after updating my tt_news version (< 1.2.0) to the new tt_news version I don't see my old settings in the fields "Starting point" & "recursive". Is this a bug in the updater?
A: No. Your old settings are still present and they work. If you set a new "Starting Point" in the Flexform field, this value will have priority over the old "invisible" value.

Q: I upgraded my tt_news version 1.0.x to the current version and don't see the “UPDATE!” option in the dropdown menu in the extension manager.
A: This happens, a) if you look in this menu directly after clicking the “Click here to install the extension” link in EM. Reload the page or choose any other option from the function-menu, and then look again in the menu.
or b) if there is any data found in the table “tt_news_cat_mm”. This is the case, if you had an extension installed, that adds this table to tt_news 1.0.x (f.e. “News multiple categories” ext-key: dkd_newsmulticats).

Quick start:

This section will give you a short overview about the basic setup requirements for tt_news to work. For more detailed informations you can have a look in the sections “Configuration” and “Administration” in this manual.

Include static extension templates

*** Important Note ***
There is one major change between tt_news 2.x and older tt_news versions: In tt_news 2.x the default TS-template is not included automatically. That means, if you don't include the TS-template as shown in the screenshot below, the plugin will do nothing.

The TS-settings are splitted in 4 different parts now which you should be included with the “Include static (from extensions)” feature. The big advantage of this technique is, that the extension is not included in all TypoScript setups from your site by default. You can now choose if you want to include only the basic setup or to include the CSS-based setup, the default CSS-Styles and the RSS-feed feature.

For the first test, open your main TS-template (in list view), scroll down to the “Include static (from extensions)”-section and include one of the “base” templates from tt_news, f.e. the “table-based tmpl”. If you dont't know how to do this -> see section “Templates” in the “Getting Started” document: http://typo3.org/documentation/document-library/tutorials/doc_tut_quickstart/0.1.0/view/1/9/

If you want to use the CSS-based HTML-template you you should include the “default CSS-styles” template too, because it contains all the formating information.

The 4 static ext-templates offer you the following settings:

CSS-based tmpl: includes all tt_news TS settings for the new css-based template (but no ccs default styles)

default CSS-styles: This are the CSS-style definitions for the CSS-based template.

table-based tmpl: This are the settings for the table-based tt_news template (with global wraps, global colors and <font> tags) including this template together with the css-based templates will work but it will not make much sense.

News-feed (RSS 0.91, RSS 2 , RDF, Atom 0.3, Atom 1.0): Include these settings if you want to enable XML feeds from your page.

Save your TS-template and open or create a page, where you want the news to appear.

Creating a “news” content-element:

Click on the "create new record" link, to add a new content-element. In the next screen click on the wizard link under “Pagecontent”.

The page that now openingis called the “new Content Element Wizard”. At the bottom of this page you'll find an icon called “News”':

Select it and choose the position (column): eg NORMAL:

A form will show up looking almost like this:

It is required, to select at least one item from the "What to display" field. If you don't do this, an error message will appear instead of the news content-element. To select an item, click on its name in the right list. (For the first test choose “LIST” or “LATEST” and leave the other settings at their defaults)

The “Startingpoint” is the page/sysfolder, where the extension looks for news-records. It is not required to set this value in this field, you can also define it with TypoScript for the whole page.
See: section “Configuration/Reference” in this manual (-> pid_list)

If you don't insert a page as “Startingpoint” and no value for “pid_list” is defined by TS, the current page is used. That means the news-extension looks for news-records in the same page where the content-element is.

Creating a news database record:

To test the functionality of the extension you'll also need at least one news-record. Save & Close the form for the News content-element and click again on the "create new record" link.
Choose the "News" item from the list.

A form opens, showing a news database record:

Fill in some dummy information, uncheck the "Hide" checkbox and save & close the form.

Assuming that you did not set a "Startingpoint" in the news content-element, and that the newly created news-record is located in the same page as the news content-element - click on the preview icon and you should see your news article in your browser.

If this is not the case, repeat the steps above. If still no news appear on your website, have a look in the section "Troubleshooting" of this document.

The tt_news content element

There are many ways to configure this extension. This will just get you started. For detailed configuration options take a look at the parts “Administration” and “Configuration” in this manual.

There are currently 4 option-sheets in the tt_news content element ("General Settings", "Template", "Category Settings" and "other settings"). First we will concentrate on General Settings because all of the required options are located in this sheet.

Notice: Most of these options can also be controlled by TS, but the settings made directly in the content element will override TS settings.

Sheet: General Settings

What to display:

Currently there are 7 different options in the “What to display” field (this list can be extended by other extensions). These are the function of this options:

FIELD: What to display	Description:
LIST	Displays a list of news.
LATEST	List the latest news. By default this is not just another “LIST” template. It lists only non-archived new-records, and it is not influenced by the archive menu selection. (This behaviour can be changed by setting “displayArchivedInLatest” to 1 -> then LATEST will act like a normal LIST)
AMENU	Displays a menu of the archive divided into time periods. See section “The Archive”.
SINGLE	Displays a single news item. See section “The SINGLE view”.
SEARCH	Displays a search box and result listing for searching news. See section “The Search”.
CATMENU	Displays a category selector which shows nested categories in a hierarchical menu. See section “The category selector”.
VERSION_PREVIEW	Displays the version preview for news articles. Basically it does the same as the SINGLE view but it displays only something when a version preview was requested.This option appears only when the extension “version” is installed. see section “version preview” for mor information.

It is possible to define multiple “What to display”-codes in a news content-element, but some of them will not work well together. If you encounter problems with those combined content-elements, try to split them in single elements with one code per element.

"Order by" this field (LIST & LATEST):

In this selectbox you can choose the field by which the listed news-records should be ordered. Possible options are: datetime, archivedate, author, title, type and “randomise order”.

default (= nothing selected) is to order lists by the “datetime” field and display newest items first.

With the selectbox “Ascending or Descending” you can choose the sorting order.

If you want to order or group your news by fields, not listed here, you can do this by setting those fields by TypoScript. See section “Reference“ -> “listOrderBy” and “listGroupBy”

The special case “randomise order” orders the news by random.

Hint:

If you use randomly ordered news, it is required that tt_news works as USER_INT object or caching disabled.

Add this to the TS setup of the page where you want to display rendom news:

plugin.tt_news = USER_INT

f this page is on the first level of the pagetree all pages below this page will also display tt_news as USER_INT object which consumes much more processing power than a USER object which can be cached.

This can be prevented by using the 'template on next level' feature to set tt_news again to USER.

plugin.tt_news = USER

Category selection:

The display of categories in the right field of the part “Category Selection” depends on two settings:
If you didn't change the default value of the “use StoragePid” switch in the plugin-configuration in the extension manager, it is required to define a "General Record Storage page" in the page-properties of the rootpage (the page with the “is root of the website” flag).

The "General Record Storage page" points to the folder where the tt_news categories are stored. See “FAQ” for more information.

If you set the “use StoragePid” value to “0” in the extension manager, you should see all categories from the whole pagetree in the select box.

It's possible to select newsitems for display by their assigned categories or subcategories. A newsitem can be member of multiple categories. It's also possible to de-select news by their assigned categories of to display only non-categorized items. The “Category mode” selector offers the following options:

FIELD: Category mode	Description:
Show all (don't care about selection below)	Displays all news no matter which categories are assigned. (Don't care about the field: Category selection)
Show items with selected categories (OR)	Only news are displayed, which have at least one of the selected categories or subcategories assigned (FIELD: Category selection). If there are more than the selected categories assigned to the news record it will be shown also.
Show items with selected categories (AND)	Only news are displayed, which have all of the selected categories or subcategories assigned (FIELD: Category selection)
Do NOT show items with selected categories (AND)	News which are members of all of the selected categories or subcategories (FIELD: Category selection) will not be displayed.
Do NOT show items with selected categories (OR)	News which are members of at least one of the selected categories or subcategories (FIELD: Category selection) will not be displayed.

Use subcategories

With this switch you can configure if news items are also selected by their subcategories.

Archive setting (for LIST):

It is possible to give each news record an “archive date”. It is also possible to handle news-items automatically as archived, if they are older than a certain number of days. -> see: Section "The Archive” and the part “Archive Settings” in section “Reference”.
(“for LIST” means, that the archive mode is only selectable for the “LIST” view. “LATEST” is by default never showing archived items -> can be changed with “displayArchivedInLatest”)

“Archive setting” gives you these options:

FIELD: Archive setting	Description:
Don't Care	Show all newsi no matter if they are archived or not.
SHOW ARCHIVED	Show only news which have reached their archive date
SHOW NONARCHIVED	Show only news which have not reached their archive date.

Starting point and Recursive level selection:

"Starting point" is used to tell the extension where the news records are stored. It is possible to select multiple ”Starting points”. This way, you are able to collect news from several folders to display them in one content-element.

If you don't insert a page as "Starting point", tt_news will look for a value for “pid_list” from TypoScript. This is the recommended way to configure many news content-elements from one central point, e.g. from the constants field in your main TS-template. -> see files EXT:tt_news/static/ts_new/constants.txt & EXT:tt_news/static/ts_new/setup.txt for examples. The “Starting Point” can also be set in the Constant editor.

If no value for “Starting Point” is present at all, the current page is used. (the page where you inserted the tt_news content-element).

Recursive level selection:

This tells the extension how many levels of subpages to include below the page(s) given in the "Starting point" field.

Hint
If you have your news not stored in a few dedicated sysfolders but scattered around in a huge pagetree it might be helpful to disable the pid_list/recursive functionality completely (see: “dontUsePidList”). Reason: TYPO3 checks each page in the pid_list for visibility and if the current FE user is allowed to see this page. When you have a very long pid_list which is generated from a whole pagetree this will take quite a lot processing power.

Sheet: Template

In the sheet Template, you can overwrite the html-template defined globally by TypoScript with another one.

It is not required to define a template in this place, because in most cases several news content-elements under one pagetree use the same html-template. This can be defined directly in the TS-setup or in the Constant-Editor of your main-(TS)template.

Hint
The best way to include your own html-template is to link it directly in TS. Add the following line by hand to your TypoScript setup or edit the default value in the “TypoScript Object Browser”:

plugin.tt_news.templateFile = fileadmin/templates/tt_news_template.html

Do not edit and save the html-template in the extension directory -> it will be overwritten if you update tt_news.

You can change the news display, by simply creating a new template-file for the display of news. There are 2 default template-files included in tt_news (in the folder EXT:tt_news/pi/):

tt_news_v2_template.html: the new css-based html-template.

news_template.tmpl: the table-based template.

The main differences between the new css based template and the “traditional” template are:

In the new template, the visual formating is moved from TypoScript to css-styles. GlobalWraps, GlobalColors and many of the Wraps (like “title_stdWrap”) are not used anymore.

TypoScript still plays a big role in configuration for processing parts of the output (f.e.:”age_stdWrap”) or for inserting all kinds of conditional wraps (see: “getRelatedCobj” for an example)

if you want to change the template, take a look at that file, make a copy of it and modify it to your own design. Observe the comments in the file - they are markers that define where content is inserted and which parts are used for this and that. Self explanatory to a certain degree...

Max Width/Height for images

These 2 fields offer you the possibility to set the image sizes for a certain content element different from the image sizes defined globally by TypoScript. The setting here will be applied to all images, displayed by this content element (works with: LIST, LATEST, SINGLE and SEARCH)

Sheet: Category settings

The sheet “Category settings” offers a range of options regarding how to display category-texts (titles) and category-images.

The default setting is “Use the settings from TS” which is “Display but no link” for images and texts.

FIELD: Category Image Link Mode, Category Text Link Mode	Description:
Use the settings from TypoScript	You can set the options for displaying category images and texts also by TS but this values are only recognized if this option is selected. See “catImageMode” and “catTextMode” in the Constant editor.
Don't display at all	No category images/texts will be displayed
Display but no link	Category images/texts will be displayed but not linked
Act as link to category shortcut	Category images/texts will be displayed and function as a link to the page given as category shortcut.
Act as category selector	Category images/texts will be displayed and function as category selector. -> useful for filtering search results

Other Category settings:

FIELD:	Description:
Max width of category image	Maximum width of category images. If one dimension of the image is larger than the given width or height, the image is downscaled.
Max height of category image	See above
Max number of category images	here you can limit the number of displayed category images
Max number of categorys texts	Same for category texts

Sheet: Other settings

PageId for single news display:

This tells the extension on which page the single view is located. It's not required to set a value here, cause it's more efficient to set a global value for the single view (singlePid) in the constant-Editor of your root template. See: “Configuration”

PageId to Return to:
Here you can set an alternative page for the "back to list" link in the single view. Works of course only if the current content element is SINGLE. By default the “back to List” Link in the SINGLE view points to the page where you came from. The setting here will override a globally given “backPid”.

Don't display first image in single view (firstImageIsPreview):

If you set this checkbox, the SINGLE view will not display the first image atached to the news article. The first image will only appear in LIST and LATEST view and is handled as "preview image" of the news item.
(works only if more than one image is atached to the news article).

You can force this behavior even when only one image is assigned to the news record by checking the next checkbox (forceFirstImageIsPreview)

List StartId: Force LIST or LATEST to start from this item [deprecated]

with this option (and “limit”) you can realize complex combinations of news content-elements, by giving each item its own offset from the first result.

Example:

Let's assume you want to realize a page that looks like this:

the first (red) content element is configured to show one item (limit=1). The “listStartId” is empty, so it shows only the very first result.

the second (purple) content-element shows also only one item (limit=1) the “listStartId” is set to 1 (because the counting starts with zero). The image in this content element is set to a smaller size than the first content-element.

the two other content-elements (green) are both limited to show 4 items, the left one starts with “listStartId” set to 2, the other one starts with listStartId=6

(thank goes to Paolo Nugnes for sponsoring this feature)

Hint

Since tt_news 2.5.0 “listStartId” is deprecated because the new TS option “excludeAlreadyDisplayedNews” does the same without the need to configure the listStartId for each content element. If you f.i. Want to get a news layout like shown in the image above simply place 4 news plugin content elements on the page, configure the limit for each plugin and add the following line to your TS setup:

plugin.tt_news.excludeAlreadyDisplayedNews = 1

If "excludeAlreadyDisplayedNews" is enabled "excludeLatestFromList" and "listStartId" will be ignored.

Limit: max items in LIST and LATEST

here you can set a limit only for this content-element. A value from this field will override the limits configured by TypoScript.

Don't display Pagebrowser

as the name says.

Insert pagebreak in SINGLE after this number of words

If you want to override the globally configured value for “maxWordsInSingleVIew” in the current content-element, you can insert the new value here. For more information see section “Pagebreaks” in this manual.

The tt_news database-record

Field descriptions:

Title

The value inserted here will subsitute the marker ###NEWS_TITLE### in the html template.

Type

Here you can define the type of the newsitem. The different types are shown with different icons in the BackEnd. Possible types are:

	News	This type is used for normal news articles. Only these news will have a link to a single view.
	Link External page	These news records are only showing in list views (= LIST and LATEST). The links from these news records will point directly to the URL which is configured in the field “External URL”.
	Link internal page	These news records are also showing only in list views. The target for these links is configured globally in the Constant editor (advanced->target for internal links)

Restrict editing by non-Admins

If this “editlock” is enabled non-admin users can't open this record. All other actions (hide,copy,delete,....) are also disabled.

Hide, Start, Stop and Access

With the fields “Hide”, “Start”, “Stop” and “Access” you can configure the visibility of the current newsitem. The settings made here will override visibility settings from categories that are assigned to this news record.

Date/Time

The value of this field affects several things:

The news in lists and in the archivemenu (amenu) are ordered by this field if no other filed is selected (-> see "Order by" this field in section “The tt_news content element”)

If a value for “datetimeDaysToArchive”, “datetimeHoursToArchive” or “datetimeMinutesToArchive” is set, these value is added to the value of the datetime field and handled as archivedate. (see section “The archive” in this manual)

The value of these field is taken for the html-template markers ###NEWS_DATE###, ###NEWS_TIME### and ###NEWS_AGE###. (all parsed through the stdWrap functions “strftime” or “age”)

For new created records the current time is inserted atomatically.

Archivedate

If archivedate shows a value in the past, the news record will be shown in lists showing only archived news. Of course it will disappear from lists showing only non-archived news.

Transl.Orig

This field appears only in translated news records and points to the translation Original. (The translation original has to be in the default language)

Language

This field shows the language of the newsitem. This field should be not edited by hand because its value is handled by the translation system of TYPO3.

Author and Email

The values of this fields will substitute the html-template markers ###NEWS_AUTHOR### and ###NEWS_EMAIL###. By default only the author will be displayed and linked to the author's email address.

Hint:

If you need an author field which is a relation to another table where the authors are stored (f.e. fe_users), install the extension “News author relations” (extkey: news_author_rel) http://typo3.org/extensions/repository//news_author_rel/ which extends tt_news by this feature.

Versioning Label:

The versioning label of this record. This field is only visible when the extension "versioning" (extkey version) is installed.

Subheader

The value of this field will substitute the html-template marker ###NEWS_SUBHEADER###. If this field is empty the value of the field “Text” is taken instead.

Text

This is the main text of the news article and will substite the html-template marker ###NEWS_CONTENT###.

No automatic pagebreaks for this record

this will disable automatic pagebreaks after a certain amount of words for this record.

Keywords

The content of this field is written to a TypoScript register ("newsKeywords") which can be used to insert the keywords as "<meta> keywords" to the page header (plugin "metatags" required). If you don't need this field for "<meta> keywords" you can use it as a second "subheader" field (it will substitute the template marker ###NEWS_KEYWORDS###).

Category

Here you can assign categories to the current news record (if this record is no translation of another record).The available categories will be displayed in a tree. The titles of the assigned categories will substite the html-template marker ###NEWS_CATEGORY###, the category images will be written to the marker ###NEWS_CATEGORY_IMAGE###. Tt's possible to control editing permissons of news articles with the assigned categories. See section “Categories” for more information.

Images

Here you can define images that will be shown in the news item. All images will be rendered to the marker ###NEWS_IMAGE###.

Caption

Field for the imagecaption which will be displayed under the image. If more than one image is assigned the value of this field can be splitted by linebreaks.

Image altText and Image titleText

In these fields you can define two texts that will be inserted as alt and title texts in the image html tag. If more than one image is assigned the values of these fields can be splitted by linebreaks.

Links

The links that are inserted here will be displayed under the "bodytext" in the news single view. They will substite the marker ###NEWS_LINKS###. This field is parsed through the stdWrap function "parseFunc" so it will be possible to enter links as typolink. F.e.: <LINK http://typo3.org _blank>open typo3.org</LINK>

Related News

In this field you can select news records or pages that will be displayed as related news. Related news with type “news” will point to the single view of the related news record. Related news with type “External URL” or “internal Link” will point to the url or page id that is inserted in the news record. Related pages will be handled as news with type “internal link”.

Related news will substite the marker ###NEWS_RELATED###.

Files

Here you can attach files to a newsitem. Files will substite the marker ###FILE_LINK###.

Categories

You can assign categories to news. That allows you to display f.e. only news with a certain category in a “LIST” content-element.

Categories can have parent categories. The category “FrontEnd plugins” in the screenshot below does have category “Extensions” selected as “parent category”, so “FrontEnd plugins” is a subcategory of “Extensions”. If the use of subcategories for the FrontEnd is enabled the result is, that the news record with category “FrontEnd plugins” from the screenshot will also appear in a LIST that shows only the category “Extensions”.

The use of subcategories in the FrontEnd of the website has to be enabled by setting “useSubCategories=1” in the constant editor or directly in TS setup. The display of subcategories can be configured seperatly with the TS var “displaySubCategories”. Subcategories can be wrapped with another wrap than normal categories.

Example:
This configures tt_news to use and display subcategories. Only news with the selected categories (23,34) will be displayed. Subcategories will be wrapped with a red border.

plugin.tt_news {

useSubCategories = 1

displaySubCategories = 1

categoryMode = 1

categorySelection = 23,34

displayList {

subCategoryImgItem_stdWrap.wrap = <span style="border:1px solid red;">|</span>

subCategoryTitleItem_stdWrap.wrap = <span style="border:1px solid red;">|</span>

}

}

In the BackEnd the categories are shown in a tree view. Since tt_news 2.5.0 the category tree is expandable and collapsible (requires the extension xajax).

Categories can be created with the “create new record” link like shown in the section “Quickstart”, or with the “+”(add) icon directly from the news db record.

Hint:
Editing of categories directly from a news record works only for categories which are assigned to this record record. To edit a category select it in the left category field and click on the edit button (the pencil).

The page where new categories from the “add” wizard will be created depends on the setting of “use General Record storage page” in the extension setup. If you use the “General Record storage page” for categories, all categories will be created in this page. If you disabled “use General Record storage page” all categories from wizards will be created in the current page.

Controlling editing permissions with assigned categories:

It's possible to control the editing permissions for news records with the assigned categories. This is either possible by editing the Tsconfig field of the be_user/group or – since tt_news 2.5.0 – by selecting the allowed/visible categories from a category tree in the be_user/group record. The category tree in be_user records appears only if the user is not admin. In the sreenshot below you see a be_user record where the user is only allowed to edit or assign the category “Commitees” and its subcategories.

If thís user opens a news record he will only see the category “Commitees” and its subcategories.

If a BE-user is restricted to certain categories he can only change news records that have these categories assigned. If he performs any action (move, delete, hide, localize, copy, version, modify) with a record that has non-allowed categories assigned an error message will be displayed and the action will be ignored.

Another message will be displayed in the news record above the fields "Type" and "Category". Non-selectable categories will be displayed in grey text and not linked. See screenshot below. Defining allowed categories is also possible by inserting their uids in the Tsconfig field of a be_user or be_group record.

Example:

(user/group TSconfig)

# this enables the use of the list below

options.useListOfAllowedItems = 1

# users of this group are only allowed to save news records with the following categories:

tt_newsPerms.tt_news_cat.allowedItems = 35,36,37

If the BE-user with this configuration opens a record that has at least one category assigned that is not in the list of allowed items he will see the error message below.

The category rootline

The tt_news html template contains a marker ###NEWS_CATEGORY_ROOTLINE###. This marker will be filled with the titles of the parent categories of the first assigned category in SINGLE view or with the parents of the selected category in LIST view. It doesn't work in LIST view if more than one category is selected.

The category titles can be linked to the category shortcut page which is configured in the category db-record.

plugin.tt_news {

# settings for the category rootline

catRootline {

showCatRootline = 1

catRootline_stdWrap.wrap = <div class="news-catRootline">|</div>

# if titles are linked the link points to the page which is configured as category shortcut

linkTitles = 1

title_stdWrap.wrap =

divider = &nbsp;&gt;&nbsp;

}

}

The tt_news category manager

The tt_news category manager is a BackEnd module which was introduced in tt_news version 2.5.0 (TYPO3 4.0 or higher required). It is located under Web->Info and offers a handy way to manage complex category trees. In this module you see the categories in a tree view which can be expanded and collapsed. Moving and copying of categories can be done by drag&drop. It's also possible to edit, hide and delete category records. If a category is deleted all subcategories of this record will be deleted, too.

The tt_news_cat database-record

The category db-record looks like this:

Field descriptions:

Title and Title language overlays

In the field “title language overlays” you can define titles for other languages. If you have more than one additional language, you can split the titles with the “|” symbol.
Example:
if you have a website with 3 languages (en,de,fr) you write the category title for the default language in the field “Title”. The titles for german an french are stored in the field “title language overlays” like this:

the order of the overlay titles has to be the same as the order of your system languages.
In this example: en=0, german=1, french=2

Parent category

In the Field “Parent category” you can define the current category as a subcategory of the category which is selected in this field. That will include the current category and the newsitems which have this category assigned when the parent category is selected. This works recursive.

Hide, Start, Stop and Access

With the fields “Hide”, “Start”, “Stop” and “Access” you can f.e make this category and the newsitems that have this category assigned only visible for a certain usergroup. Works recursive for subcategories.

Category Image

You can upload or assign an image for each news category which is shown in the CATMENU element (“catmenuIconMode = -1”) and as category images (f.e. instead of the category title). The behavour of the category titles/images can be configured in the sheet “Category settings” in the news content element.

The category titles/images can act as shortcut to a page or as “category selector” which means: the contents of a news-list ist filtered by category. Filtering by category works recursive for subcategories.

Category shortcut

Category titles or images can also act as shortcut to an internal page. If this is enabled and a visible page is defined as shortcut, the link from the category title or image points to this page.

Target for news category shortcut

With the field “Target ...” you can configure a target for the category shortcut (this setting will have priority over a global setting for link targets in your website)

Single-view page for news from this category

The field "Single-view page for news from this category" gives you the possibility to define a single-view page for each category. If you want to use this feature it is required to add "useSPidFromCategory = 1" to the TypoScript setup.

If a news-record has 2 or more categories assigned the SinglePid will be taken from the first category which is assigned to the news record.

Description

Here you can enter a description for the current category which will be shown as tooltip in the category tree in BE and in the CATMENU content element in FE. If you have long description texts (>70 chars) Firefox and Mozilla will not display the tooltips correctly. Solution: There are some Firefox extensions which correct this problem. I tried "Popup Alt Attribute" which works flawless for me (see screenshot).

Example:
Category description as tooltip in the category select field:

The category menu (CATMENU)

By choosing the code CATMENU in the tt_news content element or by TS a category selector will be displayed which shows nested categories in a hierarchical menu.

The catmenu can work in 2 different modes:

tree (default): The category menu will be rendered like the categories in BE fields. The shown “tree” is build by images and can show userdefinded icons.

nestedWraps: This mode will render a category menu where each level has its onwn wrap.

in both modes the content of the field “description” will be filled to the “alt” and “title” attributes of the catselector link so it appears as tooltip when the mouse pointer is over it. If this is not wanted it can be disabled by setting “displayCatMenu.insertDescrAsTitle” to 1.

The wraps for the complete catmenu, for the menu states (NO and ACT) and for the header of the catmenu are also used in both modes.

The CSS styles for all category menus are included in the static TS template “default CSS styles (tt_news)”. If you're using the “table based” template for tt_news you'll have to include the CSS styles manually.

mode “tree”

The tree mode has some special options for configuring the icons. The option “catmenuIconMode” configures the behaviour of the icons showing left to the category titles. “catmenuIconMode” offers the following options:

-1 = display no icons at all

0 = display the default icon (tt_news_cat.gif)

1 = display image from category record as icon

2 = display the icon which is configured as “catmenuIconFile” (default: EXT:tt_news/res/arrow.gif)

The icon for the “root” item of the tree (the catmenu header) can be configured separately (“catmenuRootIconFile”) or completely disabled by seetting “catmenuNoRootIcon” to 1.

The sizes for the normal icons in catmenuIconMode “1” and “2” and for the root icon can be configured separately.

Example:

TypoScript setup for a “catmenu” content element that looks like this:

plugin.tt_news {

displayCatMenu {

# select root icon file

catmenuRootIconFile = EXT:tt_news/res/tt_news_cat.gif

# enable root icon

catmenuNoRootIcon = 0

# disable other icons

catmenuIconMode = -1

}

}

All other settings are included in the default TS templates (see Section “Reference” for details)

mode “nestedWraps”

In this mode each level of the "catmenu" has its own wrap. 1 is the first level.

Example:

TypoScript setup for a “catmenu” in mode “nestedWraps”:

plugin.tt_news {

displayCatMenu {

mode = nestedWraps

# wrap for the complete "catmenu"

catmenu_stdWrap.wrap = <div class="news-catmenu">|</div>

# wraps for active or inactive category links in the tree

catmenuItem_ACT_stdWrap.wrap = <img src="tslib/media/bullets/bullet1_h.gif" />|

catmenuItem_NO_stdWrap.wrap = <img src="tslib/media/bullets/bullet1_n.gif" />|

# wrap for level "n"

catmenuLevel1_stdWrap.wrap = <div class="level1">|</div>

catmenuLevel2_stdWrap.wrap = <div class="level2">|</div>

catmenuLevel3_stdWrap.wrap = <div class="level3">|</div>

catmenuLevel4_stdWrap.wrap = <div class="level4">|</div>

}

}

After adding the CSS styles below to your website the catmenu could look like this:

CSS Styles:

.news-catmenu {

padding:5px 0px 0px 5px;

margin:10px;

border:1px solid #666;

background-color:#F9FFE5;

}

.news-catmenu DIV IMG {

margin:0px;

padding: 0px 3px 3px 0px;

vertical-align: middle;

}

Hint: With a function hook in the tt_news class (“userDisplayCatmenuHook”) It's possible to add a userdefined script that renders the “catmenu”.

The SINGLE view

The complete view of a news article (single view) has some special features that are not available in LIST or LATEST.

Pagebreaks

When you have long articles in SINGLE view, you might want to split them into multiple pages and have a page navigation inserted to navigate between these split pages.

This can be done automatically by specifying the amount of words after that a pagebreak is inserted. When the amount of words is reached, the extension looks for the next dot (.) and inserts a pagebreak after it (default). Alternatively you can configure tt_news to insert pagebreaks only after paragraphs (an empty line in the bodytext field) by setting “useParagraphAsPagebreak=1”.
You can disable this feature for each news record (“No automatic pagebreaks for this record”).

You can also add a manual pagebreak at a specific position in the text. At the desired position, enter the text:
“<---newpage--->” (default) or the string that you configured as “pagebreakToken”. This will trigger a pagebreak at this position. On the new page, the wordcounter starts again for automatic pagebreaking. However, manual pagebreaks work even when the automatic pagebreak feature is disabled.

The subheader is by default only displayed on the first page of a single view with multiple pages. If this is not wanted the subheader can be configured to appear on all those pages by setting “subheaderOnAllSViewPages=1”.

One thing to note is the way images are handled on multiple pages. The images for the additional pages in single view are asssigned by their position in the Image-list of the news record.

Example: If you have 6 images assigned and “imageCount” for the single view set to “2”, then the first 2 images will appear on the first page, the second two images at the second page and so on.

There is a seperate marker for the pagebrowser in single view:

###NEWS_SINGLE_PAGEBROWSER###

Alternatively it is possible to simply append the pagebrowser to the bodytext without a special marker by setting “appendSViewPBtoContent=1” (this is the default).

Example:

# TS setup

plugin.tt_news {

useMultiPageSingleView = 1

pageBreakToken = <break>

maxWordsInSingleView = 300

useParagraphAsPagebreak = 1

subheaderOnAllSViewPages = 0

appendSViewPBtoContent = 0

}

This will enable the pagebrowser for the Single view. The string “<break>” will trigger a manually pagebreak. If the text is longer than 300 words, a pagebreak will be inserted automatically after the next paragraph (an empty line in the field bodytext). The subheader will be displayed only on the first page and the pagebrowser will be rendered to its own marker (###NEWS_SINGLE_PAGEBROWSER###).

For a detailed description of the TypoScript options that are mentioned here, take a look at the section “Reference”.

Related news or related pages

The news records that are inserted in the field “Related news” in the tt_news db-record are shown in the single view. If those records are “normal news”, their links point to the single view of the related news article. Related news with type “link external URL” or “link internal page” will link directly to the url or page id that is configured in the news record.

Additionally to news records, relations can also point directly to internal pages. Related pages will be handled as news that link to internal pages.

tt_news can be configured to insert the link that points back from the related record to the current one automatically. This feature can be enabled by setting “useBidirectionalRelations” to 1.

The display of related news and pages is configured by TypoScript. For more information search for “getRelatedCObject” in the section reference of this manual. The details of the link configuration can be found in the section “Link Configuration”.

Related news by category

The single view can also be configured to show a list of news articles with the same category as the current article. The feature is disabled by default and can be enabled by setting “showRelatedNewsByCategory=1”.

If news with the same category are found, they will be rendered as news LIST to the marker “###NEWS_RELATEDBYCATEGORY###”. The header will be rendered to the marker “###TEXT_RELATEDBYCATEGORY###”.

By default the code LIST causes tt_news to render the content to the template ###TEMPLATE_LIST### This can be changed with “altMainMarkers” to take an userdefined template instead which f.e contains only the news titles. The template for “related news by category” is included in the file tt_news_v2_template.html -> part: “###TEMPLATE_CAT_RELATED###”

Example:

Add the following lines to the setup field of an +ext (TS) template which is located in the page with the SINGLE view content element. Then “related news by category” should look like the screenshot above.

plugin.tt_news {

# wrap for all related news by category

relatedByCategory_stdWrap.wrap = <dl class="news-single-related">|</dl>

# wrap for the header

relatedByCategoryHeader_stdWrap.wrap = <dt>|</dt>

# globalwrap 3 is used to wrap the list items

wrap3.wrap = <dd>|</dd>

# change the name for template LIST to TEMPLATE_CAT_RELATED

altMainMarkers.TEMPLATE_LIST = TEMPLATE_CAT_RELATED

altMainMarkers.TEMPLATE_LIST.wrap = ### | ###

}

Hint:

If you have more than one SINGLE view in your website you can use the TypoScript condition below for changing the template part with “altMainMarkers” - It's not needed to add an +ext template to each SINGLE view page.

# this changes the template part for list only if a SINGLE view was requested

[globalVar = GP:tx_ttnews|tt_news > 0]

plugin.tt_news {

altMainMarkers.TEMPLATE_LIST = TEMPLATE_CAT_RELATED

altMainMarkers.TEMPLATE_LIST.wrap = ### | ###

}

[global]

The Archive

The “news Archive” is always build by two content-elements: An archive-menu (“AMENU”) element and a “LIST” element that shows only archived news-records. The links from the “AMENU” point to that “LIST” element. You can configure the pid (page ID) of the “LIST” in the Constant-editor or directly in TypoScript with “archiveTypoLink.parameter”. The “AMENU” and the (archive)-”LIST” can be on different pages or frames.

The “AMENU” content-element can be considered as a small calender that shows news by their “datetime” field. The value of the field “archivedate” has no influence on the archive-menu.

Note: Unless you're not using “Human readyble Archivedates” it is required to configure this “LIST” to show only archived items. If the LIST is set to “don't care”, it really does't care about archive settings and other archive-related parameters set from the links in the AMENU element -> it will always show all news-records.

tt_news offers a nice feature called “automated archiving” (see -> datetimeDaysToArchive, datetimeHoursToArchive or datetimeMinutesToArchive). If this is enabled, news records with a “datetime” field, that is older than the number of days, given in “datetimeDaysToArchive” will appear in lists showing only archived news (same works for hours and minutes).
This means also, that these news records disappear from “LIST” elements showing only non-archived news and they will also disappear from “LATEST” elements.

The displaying behaviour of news content-elements showing archived news is influenced by the TS-variables “enableArchiveDate” and “datetimeDaysToArchive”, “datetimeHoursToArchive” or “datetimeMinutesToArchive”.
The following example tries to give you an overview which TypoScript settings will have which effect on different news content elements.

Environment:

Today = 03.10.04
datetimeDaysToArchive = 30

news-records will be handled as archived, if their datetime field is older than datetimeDaysToArchive Start (DDTAStart) = 03.09.04

Let's say, you have these news-records:

News 1	DateTime: 01.11.04 (Future)	ArchiveDate: 0 (empty)
News 2	DateTime: 01.10.04 (Past, after DDTAStart)	ArchiveDate: 0 (empty)
News 3	DateTime: 15.09.04 (Past, after DDTAStart)	ArchiveDate: 30.09.04 (Past)
News 4	DateTime: 01.08.04 (Past, before DDTAStart)	ArchiveDate: 30.08.04 (Past)
News 4a	DateTime: 01.08.04 (Past, before DDTAStart)	ArchiveDate: 0 (empty)
News 5	DateTime: 01.07.04 (Past, before DDTAStart)	ArchiveDate: 01.12.04 (Future)

Archive Settings
enable Archive Date	datetime DaysTo Archive		AMENU	LIST show archived	LATEST	LIST show NON archived	LIST don't care
0	0		- 2 3 4 4a 5	1 2 3 4 4a 5	1 2 3 4 4a 5	1 2 3 4 4a 5	1 2 3 4 4a 5
0	30		- - - 4 4a 5	- - - 4 4a 5	1 2 3 - - -	1 2 3 - - -	1 2 3 4 4a 5
1	0		- 2 3 4 4a -	1 2 3 4 4a -	1 2 - - 4a 5	1 2 - - 4a 5	1 2 3 4 4a 5
1	30		- - 3 4 4a -	- - 3 4 4a 5	1 2 - - - -	1 2 - - - -	1 2 3 4 4a 5

Note that newsitems with an empty archivedate will appear in all lists. Starting from version 2.5.2 newsitems without archivedate will not be displayed in the list of archived items if item is archived according to other criterias (see bugs 3930, 3714). To enable old behavior, set “compatVersion” to “2.5.0” in TypoScript setup.

The Search

The tt_news search is a simple text-search that searches in a configurable list of fields (by default this fields will be searched: title, short (subheader), bodytext, author, keywords, links, and imagecaption). The default list of searchfields can be overwritten with the TS parameter “searchFieldList”.

Example:

# this will configure tt_news to search only in the fields “title” and “short”.

plugin.tt_news.searchFieldList = title,short

The fieldnames in “searchFieldList” will be validated before writing them to a database query.

The search can be configured to display its results on another page (see ->searchPid).

Note: The “SEARCH” element does not need a “LIST” element to display its results (if no “searchPid” is defined)

You can choose between displaying all items in the result list when opening the searchpage, or showing only the input form (see -> emptySearchAtStart)

If no global “Starting point” (pid_list) is configured the “Starting Point” of the news “SEARCH” element must point to the folder where your news records are stored.

Version Preview

If the extension "version" is enabled on the system, a new "code" (VERSION_PREVIEW) will be added to the "what to display" selector in the tt_news content element. If a content element with this code exists on a page, it does nothing until the GET var "ADMCMD_vPrev" is set which indentifies a version preview. Unfortenutely the id of the page for the version preview is not configurable, so the VERSION_PREVIEW element has to be on the next displayable page above the news sysfolder in the pagetree. This doesn't work if the news folder is in the first level of the pagetree without a normal page above it.

The version preview is triggered by clicking on the red marked preview symbol in the versioning view in the BackEnd.

If a version preview is displayed a message with a link to the original version of the article will be inserted above it. see “versionPreviewMessage_stdWrap” and “versionPreviewMessageLinkToOriginal_stdWrap”.

“direct preview” with the save&preview button doesn't work in editforms of non-public versions of news articles -> use “version preview” instead.

Troubleshooting

If the news extension doesn't display anything (not even an error message) check the following:

did you set a “static template (from Extensions)” in your TS-template?

is the header of the content element displayed on the website? If this is the case then the news content element seems to be configured correctly

Are there any news records in the folder where the "Starting point" field points to?

Did you unhide the news records before saving them.

If you typed the path to the html-template directly in the TS setup-field: is the html-template located in the correct path? (path is case sensitive)

Enable the admin panel (config.adminPanel=1) in your TS setup and look for error messages in the “TypoScript” section: (to see the possible TS errors set the checkboxes as shown in the screen shot below)

clear all TYPO3 caches, clear your Browser cache.

FAQ

Q: Is the singlePid required?
A: yes, since tt_news 1.3.0 it is not possible to see the single view on the f.e. LIST page when no singlePid was defined.

Q: What means this error message: "Attempt to insert record on page '[root-level]' (0) where this table, tt_news_cat, is not allowed"?
A: That means, that you didn't define a "General Records Storage page" (-> see next question) and so TYPO3 tries to create the new news-category in the rootpage (page id=0).

Q: what is the "General Records Storage page" (GRSP) and where do I have to set it?
A: If you set “use StoragePid” in the extension manager, the "GRSP" points to the page, where to look for categories that are displayed in forms in the BackEnd. The “GRSP” has to be set in the page properties of your websites rootpage (the page with “is root of the website” flag)
Remember: The "General Records Storage page" (or “StoragePid”) is not the “Starting Point”

Example:

if you have a pagetree like shown in the screenshot below (and “useStoragePid” is enabled), the only page, where you have to set the "General Record Storage page", is the one named "tt_news example 1". All pages below this page will take this setting if it is not overwritten by setting this value in another page.

If your page structure requires, that the news folder(s) are not located under one pagetree, you have to set the "General Records Storage page" for each news sysfolder and the rootpage of your site:

Administration

Link Configuration

There are several kinds of links in a news record. The table below gives you an overview which parameters will affect which link. In the graphic you see the possible links in a news “LATEST” element. The links in the “LIST” elements work exactly like those in “LATEST” elements. The links in the “AMENU” are configured with the same parameters as the “Archive Link” (4). The Links in the “SINGLE” view are explained after this.

Link Description:	Link-Configuration:	Link-Configuration in Framesets:
	No special settings required External links will use the target, given in the link-field in the news-record. If there is no target given they will use the global target for external links. Example: This will open typo3.org in the same window:
	No special settings required	Required Settings: The global target for all links has to be defined in your main template (e.g.: PAGE_TARGET = page). Optional: If you want the news links to internal pages point to another frame, you can override the global target with this setting. plugin.tt_news { pageTypoLink.target = _top }
Links in “normal” newsitems that points to the single-view. These links are inserted to the HTML template by the ###LINK_ITEM### markers. Example: <!--###LINK_ITEM###--> ###NEWS_IMAGE### <!--###LINK_ITEM###-->	Required Settings: All (red-marked) links will point to the page id=132. This is the page which contains the news “SINGLE” content element (also known as: singlePid). plugin.tt_news { singlePid = 132 }	Required Settings: All (red-marked) links will point to the page id=465 and will open it in the frame that is configured as target for internal links from constants (e.g.: PAGE_TARGET = page). plugin.tt_news { singlePid = 465 }
Category Shortcut Category link: Type “shortcut” This link points to a page in the same pagetree. Example: plugin.tt_news { catImageMode = 2 }	No special settings required	Required Settings: For category shortcuts that point not to the same frame in which they are displayed, it is required to define the target in the “news category” db record:
Catselector Category link: Type “category-selector” This link will filter the displayed news or archivemenu-items by category. Example: plugin.tt_news { catTextMode = 3 }	No special settings required	Required Settings: If the catselector links should point to the current frame, there is no special setting required. If the catselector links should point to another frame, add this to your TS setup: plugin.tt_news { itemLinkTarget = page catSelectorTargetPid = 78 } with this setting the catselector links point to page id=78 in the frame named “page”.
Archive Link - used in the “LATEST” element (example html-template) for the link that points to the page with the archive listing (marker: ###GOTOARCHIVE###) - and used for links in the “AMENU” element (archive menu). If you want the links in the archive menu point to another page, you can enter the PID of this page here.	Required Settings: plugin.tt_news { archiveTypoLink.parameter = 34 } In the example the “Archive Link” in the LATEST element points to the page with id=34. This page contains an “AMENU” content-element. The links in the “AMENU” element are configured with the same settings, but those links expect a page with a “LIST” element as target. That page is configured to list only archived newsitems. If you set this value from the Contstant-Editor for all news content-elements, this “LIST” has to be on the same page as the “AMENU”. The target for this link is configured as the global PAGE_TARGET in constants. See section “The Archive” for more information about linking the “AMENU” to other news content elements or pages.
Pagebrowser links (not in the graphic)	No special settings required. The pagebrowser links in “LIST” view will point to the global “PAGE_TARGET” if one is defined in the constants.

Links in the “SINGLE” view

Some of the link-types in the single view are configured with the same parameters as shown in the table above:

Links to internal pages (see -> getRelatedCObject)

Links to external URLs (see -> getRelatedCObject)

Category-links that point to category-shortcuts (2) (the catselector mode will not work - and does not make sense - in single view)

Link Description:	Link-Configuration:	Link-Configuration in Framesets:
Links to “related news”	No special settings required (see -> getRelatedCObject )
Links to Files	The links to files are configured with the “filelink” object. (see -> newsFiles)
News Links	The news “Links” are parsed through the “general_stdWrap”. (see -> general_stdWrap) Hint: you can add “typolinks” to this field: <LINK http://mysite.com _blank>open mysite</LINK> This will open the linked site in a new browser window. The link will appear as “open mysite” in SINGLE view.
Back-Link	This links points to the last “LIST” or “LATEST” view. Usually the page that linked to the “SINGLE” view. (see -> backPid)
Image Link in Single view	No special settings required, in the default configuration these links point to a javascript that opens the image in a pop-up window. (see -> imageWrapIfAny )
Email link Text Links in news bodytext	No special settings required This links use the global settings for links
Search page id (not in the graphic)	If you want the search button in the “SEARCH” content element point to another page than the current you can define this page as “searchPid”. (see -> searchPid )

User TSconfig

You can configure many options of the tt_news BE-form by editing the TSconfig field of the BE-user or the BE-Group this user is a member of.

Examples:

This will enable the use of “allowed categories” and adds the categories with uids 23,43,12 to this list (see section “Categories” for mre information)

options.useListOfAllowedItems = 1

tt_newsPerms.tt_news_cat.allowedItems = 35,36,37

This will exclude the categories with uids 1,2,3 from showing in the category tree in BE-forms:

tt_newsPerms.tt_news_cat.excludeList = 1,2,3

This will show only the categories with uids 4,5,6 in the category tree in BE-forms:

tt_newsPerms.tt_news_cat.includeList = 4,5,6

This will add a "Save & New" button to news and news-categories BE-forms

options.saveDocNew.tt_news = 1

options.saveDocNew.tt_news_cat = 1

This will remove the "Delete" button from the news categories form.

options.disableDelete.tt_news_cat = 1

This will set the field “hidden” in new created news articles to 0 (=visible)

TCAdefaults.tt_news.hidden = 0

If you click on the "TS" button in the right of the textarea you'll see all possible options in a pop-up window.

More information about “User TSconfig” can be found here: http://typo3.org/documentation/document-library/references/doc_core_tsconfig/4.0.0/view/1/2/

Page TSconfig

Since tt_news 2.2.0 it's possible to open a news article in the SINGLE view when clicking the “save & preview” button in the news record in the BackEnd (works only in the “Live” workspace). The “singlePid” for the page who should open the SINGLE view has to be configured in the Page TSconfig of the folder with the news records. This page can be the normal SINGLE view page for your website it could also point to another page which contains a tt_news content element with code SINGLE.

Example

This will open the page with id 37 when clicking on the “save & preview” button in a news record:

tx_ttnews.singlePid = 37

If you, e.g. want to hide only certain options of some fields for BE-Users, you can do this by editing the Page-TSconfig of the folder where your tt_news db-records are stored. (these settings will affect all BE users including those with admin rights)

Example

This will remove the option "external Url" (type=2) from the "type" field in the tt_news db-record:

TCEFORM.tt_news.type.removeItems = 2

The Rich-Text-Editor

I recommend to use the extension “htmlarea RTE” (extkey: rtehtmlarea) instead of the RTE (extkey: rte) which is included in your TYPO3 package. One big advantage of rtehtmlarea is, that it works on almost all browsers and operating systems. The classic RTE works only in Internet Explorer because it depends on some ActiveX-controls which are (fortenutely) not available in other browsers.

Since tt_news v1.4.2 the RichText-Editor for news is configured like the RTE for normal content (e.g. Text, Text w/image). This is done at three places:

1. By this line in tca.php:

[line: 405]

'0' => Array('showitem' => 'title,type;;1;;,datetime;;2;;1-1-1,author;;3;;,short,bodytext;;4;

richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|

outdent|indent|link|table|image]:rte_transform[flag=rte_enabled|mode=ts];4-4-4,no_auto_pb,

--div--;Relations,category,image;;;;1-1-1,imagecaption;;5;;,links;;;;2-2-2,related;;;;3-3-3,
news_files;;;;4-4-4'),

which confgures which buttons or features will be available in the RTE-interface and it sets also the basic “transformation mode” (mode=ts). The transformation mode defines how the content of the field is changed while storing it in the database and while getting it back from the database. A nice graphic that shows how and where transformations work, can be found on this page: http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.0.0/view/5/2/

2. If the extension “css_styled_content” is enabled, the transformation mode is changed to “ts_css” by adding this lines as “default pageTSconfig”:

# RTE mode in table "tt_news"

RTE.config.tt_news.bodytext.proc.overruleMode=ts_css

This mode enables the use of CSS-classes for formatting the contents of the news record (e.g. HTML-lists will be generated with tags like <ul>,<li> and <ol>, headers will be rendered as <h1> - <h6>... for a detailed view on the changes between the different transformation modes take a look at this page: http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.0.0/view/5/2/#id2828212

3. The third part of the RTE configuration is done by this line in the file static/ts_new/setup.txt or static/ts_old/setup.txt in the extension dir (the settings in these files will be enabled by adding one of them as “static templates from extensions” to your TS template):

plugin.tt_news.general_stdWrap {

parseFunc < tt_content.text.20.parseFunc

}

The “general_stdWrap” is used additionally to the normal standardWraps (f.e. subheader_stdWrap) for the following fields: “author”, “subheader”, “text” and “links”. That means, the processing of these fields can be changed by modifying one line of TypoScript. If this behaviour is not wanted for a certain site, it can be disabled by clearing the “parseFunc”:

plugin.tt_news.general_stdWrap {

parseFunc >

}

But then you'll have to add a “parseFunc” to every field which contents should be processed (f.e. to find mailadresses in the text and add <a href=”mailto:...” to them).

“< tt_content.text.20.parseFunc” means, that the parseFunc-configuration from the field “text” from tt_content is also taken for the tt_news-fields which are processed by the “general_stdWrap”. If you want to change the configuration of “tt_content.text.20.parseFunc”, open this value in the “TypoScript Object Browser” (see screenshot at the begínning of the section “Reference”).

If you want to change the appearance of the RTE in BE forms, you can overwrite the default settings in “page TSconfig”. To see the current TSconfig settings for your site, you can use the tool: “View TS config fields content” from “Web>Info, page TSconfig”.

The RTE configuration can also be changed by “RTE.default” settings added by other extensions. If you have the extension “CSS_styled_content” installed, and you did not change the default setting: “Set PageTSconfig by default=on”, this value will overwrite the transform settings for tt_news given in tca.php (the codeline above).

The following table shows the pageTSconfig settings for the site, from the screenshot above (“RTE.default” means that in this site the RTE processing for tt_news is configured like the processing for tt_content). All settings are done in the page “tt_news example 1” (is root-page). The sysfolder for news is located under this page, so the settings from the “root-page” will also affect this folder.

Template settings	EXT:css_styled_content	Add to Page TS-config:
content(default)	Installed	RTE.default { proc { preserveTables = 1 overruleMode = ts } }
content(default)	Not installed, or pageTS config not added by default.	RTE.default { proc { preserveTables = 1 overruleMode = ts } showButtons = table }
css_styled_content	Installed	no special settings needed. The “overrule mode” is added to the default pageTSconfig.

Notice:
If your news sysfolders are not located under your website's “root-page” you'll have to add the settings from the table above to the PageTSconfig of your news sysfolders.

Example:

The settings that start with “RTE.default” will affect the RTE for tt_news and tt_content (and all RTEs from other extensions). If you want to configure the RTE for tt_news different from the RTE for tt_content, the syntax looks like this (pageTSconfig):

RTE.config.tt_news.bodytext {

proc {

preserveTables = 1

overruleMode = ts_css

}

showButtons = textcolor,bgcolor

}

for further details see:

http://typo3.org/documentation/document-library/rtehtmlarea/

http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea/current/

http://typo3.org/documentation/tips-tricks/customizing-the-rich-text-editor/

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.0.0/view/5/1/

Rights & Permissions

The basics about the Rights & Permissions concepts of TYPO3 can be found in the "getting started" document: http://typo3.org/documentation/document-library/tutorials/doc_tut_quickstart/0.1.0/view/1/12/#id2856932

for some advanced options see section “MOD” in “doc_core_tsconfig”: http://typo3.org/documentation/document-library/references/doc_core_tsconfig/4.0.0/view/1/3/#id2798076

Caching

Since version 1.4.0 tt_news supports caching and thus indexing by the indexed_search extension. Now the problem appears that you'll have to clear the cache for the e.g. “Homepage” to see the changes you made in a news article that is located in the news sysfolder.

This can be done automatically.

Example:

in the small pagetree below, the news articles are located in the sysfolder "News db Records". The page "Home"(647) shows a news LATEST content element in the left column and the page "News"(637) and its subpages show other news content elements.

If a user changes an item in the news sysfolder, the pages "Home" and "News" will still show the same content (assuming that caching is enabled).

If you add the following parameters to the PageTSconfig of the news sysfolder, the cache for the pages configured in the “clearCacheCmd” is automatically cleared by saving a news record in this folder.

TCEMAIN.clearCacheCmd = 647,637

for more options see: http://typo3.org/documentation/document-library/references/doc_core_tsconfig/4.0.0/view/1/3/#id2798076

Configuration

If you want to modify some global values of the TypoScript configuration, used for the news display, take a look at the "Constant Editor". To open it, click on "Web/Template" in the left-frame menu, choose the page with the root-template in the pagetree and select "Constant Editor" from the menu in the upper right corner.

To change any options you don't find there, take a look at the "TypoScript Object Browser" (TSOB):

More information about the TSOB can be found here: http://typo3.org/documentation/document-library/tutorials/doc_tut_quickstart/0.1.0/view/1/9/#id2855181

The default values for the tt_news TypoScript configuration are stored in the file setup.txt in one of the “static” folders in the extension directory. For a list of all possible (tt_news specific) options see the table "Reference" below.

Some options e.g. for "stdWrap" or "typolink" are explained in the Typo-Script Reference (TSref) which can be found here: http://typo3.org/documentation/document-library/references/doc_core_tsref/current/

Files:

File:	Description:
pi/class.tx_ttnews.php	Main PHP-class used to display news. Called from a USER cObject with "userFunc = user_news->main_news"
class.ext_update.php	This is the tt_news updater
class.tx_ttnews_catmenu.php	This class renders the CATMENU in “tree” mode.
class.tx_ttnews_tcemain.php	Class with that uses two hooks from class.t3lib_tcemain.php to prevent saving of news or category records which have categories assigned that are not allowed for the current BE user.
class.tx_ttnews_treeview.php	This class builds the “category tree” in BE forms and checks for recursive categories
class.tx_ttnews_itemsProcFunc.php	Contains the function, that adds “extra codes” to the “What to display” selector
pi/news_template.tmpl	The table-based tt_news template file.
pi/news_help.tmpl	Template, which is displayed when using the news extension without setting a value for "code"
res/tt_news_languageMenu.php	Changed version of the example_languageMenu.php. This script keeps the link-variables from tt_news.
res/example_itemMarkerArrayFunc.php	Example for processing user-defined Markers with the userfunction: “itemMarkerArrayFunc”. (See file for description and needed TS setup)
res/example_amenuUserFunc.php	Example for processing the archive menu items by a user function (“amenuUserFunc”). The scripts divides the Archive menu to years. See file for description and needed TS setup.
res/example_imageMarkerFunc.php	Example for processing the image(s) by a userfunction (“imageMarkerFunc”): adds different wraps to the images in single view (see comments in file for needed TS-settings)
res/example_userPageBrowserFunc.php	Example for the pagebrowser userfunction (“userPageBrowserFunc”): this file includes two alternative pagebrowser-functions. With both pagebrowsers it is possible, to use html-code like images for the “next” and “previous” links. (See file for description and needed TS setup)
folders: static/ts_new static/css static/ts_old static/rss_feed	these are the static extension templates: “CSS-based tmpl”,”default CSS-styles”,”table-based tmpl” and “RSS-feed (type=100)”
pi/tt_news_v2_template.html	The new CSS based html-template
res/tt_news_v2_styles.css	CSS styles for the new HTML template.(this file contains the same style information as the static ext-template “default CSS-styles”)
res/rss_0_91.tmpl res/rss_2.tmpl res/atom_0_3.tmpl res/atom_1_0.tmpl res/rdf.tmpl	The xml templates for web feeds as RSS 0.91, RSS 2, RDF, Atom 0.3 and Atom 1.0.
res/realurl_localconf.txt	Example Configuration for tt_news with RealUrl

Reference

plugin.tt_news properties: TS configuration.

General Settings

Property:	Data type:	Description:	Default:
templateFile	resource	The HTML-template. (See examples: "pi/news_template.tmpl" and “pi/tt_news_v2_template.html” in the ext/tt_news folder). You can define a template for a complete pagetree, a certain page or even a single content element in your TS setup, in the Constant Editor or in the content.element. Example: plugin.tt_news { templateFile = fileadmin/my_templates/tt_news.html }	
pid_list	string / stdWrap	The page id (pid), or list of pids of the folder(s), where your news are stored in (also known as “Starting point”). If this value is not set, and the “Starting point” field in the news content-element is also empty, the current page is used. Accepts multiple pids comma separated! Example: # clear the value plugin.tt_news.pid_list > # display news records located in page 582 & 584 plugin.tt_news.pid_list = 582,584 Note: “Starting Point / pid_list” has nothing to do with the “Storage Pid” (General Record Storage page), which is used for news-categories).	
dontUsePidList	boolean	In sites with huge pagetrees where it is needed to have the news not in a few sysfolders but in the complete pagetree the check for the pid_list in tt_news can be a big performance eater because thousands of pages have to be checked for visibility and added to the sql query. With “dontUsePidList” enabled it is possible to disable the use of the parameters "pid_list" and "recursive" for tt_news related queries. Example: plugin.tt_news.dontUsePidList = 1	
recursive	Int / stdWrap	If this is given, the “pid_list” is extended by the number of recursive levels. Example: plugin.tt_news.recursive = 3	
code	string / stdWrap	Code to define, what the script does. Example: plugin.tt_news.code = LATEST	
singlePid	int+ / stdWrap	Page id of the page where single news are displayed (name changed in tt_news 1.6.0). Here you can define a page to be used for display of a news item with the “SINGLE” template-part. This setting can also be done in the constant editor or directly in the content element. (the settings done directly in the content element will override settings you made by TS, but they will only affect these certain content element.) Example: # singlePid for a news element inserted by TS plugin.tt_news.singlePid = 590 Notice: setting at least one page with a SINGLE news content element as “singlePid” is required (since tt_news 1.3.0) -> if there's no “singlePid” defined the links that should point to the single view don't work. The old var-name “PIDitemDisplay” does not work for links to related news anymore (since tt_news 1.6.3)	
allowCaching	boolean	Allow caching of news.	1
limit	int+ / stdWrap	The maximum number of news-records showing in “LIST” view.	7
latestLimit	int+ / stdWrap	The maximum number of news-records showing in “LATEST” view.	3
alternatingLayouts	Int+	Indicates how many alternating designs the news-script should expect in the html-template. Example: If you define a subpart like: "<!--###NEWS###--> ... <!--###NEWS###-->" this is used all the time. If you define a similar subpart: "<!--###NEWS_1###--> ... <!--###NEWS_1###-->" which might show another set of colors, this is used every second time instead of the default! This is because "alternateLayouts" is set to 2. If you define a similar subpart "<!--###NEWS_2###--> ... <!--###NEWS_2###-->" ... this will be used every third time IF (!) "alternateLayouts" is set to 3. If you do not set it to 3, the first two aternating designs will be used only.	2
altMainMarkers	(array of strings)	Lets you specify alternative subpart markers for the various main template designs in the news template This is the list of main subparts you can override: Properties: TEMPLATE_LATEST TEMPLATE_LIST TEMPLATE_SINGLE TEMPLATE_SINGLE_RECORDINSERT TEMPLATE_ARCHIVE TEMPLATE_SEARCH TEMPLATE_ARCHIVE_NOITEMS TEMPLATE_HEADER_LIST TEMPLATE_CAT_RELATED /+ stdWrap Example: This example changes the main subpart marker for the regular news single item display from the default ###TEMPLATE_SINGLE### to the custom supplied design ###SINGLE_CUSTOM### (found in the same template HTML-file) plugin.tt_news { altMainMarkers.TEMPLATE_SINGLE = SINGLE_CUSTOM altMainMarkers.TEMPLATE_SINGLE.wrap = ### | ### }	
compatVersion	version	Alters behavior of tt_news to be compatible with certain previous version. The value is not set by default, which means “current version”. Value must be a valid version string (i.e. include three numbers separated by period). Currently the following values are checked by extension: 2.5.0 or below LIST view in archive mode will show not only archived items but also any item without archivedate set	

Settings for Links:

Property:	Data type:	Description:	Default:
useHRDates	boolean	Use human readable dates: This enables the use of the GETvars “year” and “month” for archive links instead of the non-readable vars “pS”, “pL” and “arc”. Now it's possible to have realUrls like this: http://www.example.com/news/archive/2005/04/ Hint: If you use realUrl, don't forget to adds these new vars to your localconf.php See section "RealUrl and SimulateStaticDocuments" in this manual for more information.	0
useHRDatesSingle	boolean	Use “human readable dates” even for links pointing to the SINGLE view. Additionaly to “year” and “month” the links to the SINGLE view will show the “day”, so realUrls can look like this: http://www.example.com/news/2005/04/11/this-is-awesome/	0
useHRDatesSingleWithoutDay	boolean	Use “human readable Dates” for links to the SINGLE view without “day”, so realUrls can look like this: http://www.example.com/news/2005/04/this-is-awesome-too/ Example: plugin.tt_news { useHRDates = 1 useHRDatesSingle = 1 useHRDatesSingleWithoutDay = 1 }	0
backPid	int+	Here you can set the page id of the news list to which to return after looking at a single item. If you don't set a “backPid” the “Back” link in SINGLE view points to the last LIST or LATEST view. Usually the page that linked to the “SINGLE” view. If you have clicked to another related item, the “Back” link will still point to the last LIST page. You can override this behaviour by setting the parameter “backPid” in TS. This lets all “Back” links point to the page you configured there.	
dontUseBackPid	boolean	If you enable this, you can prevent the use of the variables for dynamic “back-links” in links that point to the single-view. The advantage is, that all those links will look the same, what will f.e. prevent multiple indexing by the indexed search. (RealUrl Links will also look nicer without a “backPid”). The “back-link” in the SINGLE view will still work, but it will only point to a global “backPid” (f.e. the list view). See section "RealUrl and SimulateStaticDocuments" in this manual for more information.	0
hscBackLink	boolean	If this is enabled the “Back to list” link in the SINGLE view will be parsed through the PHP function htmlspecialchars().	1
pageTypoLink	->typolink	Additional typolink configuration for the links to news which are of type “links to internal pages” or type “external link”. With this setting you can override the global settings for targets in your page. Page id/external url parameter is loaded into “current” (TS data array). This option has no influence on links pointing to normal news records. The target of these links ist configured globally for the whole page. Example: if you have a page with frames and you want to open links to pages & external urls in a new browser window, use this setting: plugin.tt_news { pageTypoLink.target > pageTypoLink.target = _blank }	
itemLinkTarget	string	Target for the links on category images that choose a certain category. This is only needed if you want to overwrite the global settings for “PAGET_TARGET” from constants. If you, f.e. use a LATEST element to control a LIST in another frame, set this to the frame name.	
archiveTypoLink	->typolink	Typolink configuration for links that point to the news archive. This is not a full featured “typolink config array” – only the attributes “parameter” and “addParams” are processed. used in the “LATEST” element (example html-template) for the link that points to the page with the archive listing (marker: ###GOTOARCHIVE###) used for links in the “AMENU” element (archive menu). If you want the links in the archive menu point to another page, you can enter the PID of this page here. Example: # points to the page with id=34 and adds '&myvar=foo' to all links. plugin.tt_news { archiveTypoLink.parameter = 34 archiveTypoLink.addParams = &myvar=foo }	
linkTitleField	string /stdWrap	Here you can define a field whose content will be inserted as “title” attribute in links pointing to the SINGLE view. Example: This will insert the content of the field “title” from the tt_news db-record as attribute “title” prepended with “go to ”. plugin.tt_news.displayList { linkTitleField = title linkTitleField.wrap = go to&nbsp; | } The final link should look like this: <a href=”news/single/title.html” title=”go to title”>the title</a>	

Global Wraps

If you use the new css-based html-template you don't need to define “Global Wraps” and “Global Colors” because the complete visual formating is done with CSS-tyless. But of course those wraps and markers can be used for other purposes.

Property:	Data type:	Description:	Default:
wrap1	-> stdWrap	Global Wrap 1. This will be splitted into the markers ###GW1B### and ###GW1E###. Don't changes the input value, only wrap it in something. Example: plugin.tt_news.wrap1.wrap = <strong> | </strong>	
wrap2	-> stdWrap	Global Wrap 2 (see above) Note: the “Global Wraps” and the “Global colors” are not used in the TS setup for the css based template.	
wrap3	-> stdWrap	Global Wrap 3 (see above)	
color1	string /stdWrap	Value for ###GC1### marker (Global color 1)	
color2	string /stdWrap	Value for ###GC2### marker (Global color 2)	
color3	string /stdWrap	Value for ###GC3### marker (Global color 3)	
color4	string /stdWrap	Value for ###GC4### marker (Global color 4)	

Search Settings

Property:	Data type:	Description:	Default:
searchPid	int+	Page id where searchresults are displayed. If you want all news searches to go to a specific page, enter the PID here! NOTE: If you set this PID, all searchqueries will (must) be handled with a list content element with the code "SEARCH" on that page.	
emptySearchAtStart	boolean	If this is set the “SEARCH” content element will show an empty list at start. Otherwise the full list of items is shown.	1
searchEmptyMsg_stdWrap	->stdWrap	stdWrap for the messages from the news-search: “no results” & “no searchword given”.	

Pagebrowser Settings

Property:	Data type:	Description:	Default:
noPageBrowser	boolean	Set this to “1” to completely disable the pagebrowser for all tt_news content elements in a page (can also be set directly in a content element to disable the pagebrowser only for this content element). Useful in combination with “excludeLatestFromList” or “listStartId”, set from the content element.	0
latestWithPagebrowser	boolean	If this is set, the LATEST template can also contain a pagebrowser (you'll have to add one to your template first). If this is not set (default) the contents of LATEST are not influenced by the pagebrowser.	0
usePiBasePagebrowser	boolean	Here you can configure if the pagebrowser for LIST and LATEST should be rendered by the TYPO3 core class “tslib_pibase” or if the internal pagebrowser from tt_news should be used (the pagebowser can also be renderd by a userfunction -> see “userPageBrowserFunc”). All pagebrowsers will be configured with the configuration array “pagebrowser.”. Since TYPO3 3.8.0 the internal pagebrowser from class.tslib_pibase offers some very nice features and its output is completely configurable (see below). If you use a TYPO3 version below 3.8.0 I recommend to use the pagebrowser from tt_news because it supports caching and it's also possible to use HTML (e.g. images) as “previous” and “more” links.	0
pageBrowser	pageBrowser configuration array	Configuration array for the pagebrowser. All properties of the pagebrowser are configured in this array.	

-> pageBrowser.[options]

This is the configuration array for the pagebrowser. All settings here start with “pageBrowser.”. The formating of the pagebrowser is done by CSS. See _CSS_DEFAULT_STYLE at the end of this list for an example.

Property:	Data type:	Description:	Default:
maxPages	int+	The maximum number of pages that are shown in the pagebrowser	7
showPBrowserText	boolean	Here you can choose if the pagebrowser should show texts like “page 1, page...” in the pagelinks or if it should show only numbers.	1
dontLinkActivePage	boolean	If this is set to 1 the current page is not linked linked in the pagebowser	1
tableParams	string	If you didn't set a “browseLinksWrap” you can add parameters for the table that wraps the pagebrowser here. Example: (default setting) plugin.tt_news { pageBrowser { maxPages = 10 showPBrowserText = 1 tableParams = cellpadding=2 showResultCount = 1 } } Hint: If you want to change the default texts like “previous” to something else, you can do this with the TS var “_LOCAL_LANG” (see example at the end of this table). For the names of the language markers see: pi/locallang.xml but don't change the values in this file – they will be overwriiten when you update tt_news. You can change the language labels with the extension “llxmltranslate”.	
showResultCount	0,1,2	In TYPO3 below 3.8.0 this configures if the result count (e.g.: “Displaying results 1 to 4 out of 22”) should be shown above the pagebrowser. In TYPO3 version 3.8.0 this var can have 3 values: 0: only the result-browser will be shown 1: (default) the text "Displaying results..." and the result-browser will be shown. 2: only the text "Displaying results..." will be shown	1
alwaysPrev	boolean	If this is enabled the “previous” link will always be visible even when the first page is displayed.	0
showFirstLast	boolean	This is used as switch if the two links named "<< First" and "Last >>" will be shown and point to the first or last page. If “showFirstLast” is enabled “alwaysPrev” will be overwritten (set to 1).	0
hscText	boolean	Here you can choose if the texts for the pagebrowser (eg: “next”, “Displaying reaults...”) will be parsed through the PHP function htmlspecialchars() or not. Disable this if you want to use HTML in the texts f.e. for graphical “next” and “previous” links.	1
pagefloat	int / keyword	This defines were the current page is shown in the list of pages in the pagebrowser. If this var is an integer it will be interpreted as position in the list of pages. If its value is the keyword "center" the current page will be shown in the middle of the browse links.	0
showRange	boolean	This var switches the display of the pagelinks from numbers to ranges f.e.: 1-5 6-10 11-15... instead of 1 2 3...	0
browseBoxWrap	stdWrap	This is the wrap for the complete pagebowser (results and browse links). This wrap and the following ones are only available in TYPO3 3.8.0 or higher. Example: plugin.tt_news.pageBrowser { browseBoxWrap.wrap = <div class="browseBoxWrap">|</div> showResultsWrap.wrap = <div class="showResultsWrap">|</div> browseLinksWrap.wrap = <div class="browseLinksWrap">|</div> showResultsNumbersWrap.wrap = <span class="showResultsNumbersWrap">|</span> disabledLinkWrap.wrap = <span class="disabledLinkWrap">|</span> inactiveLinkWrap.wrap = <span class="inactiveLinkWrap">|</span> activeLinkWrap.wrap = <span class="activeLinkWrap">|</span> }	
showResultsWrap	stdWrap	This wraps the text “Displaying results...”.	
browseLinksWrap	stdWrap	Wrap for the browse links.	
showResultsNumbersWrap	stdWrap	wrap for the numbers in the text: “Displaying results 1 to 4 out of 22 ”.	
disabledLinkWrap	stdWrap	wrap for disabled links (f.e the “Last >>” link on the last page).	
inactiveLinkWrap	stdWrap	wrap for inactive links (normal links).	
activeLinkWrap	stdWrap	wrap for active links.	

Archive Settings

Property:	Data type:	Description:	Default:
archive	int	Use this if you want to configure a news LIST element inserted by TS to show only archived or non-archives items (this values will be overwritten by values set directly in the tt_news content element) -1 = show only non-archived 0 = don't care 1 = show only archived Example: This will setup a news content-element to display only archived items plugin.tt_news.archive = 1 Note: The LATEST and the AMENU elements are not affected by archive settings. Neither by the settings from TS nor from the Flexforms settings.	
datetimeDaysToArchive	int (days)	If this is set, news are automatically in the archive after the given number of days has passed according to their initial datetime value. Note: this setting will have priority over a possibly given archivedate. For more information, see section “The Archive” in this manual Example: This handles all news records older than 30 days as archived. plugin.tt_news.datetimeDaysToArchive = 30	0
datetimeHoursToArchive	int (hours)	Same as datetimeDaysToArchive but for hours (can't be combined with datetimeDaysToArchive and datetimeMinutesToArchive).	0
datetimeMinutesToArchive	int (minutes)	Same as datetimeDaysToArchive but for minutes (can't be combined with datetimeDaysToArchive and datetimeHoursToArchive). Note: If you are using datetimeHoursToArchive or datetimeMinutesToArchive son't forget to set the lifetime of the pagecache to a value that actually allows such short archiving periods	0
enableArchiveDate	boolean	If set, the field "archivedate" is activated for selecting of news records.	1
emptyArchListAtStart	boolean	If this is set, a news LIST element showing only archived items will show nothing at first view, without any given "periodStart"(pS) or "Lenght"(pL) from GET vars. The default is to show all archived items, starting from the first item in the archive.	
reverseAMenu	boolean	If set, newer archive menu items are displayed first	1
archiveMode	string	Determines which archive mode is used possible values: “month”, “year” or “quarter” (see “archiveTitleCObject”) Example: plugin.tt_news.archiveMode = month	month
archiveTitleCObject	cObject	cObject that renders the title of the archive periods. Note that the data array (current) of the cObject is loaded with an array with the keys: “start” - starting time of period “stop” - ending time of period “quarter” - the quarter of the period (1-2-3-4) “count” - number of news items in this period Example: plugin.tt_news.archiveTitleCObject { 10 = TEXT 10.field = start 10.strftime = %B - %Y } More advanced Example: This will display an AMENU in quarter periods like this: “Jan - Mar 2005: 3 items”. The selected archive period is displayed in bold text. plugin.tt_news { reverseAMenu = 0 archiveMode = quarter archiveTitleCObject > archiveTitleCObject = COA archiveTitleCObject { 10 = COA 10 { 10= TEXT 10 { field = start strftime = %b -&nbsp; wrap = <strong>| } 11 = TEXT 11 { field = stop strftime = %b %Y wrap = |</strong> } if { value.field = start equals.data = GPvar:tx_ttnews|pS } } 20 = COA 20 { 10= TEXT 10 { field = start strftime = %b -&nbsp; wrap = } 11 = TEXT 11 { field = stop strftime = %b %Y wrap = } if { value.field = start equals.data = GPvar:tx_ttnews|pS negate = 1 } } } }	
archiveMenuNoEmpty	boolean	If set, there will be no empty elements in the archive menu	1
archiveHeader_stdWrap	->stdWrap	stdWrap for the archive header.	
archiveEmptyMsg_stdWrap	->stdWrap	stdWrap for the message, that is displayed if no archived items are found at all	

Display Settings for “SINGLE”,”LIST” and “LATEST”

Property:	Data type:	Description:	Default:
general_stdWrap	->stdWrap	The fields “bodytext”, “short” (subheader) and “links” will be processed by this stdWrap settings. Example: plugin.tt_news { general_stdWrap > general_stdWrap { parseFunc < tt_content.text.20.parseFunc } } This will clear any given “general_stdWrap” from default setup, and parse the content from tt_news through the same parseFunc as normal content like “text” or “text with image”. The handling of the content from RTE depends also on the global settings for the RTE and the RTE-transformations. See section “The Rich-Text-Editor” in this manual.	
excludeLatestFromList	boolean	[deprecated] use "excludeAlreadyDisplayedNews" Set this to exclude news records shown in “LATEST” from appearing again in a “LIST” on the same page. Note: set this only for the page showing the “LIST” element. Otherwise it will affect all lists in your site.	0
listStartId	int+	[deprecated] use "excludeAlreadyDisplayedNews" Here you can set the number of the news item which will be displayed as first item in lists. This works also with the LATEST template. In combination with “limit” you can create complex combinations of several tt_news content elements on one page without displaying double news articles. Example: This will display a list of 3 news-articles starting from the 5th record, found in the db. (counting starts at zero) plugin.tt_news { listStartId = 4 limit = 3 }	
excludeAlreadyDisplayedNews	boolean	This option allows you to place multiple news plugins on one page where each plugin itself takes care that no newsarticle is displayed twice. This feature makes the options "excludeLatestFromList" and "listStartId" obsolete. If "excludeAlreadyDisplayedNews" is enabled "excludeLatestFromList" and "listStartId" will be ignored.	0
displayArchivedInLatest	boolean	By setting this to “1” you can display archived news in the “LATEST” template	0
listOrderBy	string	Here you can set the “ORDER BY” part of the query for LIST and LATEST view. The special keyword ”random” will trigger randomized ordering of news in lists. Use this with care: The query parts, given from TS are only trimmed and not further validated -> if the field don't exist, you'll get a mysql-error Example: this will order the records by title, beginning with Z: plugin.tt_news.listOrderBy = title desc This will order the news by random: plugin.tt_news.listOrderBy = random Hint: if you set “asc” or ”desc” from the tt_news content-element (flexform) then the “asc/desc” part of listOrderBy will be ignored to prevent a mysql error.	datetime desc
listGroupBy	string	The “GROUP BY” part of the query: if you set “listGroupBy = category” the string “category” is processed in a special way, because the tt_news_cat_mm table is not joined by default. This simulates the “group by category” functionality by joining the mm table to the tt_news table. (see line 745 in class.tx_ttnews.php). Restriction: This works only correct, if the news records have only one category assigned. Example: This will fill the object “lib.newsLatest” with a news content-element that displays only the newest item of each category lib.newsLatest < plugin.tt_news lib.newsLatest { code > code = LATEST catImageMode = 0 catTextMode = 1 listOrderBy = title asc listGroupBy = category }	
title_stdWrap	->stdWrap	stdWrap for display of the title field.	
author_stdWrap	->stdWrap	stdWrap for display of the author field.	
email_stdWrap	->stdWrap	stdWrap for display of the email field.	
subheader_stdWrap	->stdWrap	stdWrap for display of the news subheader (short). Example: plugin.tt_news.displayList.subheader_stdWrap { crop = 300 | ... | 1 ifEmpty.field = bodytext } This will crop the subheader after 300 characters and add “...” at the end of the text. (the third parameter for cropping only at the end of a word, works only with TYPO3 >=3.7.0). If the subheader field (short) is empty, the content of the bodytext field is taken instead. subheader_stdWrap is only active if the subheader is filled to the template marker ###NEWS_SUBHEADER### and not for the register “newsSubheader”. see section “Registers” in this manual for more information.	
content_stdWrap	->stdWrap	stdWrap for display of the news content (field: bodytext).	
keywords_stdWrap	->stdWrap	stdWrap for display of the news keywords. This wrap Is only active if the content of the field “keywords” is filled to the Template marker ###NEWS_KEYWORDS### and not for the register “newsKeywords”. see section “Registers” in this manual for more information.	
links_stdWrap	->stdWrap	stdWrap for the complete links section in the SINGLE view	
linksHeader_stdWrap	->stdWrap	stdWrap for header of the links section.	
linksItem_stdWrap	->stdWrap	stdWrap for a single link.	
addInfo_stdWrap	->stdWrap	This stdWrap wraps the complete list of additional data. It is inserted if there is at least one of the following items present: related news, files, links or “related news by category”.	
useBidirectionalRelations	boolean	If you set a relation between two news-records and you enable this feature you'll see the relation in both records on the website. The relation back from the target-record to the source is inserted automatically. In the BE you won't see the relation. Example: plugin.tt_news.useBidirectionalRelations = 1	
usePagesRelations	boolean	If you enable this feature you can assign pages as related news. Those “related pages” are handled as news with type set to “link to internal page” so no changes to the TS of the getRelatedCObject are needed.	
related_stdWrap	->stdWrap	stdWrap for the list of related news.	
relatedHeader_stdWrap	->stdWrap	stdWrap for the header of the “related news” section.	
alwaysShowRelated	boolean	Enable this if you want to show related news in LIST or LATEST, too. In the default setup this option is disabled to make the listview render faster. To see the related news in LIST or LATEST you have to add the markers ###TEXT_RELATED### and ###NEWS_RELATED### to your template for the listview.	
getRelatedCObject	COA / ->stdWrap	Configuration for the related links in “SINGLE” view. The first case (10.default) configures the links to other news. The cases 10.1 and 10.2 configure the links to internal pages and external URLs (news types: article & external URL). You can set an individal wrap for each type of related news. The tmp object “tmp.5” is used to add an icon for each type of link the “tmp.20” object is the datetime of the related item which is appended after the link. Example: plugin.tt_news { ### Settings for Related News: related_stdWrap.wrap = <dl class="news-single-related">|</dl> relatedHeader_stdWrap.wrap = <dt>|</dt> # icon for related news tmp.5 = IMAGE tmp.5 { file = EXT:tt_news/ext_icon.gif file.width = 11 file.height = 12 wrap = | &nbsp; } # end-wrap for the getRelated objects tmp.20 = TEXT tmp.20 { field = datetime strftime = %d-%m-%y %H:%M wrap = &nbsp;-&nbsp; | } # Build the list of related news: getRelatedCObject = COA getRelatedCObject { # groupBy = orderBy = datetime desc 10 = CASE 10.key.field = type # settings for 'normal' related news 10.default = COA 10.default { wrap = <dd> | </dd> 5 < plugin.tt_news.tmp.5 10 = TEXT 10.field = title 10.typolink.parameter = {$plugin.tt_news.singlePid} 10.typolink.additionalParams.data = register:newsAddParams 10.typolink.useCacheHash = 1 20 < plugin.tt_news.tmp.20 } # settings for related news, that point to internal pages 10.1 = COA 10.1 { wrap = <dd> | </dd> 5 < plugin.tt_news.tmp.5 5.file = EXT:tt_news/res/tt_news_article.gif 10 = TEXT 10.field = title 10.typolink.parameter.field = page 20 < plugin.tt_news.tmp.20 } # settings for related news, that point to external URLs 10.2 = COA 10.2 { wrap = <dd> | </dd> 5 < plugin.tt_news.tmp.5 5.file = EXT:tt_news/res/tt_news_exturl.gif 10 = TEXT 10.field = title 10.typolink.parameter.field = ext_url 20 < plugin.tt_news.tmp.20 } } }	
getRelatedCObject.orderBy	string	Add an “ORDER BY”-clause to the query that finds the related news. Example: plugin.tt_news.getRelatedCObject.orderBy = title	
getRelatedCObject.groupBy	string	Add an “GROUP BY”-clause to the query that finds the related news. Example: plugin.tt_news.getRelatedCObject.groupBy = type	
noNewsIdMsg_stdWrap	->stdWrap	stdWrap for the error message that is diplayed when a user enters the single-view page without the GET var &tx_ttnews[tt_news].	
noNewsToListMsg_stdWrap	->stdWrap	stdWrap for the error message that appears if there are no new found to display in the list view. Example: plugin.tt_news.noNewsToListMsg_stdWrap.wrap = <p>|</p>	
substitutePagetitle	boolean	if this is set, the pagetitle and the title for the page that is indexed by the indexed_search are substituted with the title of the news article. (works only in the “SINGLE”-view). Example: plugin.tt_news.substitutePagetitle = 1	
showRelatedNewsByCategory	boolean	Enable this if you want that the SINGLE view shows a list of news articles with the same category as the current article. If news with the same category are found, they will be rendered as LIST to the marker “###NEWS_RELATED_BY_CATEGORY###”. By default the code LIST causes tt_news to render the content to the template ###TEMPLATE_LIST### This can be changed to a userdefined template part which f.e contains only the titles of the records. See section “Related news by category” for an example.	

SINGLE view with pagebreaks

Property:	Data type:	Description:	Default:
useMultiPageSingleView	boolean	This enables pagebreaks for the SINGLE view or is enabled automaticly when “maxWordsInSingleView” has a value. Pagebreaks are inserted after a certain amount of words or with the manually inserted “pageBreakToken”'. Example: This will enable pagebreaks for the single view if no value for “maxWordsInSingleView” exists. plugin.tt_news { useMultiPageSingleView = 1 }	0
pageBreakToken	string	This will overwrite the default pagebreak token (<---newpage--->) with a different string. Example: This sets the pagebreak token to <break>. plugin.tt_news { pageBreakToken = <break> }	<---newpage--->
maxWordsInSingleView	int+	Insert pagebreaks automatically after a given amount of words. Can be configured globally or for a single content element. This can be disabled for news records individually by setting “no automatic pagebreaks for this record” .	0
useParagraphAsPagebreak	boolean	Here you can configure that pagebreaks will be inserted after a paragraph (an empty line in the bodytext field after pressing enter) instead of inserting them after the first dot after “maxWordsInSingleView” was reached. Hint: If you enable this and set “maxWordsInSingleView” to a small value (e.g. 3) a paragraph will function as pagebreak token.	0
singleViewPointerName	string	If you want to change the name of the GETvar that is used for the pointer of the pagebrowser in SINGLE view, it's possible to set this name here. Example: this will set the pointer in single view to 'page'. plugin.tt_news { singleViewPointerName = page }	sViewPointer
subheaderOnAllSViewPages	boolean	By default the subheader is only displayed on the first page of a multipage SINGLE view. If this is not wanted the subheader can be configured to appear on all those pages by setting “subheaderOnAllSViewPages” to 1.	0
appendSViewPBtoContent	boolean	The pagebrowser for the SINGLE view can be inserted into the content in two different ways: 1. There is a separate marker for the pagebrowser in SINGLE view: ###NEWS_SINGLE_PAGEBROWSER### 2. Alternatively it is possible to simply append the pagebrowser to the bodytext (###NEWS_CONTENT###) without using a special marker by setting “appendSViewPBtoContent” to 1. Example: This will append the pagebrowser to the end of the bodytext plugin.tt_news { appendSViewPBtoContent = 1 }	0

News Images

Property:	Data type:	Description:	Default:
imageCount	int+	Number of images from the list of images to display. Example: This will supress images in list view. plugin.tt_news.displayList.imageCount = 0	1
imageWrapIfAny	wrap	If there is any image code returned, this wraps those images	
image	->imgResource ->stdWrap	Configurates the image(s) in news items. Example: plugin.tt_news.displayList.image { file.maxW = 120 file.maxH = 90 imageLinkWrap = 1 stdWrap.spaceAfter = 5 } see: TSref->imgResource	
image.noImage_stdWrap	->stdWrap	This allows you to set an image which is shown if no image is attached to the news article. Example: This will render an image with the text “No image” on it in the LIST view: plugin.tt_news.displayList.image.noImage_stdWrap { cObject = IMAGE cObject { wrap = file = GIFBUILDER file { XY = {$plugin.tt_news.listMaxW},{$plugin.tt_news.listMaxH} backColor = #ffffff 10 = TEXT 10 { text = No image fontSize = 14 niceText = 1 fontColor = #000000 offset = {$plugin.tt_news.listMaxW}/2-30, {$plugin.tt_news.listMaxH}/2+4 } } } }	
caption_stdWrap	->stdWrap	stdWrap for display of the image caption(s).	
firstImageIsPreview	boolean	If this is set to 1, the first image of a news article is handled as "preview image". This means this image is only displayed in LIST & LATEST view and not in SINGLE view. (if only one image is atached to the news item this parameter does not have any effect). Example: plugin.tt_news.firstImageIsPreview = 1	
forceFirstImageIsPreview	boolean	Works like firstImageIsPreview but always removes the first image from SINGLE view, even if only one image is attached.	

News Files

Property:	Data type:	Description:	Default:
newsFiles	-> filelink	Here you can specify the options for the displaying and linking of files, attached to news items. See: TSref->filelink Example: (default configuration) plugin.tt_news { newsFiles_stdWrap.wrap = <dl class="news-single-files">|</dl> newsFilesHeader_stdWrap.wrap = <dt>|</dt> newsFiles { path = uploads/media/ icon = 1 stdWrap.wrap = <dd>|</dd> } }	
newsFilesHeader_stdWrap	->stdWrap	stdWrap for the header of the “attached files” section in your template.	
newsFiles_stdWrap	->stdWrap	stdWrap for the list of attached files	

Date & Time wraps

Property:	Data type:	Description:	Default:
date_stdWrap	->stdWrap	Here you can set the date formating for the template-marker: ###NEWS_DATE###. Example: plugin.tt_news.displayList { date_stdWrap.strftime= %A %d. of %B %Y } This will display the date in news LIST content elements like this: “Sunday 15. of August 2004”.	
time_stdWrap	->stdWrap	Here you can set the time formating for the template-marker: ###NEWS_TIME###. Example: plugin.tt_news.displaySingle { time_stdWrap.strftime = %H:%M } This will display the time in news SINGLE content elements like this: “12:03”.	
age_stdWrap	->stdWrap	stdWrap for display of ages. Instead of the value “1” ( = display default strings for ages) you can also add your own names for minutes, hours, days and years: Example: This will change the output of the age in the SINGLE view to german names: plugin.tt_news.displaySingle { age_stdWrap.age = Minuten | Stunden | Tage | Jahre } Note: More about the stdWrap properties “strftime” and “age” can be found here: TSref->stdWrap	1
textNewsAge_stdWrap	->stdWrap	stdWrap for the age text: ( “age:”)	

Category Settings

Property:	Data type:	Description:	Default:
useSubCategories	boolean	This enables the use of subcategories for selecting news for display in the FrontEnd.	
displaySubCategories	boolean	This enables the display of subcategories in the FrontEnd. Example: plugin.tt_news { useSubCategories = 1 displaySubCategories = 1 }	
catExcludeList	string	List of categories that should not be displayed in news articles in LIST, LATEST and SINGLE.	
categoryMode	int	Use this, if you want to configure a news conetnt element, inserted by TS to display news by their categories (this value will be overwritten by values set directly in the news content-element). 2 = Show news which have all selected categories assigned (AND) 1 = Show news which have at least one of the selected categories assigned (OR) 0 = Show all. Don't care about category selections -1 = Show news which not have all of the selected categories assigned (AND) -2 = Show news which have none of the selected categories assigned (OR) Example: plugin.tt_news.categoryMode = -1 This will only display news with categories NOT selected in "categorySelection" Note: If the GETvar “&tx_ttnews[cat]=” is present, the selection from GETvars will have priority over the selection made in the content-element or by TS.	
categorySelection	Int+ / list / ->stdWrap	If you want to display only new with certain categories in a news content element that is inserted by TS, set the selection with “categorySelection”. Note: To make this work you'll also have to set the categoryMode to 1 (=show selected) Example: # this will only show items with category 2 or 3 plugin.tt_news { categorySelection = 2,3 # show only selected categories categoryMode = 1 } “categorySelection” has also stdWrap properties.If you want to get the selected categories f.e. from the “getText” object something like this should work: plugin.tt_news { categorySelection.data = register:whatever }	
catImageMode	int	Display mode for category images. 0 – No category images will be displayed 1 – Category images will be displayed but not linked 2 – Category images will be displayed and function as shortcut link. 3 – Category images will be displayed and function as category selector Example: # don't display any category images plugin.tt_news.catImageMode = 0	2
catTextMode	int	Display mode for category texts (titles). 0 – No category texts will be displayed 1 – Category texts will be displayed but not linked 2 – Category texts will be displayed and function as shortcut link. 3 – Category texts will be displayed and function as category selector Example: # don't display any category titles plugin.tt_news.catTextMode = 0	1
catSelectorTargetPid	Int+	Set this value to let the links from categories in “catSelector” mode point to another page than the current page (catImageMode or catTextMode = 3).	
latestWithCatSelector	boolean	By default, the “LATEST” element is not influenced by the selection made with the catselector. If you want to allow this, set this var to 1. Example: plugin.tt_news.latestWithCatSelector=1	
amenuWithCatSelector	boolean	The same as above for the “AMENU” element.	
category_stdWrap	->stdWrap	stdWrap for the complete category section.	
categoryTitles_stdWrap	->stdWrap	stdWrap for all category titles.	
categoryImages_stdWrap	->stdWrap	stdWrap for all category images.	
categoryTitleItem_stdWrap	->stdWrap	stdWrap for a single category title.	
subCategoryTitleItem_stdWrap	->stdWrap	stdWrap for a single subcategory title. Example: plugin.tt_news { displayList { subCategoryImgItem_stdWrap.wrap = <span class="scat-img">|</span> subCategoryTitleItem_stdWrap.wrap = <span class="scat-title">|</span> } }	
categoryImgItem_stdWrap	->stdWrap	stdWrap for a single category image.	
subCategoryImgItem_stdWrap	->stdWrap	stdWrap for a single subcategory image.	
catImageMaxWidth	int+	Maximum width of category images.	20
catImageMaxHeight	int+	Maximum height of category images.	20
catTextLength	int+	Maximum length in characters of all category titles. Note: This var makes only sense, when using the catTextMode 1 (= display but don't link). If the category title is linked, the chars of the html code are counted also and the cropping causes broken HTML.	
maxCatImages	int+	Maximum number of displayed category images.	
maxCatTexts	int+	Maximum number of displayed category texts.	
catOrderBy	string	By default categories that are assigned to a news-record are displayed on the website in the same order as they are ordered in the category field in the tt_news db-record. If you want to change this, you can set “catOrderBy” to f.e. “title” to order the categories alphabetically. The ordering of categories in the CATMENU content element is influenced by this parameter, too, but it's of course (who wonders? ;-)) possible to set the ordering of categories in the catmenu different from the ordering in LIST, LATEST or SINGLE (see Example 2). Example: # this will order the categories in news articles and in the CATMENU alphabetically plugin.tt_news { catOrderBy = title } Example 2: plugin.tt_news { # order categories in LIST by uid displayList.catOrderBy = uid # order categories in SINGLE and CATMENU by title displaySingle.catOrderBy = title displayCatMenu.catOrderBy = title } Note: The value you insert here is only trimmed and not further validated. If you enter a field that does not exist in the tt_news table, you'll get a MySQL error.	
useSPidFromCategory	boolean	Here you can enable the use of the singlePid which is configured in the category record.	0
categoryDivider	string	The value inserted here appears between the category titles which are shown in news records.	,
categoryDivider_stdWrap	->stdWrap	This is the stdWrap for the categoryDivider. Since it is not possible to insert a space with a string value in TypoScript this wrap is used to insert the space after the comma in the default setup. Example: # This is the default setup plugin.tt_news { categoryDivider = , categoryDivider_stdWrap.noTrimWrap = || | }	

Settings for the CATMENU -> displayCatMenu.[options]

This is the configuration array for the content element “CATMENU”. All settings here start with “displayCatMenu.”

Property:	Data type:	Description:	Default:
mode	string	The “render mode” for the catmenu. Currently the following modes are supported: tree (default): The category menu will be rendered like the categories in BE fields. The shown “tree” is build by images and can show userdefinded icons. nestedWraps : This mode will render a category menu where each level has its onwn wrap. Example: plugin.tt_news { displayCatMenu { mode = nestedWraps } }	tree
excludeList	string	Uid (or comma seperated list of uids) of the categories which should not appear in the category menu	
includeList	string	Uid (or comma seperated list of uids) of the categories which should be shown in the category menu. Example: plugin.tt_news { displayCatMenu.excludeList = displayCatMenu.includeList = }	
catmenuIconMode	int	The “catmenuIconMode” defines how icons in the catmenu will be displayed: -1 = display no icons at all 0 = display the default icon (tt_news_cat.gif) 1 = display image from category record as icon 2 = display the icon which is configured as “catmenuIconFile” (default: EXT:tt_news/res/arrow.gif)	0
catmenuIconPath	string	The icon files will be prepended by this path	
catmenuIconFile	imgResource	This configures the userdefined icons in “catmenuIconMode” set to 1 or 2 Example: plugin.tt_news { displayCatMenu { catmenuIconMode = 2 catmenuIconFile = EXT:tt_news/res/arrow.gif catmenuIconFile { width = 18 height = 16 } } } For “catmenuIconMode” 1 no file is needed only width and height	
insertDescrAsTitle	boolean	If this is enabled the content of the field “description” from the category db-record will be inserted as “alt” and “title” attributes to the catselector links.	1
catmenuNoRootIcon	boolean	disables the “root” icon in mode “tree”.	1
catmenuRootIconFile	imgResource	Imagefile for the root icon (see “catmenuIconFile”)	
catmenu_stdWrap	->stdWrap	stdWrap for the complete CATMENU. Example: plugin.tt_news { displayCatMenu { catmenu_stdWrap.wrap = <div class="news-catmenu">|</div> } }	
catmenuHeader_stdWrap	->stdWrap	stdWrap for the header of the CATMENU. Example: plugin.tt_news { displayCatMenu { catmenuHeader_stdWrap.wrap = <p class="news-catmenu-header">|</p> } }	
catmenuItem_ACT_stdWrap	->stdWrap	stdWrap for an active link in the CATMENU. Example: plugin.tt_news { displayCatMenu { catmenuItem_ACT_stdWrap.wrap = <strong>|</strong> catmenuItem_NO_stdWrap.wrap = | } }	
catmenuItem_NO_stdWrap	->stdWrap	stdWrap for a normal link in the CATMENU.	
catmenuLevel[#]_stdWrap	->stdWrap	stdWrap for a certain level in the CATMENU in mode “nestedWraps”. Substitute “[#]” with the number of the level (1 is first level). Example: plugin.tt_news { displayCatMenu { catmenuLevel1_stdWrap.wrap = <div class="level1">|</div> catmenuLevel2_stdWrap.wrap = <div class="level2">|</div> catmenuLevel3_stdWrap.wrap = <div class="level3">|</div> catmenuLevel4_stdWrap.wrap = <div class="level4">|</div> catmenuLevel5_stdWrap.wrap = <div class="level5">|</div> } }	

Settings for the catRootline -> catRootline.[options]

The category rootline is rendered to the template marker ###NEWS_CATEGORY_ROOTLINE###. All settings here start with “catRootline.”

Property:	Data type:	Description:	Default:
showCatRootline	boolean	If this is enabled tt_news will show the category rootline	0
catRootline_stdWrap	->stdWrap	StdWrap for the complete category rootline. Example: plugin.tt_news { # settings for the category rootline catRootline { showCatRootline = 1 catRootline_stdWrap.wrap = <div class="news-catRootline">|</div> # if titles are linked the link points to the page which is configured as category shortcut linkTitles = 1 title_stdWrap.wrap = divider = &nbsp;&gt;&nbsp; } }	
linkTitles	boolean	Switch which configures if categories are linked or not.	1
title_stdWrap	->stdWrap	stdWrap for a single category title in the category rootline	
divider	string	This string is inserted between the category titles in the category rootline	

Display Settings for “XML”

Property:	Data type:	Description:	Default:
rss091_tmplFile	resource	XML template for RSS 0.91 feed	
rss2_tmplFile	resource	XML template for RSS 2.0 feed	
atom03_tmplFile	resource	XML template for Atom 0.3 feed	
atom1_tmplFile	resource	XML template for Atom 1.0 feed	
rdf_tmplFile	resource	XML template for RDF feed	
xmlFormat	string	Defines the format of the news feed. Possible values are: rss091, rss2, rdf, atom03 and atom1	rss2
xmlTitle	string	The title of your news feed. (required for rss091, rss2, rdf, atom03, atom1)	
xmlLink	string	The link to your hompage. (required for rss091, rss2, rdf, atom03, recommended for atom1)	
xmlDesc	string	The description of your news feed. (required for rss091, rss2, rdf, optional for atom03, optional for atom1)	
xmlLang	string	Your site's language. A list of allowable is available at http://backend.userland.com/stories/storyReader$16 (required for rss091, optional for rss2, recommended for atom03, not available for rdf and atom1)	en
xmlIcon	string	Provide an icon for your news feed with preferred size of 16x16 px, can be gif, jpeg or png. (required for rss091, optional for rss2 and rdf, not available for atom03 and atom1) Example: plugin.tt_news.displayXML { xmlIcon = fileadmin/images/feedicon.gif }	
xmlCopyright	string	Copyright notice for content in the channel. Maximum length is 100 (optional for rss091, rss2, atom03, atom1, not available for rdf)	
xmlManagingEditor	string	The email address of the managing editor of the channel, the person to contact for editorial inquiries. Maximum length is 100. (optional for rss091, rss2, not available for rdf, atom03 and atom1)	
xmlWebMaster	string	The email address of the webmaster for the channel, the person to contact if there are technical problems. Maximum length is 100. (optional for rss091, rss2, not available for rdf, atom03 and atom1)	
xmlLastBuildDate	boolean	The last time the content of the channel changed. (when the latest news was added) (optional for rss091, rss2, required for atom03 and atom1, not available for rdf)	1
xmlLimit	int+	Limit for news records in the RSS/XML feed Example: plugin.tt_news.displayXML { xmlLimit = 10 }	10
xmlCaching	boolean	Allow caching for the RSS/XML feed	1
dontInsertSiteUrl	boolean	If set, the links in the XML feeds are not preprended with the siteUrl.	0
xmlDeclaration	string	In XML-feeds from tt_news the template marker ###XML_DECLARATION### will be substituted with this string: <?xml version="1.0" encoding="iso-8859-1"?> The “encoding” attribue will be substituted with the globally configured charset (config.metaCharset). If you if you want to override the default xml-declaration with a given string, you can do this by setting an own xmlDeclaration. Example: plugin.tt_news.displayXML { xmlDeclaration = <?xml version="1.0" encoding="utf-8"?> }	

Language settings

Property:	Data type:	Description:	Default:
sys_language_mode	string	This configures how not-translated new-records are handled. possible values: “strict”. (if a value for “page.config.sys_language_mode” is given and “plugin.tt_news.sys_language_mode” is empty, tt_news will take this value) Default is to display the record in the default language (sys_language_uid=0) if there is no translation available. Setting the “sys_language_mode” to “strict” will only display records in the choosen language. Example: plugin.tt_news.sys_language_mode = strict see: TSref->CONFIG -> search: “sys_language_mode”	
showNewsWithoutDefaultTranslation	boolean	If you have a website with two languages (english = default, german = 1) than the default is not to show news in the german translation that have no parent in the default language. With the the option “showNewsWithoutDefaultTranslation” it is possible to disable this behaviour.	0
showLangLabels		Display language labels and/or flags in news articles. The language labels are inserted in the html-template with the marker ###NEWS_LANGUAGE### . Example: plugin.tt_news { showLangLabels = 0 showFlags = 1 flagImage { file.maxW = 16 } }	0
showFlags	boolean	Display flag Image.	0
flagPath	string	Path to the flag-images. If this is empty, the flags from “typo3/gfx/flags/” are taken	
flagImage	-> IMAGE	Flag image configuration array.	

Other Settings

Property:	Data type:	Description:	Default:
defaultCode	string	If “code” (see above) is empty the value of defaultCode is taken instead. By default it's not set and a help screen will appear if “code” is also empty. By setting this parameter you can also define a different template part for displaying news-records with the “insert records” content element. Example: This will render records in the “insert records” content element with the LIST template (default is: SINGLE_RECORD_INSERT). plugin.tt_news.defaultCode = LIST	
displayCurrentRecord	boolean	If set, certain settings are manipulated in order to let the script render one or more single items as an "insert records" content-element. You can change between the SINGLE and the LIST view to display the items by setting the "defaultCode". The default template for this is a slightly changed version of the SINGLE template called "TEMPLATE_SINGLE_RECORDINSERT".	
itemMarkerArrayFunc	string	If this is set to a valid function name, the marker array from class tx_ttnews is processed by a user-defined function. See file: “res/example_itemMarkerArrayFunc.php” for description and needed TS setup.	
newsAmenuUserFunc	string	If this is set to a valid function name, the archive menu items are processed by a user function. See file: “res/example_amenuUserFunc.php” for an example of how to divide the Archive menu to years by a user function.	
imageMarkerFunc	string	Use this to process the image markers with your own userfunction. See file: “res/example_imageMarkerFunc.php” for an example, that wraps the images for the news single view in different wraps. -> useful for positioning the images by CSS.	
userPageBrowserFunc	string	With this userfunction you can substitute the build-in pagebrowser from tt_news with your own script. See file: “res/example_userPageBrowserFunc.php” for examples.	
_LOCAL_LANG	string	Here you can overwrite values from the language file. See ext/tt_news/pi/locallang.xml for a list of all translated words. Example: plugin.tt_news { _LOCAL_LANG.de { latestHeader = Das Allerneuste vom Neuen! more = [weiterlesen...] pi_list_browseresults_displays = Sie sehen Artikel ###SPAN_BEGIN###%s bis %s</span> von ###SPAN_BEGIN### %s</span> } }	
_CSS_DEFAULT_STYLE	string	Default CSS-styles for tt_news. Example: plugin.tt_news { _CSS_DEFAULT_STYLE ( /* example styles for the pagebrowser*/ .tx-ttnews-browsebox TD { font-size: 10px; } .tx-ttnews-browsebox-strong, .tx-ttnews-browsebox-SCell { font-weight: bold; } .tx-ttnews-browsebox-SCell { background-color: #EEE; } ) }	

FAQ

Q: There are 3 ways (constants, setup and flexforms) to set a value for the e.g. “SINGLE view” page. If I set all 3, which will win?
A: The flexform value from the tt_news content element will override values from TypoScript. In TS values set directly in the setup field will override values from the constant editor.
To see the current TS settings for a page, click on “Template” in the “Web” menu, choose this page in the pagetree, and open the “TypoScript Object Browser” on this page. (See screenshot at the beginning of this chapter).

TypoScript Examples:

Insert a news LATEST element in the left column, so that it is visible on all pages:

### News LATEST in left column

lib.newsLatest < plugin.tt_news

lib.newsLatest {

code >

code = LATEST

pid_list >

pid_list = 2,3 # the pids of the pages where your news are stored

catImageMode = 0

catTextMode = 0

}

# add tmp to page Object

page.subparts.NEWSLATEST < lib.newsLatest

If you don't use subparts in your TS, you can use something like this to insert "tmp.newsLatest" to your page object:

page.10.43 < lib.newsLatest

Render news-articles with graphical header in SINGLE view:

### SINGLE news with graphical header

plugin.tt_news {

displaySingle {

title_stdWrap.cObject = IMAGE

title_stdWrap.cObject.file = GIFBUILDER

title_stdWrap.cObject.file {

XY = [10.w]+2,30

backColor = #FFFFFF

10 = TEXT

10.text.field = title

10.text.case = upper

10.fontSize = 18

10.fontFile = t3lib/fonts/verdana.ttf

10.fontColor = #769400

10.offset = 1,20

10.antiAlias = 0

10.niceText = 1

}

}

}

The Category-Selector

[depreciated] Since tt_news 2.2.0 the category selector is a normal content element: CATMENU. So take this as a general TS example – maybe useful for other purposes.

This will insert a simple list of all tt_news categories from configurable folders to the left content-column. Clicking on a category link will display only news with the selected category. (highlights the current category)

### news Category Selector

page.10.subparts.left_content >

page.10.subparts.left_content = CONTENT

page.10.subparts.left_content {

table = tt_news_cat

select {

# the category folder(s)

pidInList = 124

}

renderObj = COA

renderObj.wrap = <div class="news-archive-item">|</div>

renderObj {

10 = TEXT

10.field = uid

10.dataWrap = <a href=index.php?id={TSFE:id}&tx_ttnews[cat]= | >

10.insertData = 1

20 = TEXT

20 {

field = title

wrap = <strong>|</strong>

if {

value.field = uid

equals.data = GPvar:tx_ttnews|cat

}

}

21 = TEXT

21 {

field = title

wrap = |

if {

value.field = uid

equals.data = GPvar:tx_ttnews|cat

negate = 1

}

}

30 = TEXT

30.value = </a><br />

}

}

Default news id

Insert the following lines to the setup field of an ext-template at the page where you want to display the latest news item in SINGLE view if no SINGLE view for another record was requested:

# hide the "no news id" message

plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg = &nbsp;

# set the tt_news singlePid to the current page

plugin.tt_news.singlePid = 977

# fill the content of the main-column to a tmp.object

tmp.pagecontent < page.10.subparts.contentarea

# clear the content of the main column

page.10.subparts.contentarea >

# build a new object for this column as content-object-array

page.10.subparts.contentarea = COA

page.10.subparts.contentarea {

10 = CONTENT

10.table = tt_news

10.select {

# insert the pids of all pages from where you want to fetch news.

# the recursive-field has no influence on this selection

pidInList = 1078,1079,1080,1081,1082,1083,1084

orderBy = datetime desc

max = 1

}

# insert the object “10.” only if there is no SINGLE news selected

10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news

# re-insert the normal pagecontent to the page

20 < tmp.pagecontent

}

The page in this example contains 2 columns. The news LIST is located in the left column. the main column (page.10.subparts.contentarea) contains a SINGLE news content-element.

LIST and SINGLE at the same page

With a small TypoScript condition it's possible to show the news SINGLE view at the same page where the LIST is. This has some advantages for realUrl links:

Insert this to the setup field:

# clear the code field

plugin.tt_news.code >

plugin.tt_news.code = LIST

# prevent indexing of the LIST view

config.index_enable = 0
[globalVar = GP:tx_ttnews|tt_news > 0]

# set code to SINGLE if the GETvar tx_ttnews[tt_news] exists
plugin.tt_news.code = SINGLE

# enable indexing of the SINGLE view

config.index_enable = 1
[global]
# clear main content in page object

page.10.subparts.content >

# load tt_news as content to the page object

page.10.subparts.content < plugin.tt_news

How to get rid of the <p class="bodytext"> wrap ?

Add one of the following lines to your TS-Setup field:

# this will remove the complete <p> tag from all news content elements
plugin.tt_news {
general_stdWrap {

parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

}

}

# this will remove the complete <p> tag from ALL content elements
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

# This will remove the <p class="bodytext"> wrap from subheader, author and links

plugin.tt_news {

# unset general_stdWrap

general_stdWrap >

displayList {

# add a wrap to the subheader

subheader_stdWrap.wrap = <p>|</p>

}

displaySingle {

# add parseFunc to the subheader

subheader_stdWrap.parseFunc < lib.parseFunc_RTE

# prevent adding of <p> tags

subheader_stdWrap.parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

# add parseFunc to the bodytext

content_stdWrap.parseFunc < lib.parseFunc_RTE

# add parseFunc to the links field

linksItem_stdWrap.parseFunc < lib.parseFunc_RTE

# prevent adding of <p> tags

linksItem_stdWrap.parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

}

}

Registers

Registers can be considered as a clipboard which is in this case used to traverse values from the tt_news class to the TypoScript setup.

Name:	Description:
newsMoreLink	This register is filled with the html-string for the more-link example: <a href="single/article/roeta-aula-dum/">more</a>
newsCategoryUid	This register holds the Uid of the category of the current news record. if there is more than on category assigned, the uid of that one is choosen that is first in the list of categories of the news record.
newsKeywords	This register is filled with the value of the field “Keywords”.
newsSubheader	This register is filled with the value of the field “Subheader” (short).

Alternative ”more”-Link

If you want the “more”-link to appear inside the wrap of the subheader, you can use the stdWrap-function “append” to wrap the content of the register “newsMoreLink” to the subheader. Now the “more”-link should appear in the same line (and the same <p> tag) as the subheader.
Example:

plugin.tt_news.displayList.subheader_stdWrap {

append = TEXT

append.data = register:newsMoreLink

append.wrap = <span class=”myclass”>|</span>

}

Conditional ”more”-Link

With one more line of Typoscript the alternative “more” link can be made conditional – means: it will show up when the field “bodytext” contains something.

Example:

plugin.tt_news.displayList.subheader_stdWrap {

append = TEXT

append.data = register:newsMoreLink

append.wrap = <span class=”myclass”>|</span>

append.if.isTrue.field = bodytext

}

Different wraps by category

A register named “newsCategoryUid” is filled from the script with the uid of the first assigned category. You can access this register by TS to generate different wraps for different categories.
Example:

plugin.tt_news.displayList {

title_stdWrap.wrap = <div class="news-list-title-{register:newsCategoryUid}">|</div>

title_stdWrap.insertData=1

}

You need a css-class for each category that contains the uid of the category in its name. for example:

.news-list-title-4 { background-color: #090;}

Adding dynamic Metatags in SINGLE view

The registers “newsKeywords” and “newsSubheader” can be used to fill values from the news record to the <meta> tags of the page with the SINGLE view on it. They are not filled in LIST and LATEST view.
Example:

This example assumes, that you've installed the extension “Meta tags extended” (extKey: metatags). The output of the extension is added to the “page” object as “headerData.999” (extension default).

page.headerData.999 {

local >

local {

description.data = register:newsSubheader

keywords.data = register:newsKeywords

}

}

RealUrl and SimulateStaticDocuments

Since tt_news only uses standard "typolink" functions to build its links, it works with “simulateStaticDocuments” and “RealUrl”.

A RealUrl configuration example is included. See file: EXT:tt_news/res/realUrl_example_setup.txt
Copy the contents of this file to your /typo3conf/localconf.php. See comments in file for needed changes. The only thing which is needed change should be the id of the rootpage. For detailed information about the configuration of this extension see the “realUrl manual”.

tt_news offers several ways to optimize RealUrls that include tt_news parameters. By default all links to a news single view will contain all GETvars that are needed to build the “back to List”-link. In case a link points from a LIST showing an archive period to the SINGLE view its realUrl would look like this:

http://www.example.com/news/archive/period/1112313600/2681999/archived/article/newstitle/

Which means: [domain name]/[pagetitle]/[pagetitle]/[label for archive vars]/[period start in unixtime]/[period length in seconds]/[tx_ttnews[arc]]/[label for news title]/[title of the news record]

This shows two problems at once:

a) Something like “1112313600” can not be considered as “speaking Url”. For almost all humans it is not obvious that this means: April 1st 2005.

b) If the news article is shown in more than one list, there will be different SINGLE views with different backPid parameters. There will be multiple instances of the article in the page cache too, which will f.e. produce multiple search results for the same article in indexed search. RealUrl will detect these duplicates and will disable caching what will slow down the site.

Both problems can be solved by adding this to your TS setup:

plugin.tt_news {

dontUseBackPid = 1

useHRDates = 1

}

“dontUseBackPid” will prevent the backPid and all other backPid-related parameters in links from tt_news. The disadvantage of this feature is, that now the backPids from all SINGLE views will point to the same page – the one that is configured as “plugin.tt_news.backPid”.

“useHRDates” will enable tt_news to use “year” and “month” instead of “pS”. “pL” and “arc”.

Now the URL from above should look like this:

http://www.example.com/news/article/newstitle/

With the monthnames and numbers as key-value pairs in the realUrl configuration, Urls with “speaking archive dates” are possible (see example realUrl configuration file). Links, pointing to archive periods would look like this:

http://www.example.com/news/2005/april/

With two additional parameters tt_news can be configured to add the values for “year”, “month” and even the “day” to the links pointing to the SINGLE view. “useHRDatesSingle” will enable the use of all three vars, “useHRDatesSingleWithoutDay” will add only “year” and “month” to this links.

Example:

plugin.tt_news {

useHRDates = 1

useHRDatesSingle = 1

useHRDatesSingleWithoutDay = 1

}

The table shows with which configuration links would look how:

code	useHRDatesSingle	useHRDatesSingleWithoutDay
LIST/LATEST	http://www.example.com/news/	http://www.example.com/news/
AMENU	http://www.example.com/news/view/2005/04/	http://www.example.com/news/view/2005/04/
SINGLE	http://www.example.com/news/view/2005/04/12/this-is-awesome/	http://www.example.com/news/view/2005/04/this-is-awesome/

("view" is the name of the realUrl postVarSet for tt_news)

The table shows all views at the same page (news/). This is possible with a bit TypoScript which is explained in the section “TypoScript Examples” in this manual.

SimulateStaticDocuments

This feature is not so sophisticated as realUrl and therefore a bit easier to configure - you'll only have to add the lines below to your TS setup. With SimulateStaticDocuments the URLs of your site will look like this:

http://server.com/news/newstitle+M5aj89345.0.html

To get rid of the GET parameters from tt_news showing in the adressbar of your browser, you can add them to the pEnc_onlyP list (see example):

Example:

config {

simulateStaticDocuments=1

simulateStaticDocuments_pEnc=md5

# displays 22 chars of the page title

simulateStaticDocuments_addTitle=22

# include the GET parameters from tt_news to the encoded vars (all in one line)

simulateStaticDocuments_pEnc_onlyP = cHash, L, print, tx_ttnews[backPid],

tx_ttnews[tt_news], tx_ttnews[pS], tx_ttnews[pL], tx_ttnews[arc], tx_ttnews[cat],

tx_ttnews[pointer], tx_ttnews[swords]

}

More information: Tsref->CONFIG

Date and Time formats

The display of date and time values in the FrontEnd depends on the environment where TYPO3 is installed. tt_news uses the global language-settings from PHP and then it formats the date and time values with the stdWrap function "strftime". (see: http://www.php.net/manual/en/function.strftime.php )

The defaults for formating of the date and time strings are configured in the TS-setup of tt_news.

Notice: if you have one of the ts_language_xx extensions installed and configured as default language, these extension will override the default settings for the tt_news time formating. The language specific TS settings for several extensions can be found in the file "ext_typoscript_setup.txt" in the (ts_language-) extensions install directory (e.g. "typo3/ext/ts_language_de/ext_typoscript_setup.txt" for the german settings).

These settings are again overridden by settings you make in your main TS template or in some "+ext" templates located in pages below the main template. If you look in the "template analyzer" you see the loading order of the TS-settings. The values in the template at the end of the list will override previous settings):

To view or change the settings for a page, click on “Template” in the “Web” menu, choose this page in the pagetree, and open the “TypoScript Object Browser” on this page. (See screenshot at the beginning of the section “Configuration”).

Examples:

Your site is a "one-language-site" and you configured the site-language as default language of TYPO3. If you have a ts_language_xx extension installed, to set some country specific settings for other extensions, I suggest to copy the part which refers to tt_news in your main template or an ext template which is included. Here an example for german settings:

# set the TYPO3 language to german

config.language = de

# set the PHP locale to german

config.locale_all = de_DE

# tt_news date & time formats

plugin.tt_news {

archiveTitleCObject {

10.strftime = %B - %Y

}

getRelatedCObject {

20.strftime = %d.%m.%Y %H:%M

}

displaySingle {

date_stdWrap.strftime= %d.%m.%y

time_stdWrap.strftime= %H:%M

}

displayLatest {

date_stdWrap.strftime= %d.%m.%y

time_stdWrap.strftime= %H:%M

}

displayList {

date_stdWrap.strftime= %A %d. %B %Y

time_stdWrap.strftime= %d.%m.%y %H:%M

}

}

Hint: If the locale_all setting "de_DE" don't work on your WAMP installation, try to set it to "german". There are some differences in the handling of the php-locale on windows and linux.

If your site is a multilanguage site like the "one-tree-fits-all-languages" example from the "testsite" package (see: http://typo3.org/documentation/tips-tricks/multi-language-sites-in-typo3/ ) you can add the country specific settings to the language condition in your TS-setup:

# Setting up the language variable "L" to be passed along with links

config.linkVars = L

# German language, sys_language.uid = 2

[globalVar = GP:L = 2]

config.sys_language_uid = 2

config.language = de

config.locale_all = de_DE

# set german date & time formats

plugin.tt_news {

archiveTitleCObject {

10.strftime = %B - %Y

}

getRelatedCObject {

20.strftime = %d.%m.%Y %H:%M

}

displaySingle {

date_stdWrap.strftime= %d.%m.%y

time_stdWrap.strftime= %H:%M

age_stdWrap.age = Minuten | Stunden | Tage | Jahre

}

displayLatest {

date_stdWrap.strftime= %d.%m.%y

time_stdWrap.strftime= %H:%M

}

displayList {

date_stdWrap.strftime= %A %d. %B %Y

time_stdWrap.strftime= %d.%m.%y %H:%M

}

}

[global]

# Danish language, sys_language.uid = 1

[globalVar = GP:L = 1]

config.sys_language_uid = 1

config.language = dk

config.locale_all = danish

# set danish date & time formats

plugin.tt_news {

# sorry, don't know the danish date & time settings ;-)

}

[global]

Multilanguage News

Since version 2.0.0 tt_news supports the localization features introduced with TYPO3 3.7.0. Now you can build a true “one-tree-fits-all-languages” site without breaking this concept by using a news-sysfolder for each language.

Note:
If you use TYPO3 3.6.2, tt_news will work as known, because the localization features will be disabled if no TYPO3 3.7.0 or higher is found.

To integrate tt_news in a multilanguage site, follow the steps described below.

Environment for this example: a working multilanguage site for normal content with tt_news 2.0.0 installed and some news articles.

Open the sysfolder where your news are located (in web/list view) and create an “Alternative Page Language” for each desired translation.

Now activate the “localization view”:

If you assigned flag-images to your website languages you should see something like this in your browser:

Click on a flag icon (or the language label) to “localize” a news db-record in a certain language. Now the flag-icon is moved to the “localization” column to show that this news record is translated.

Hint:
If you don't want the localized news records to be immediately visible on the website you can enable “Hide new translations” in the extension configuration (see section “Installation”).

The titles of the news records had been prepended with “[Translate to {language_label}]”.

Hint:
Prepending titles with “[Translate to {language_label}]” can be disabled in the extension configuration. If this is disabled “(copy [#])” will be added to the titles of localized records. This can be disabled, too by setting “Prepend at copy” to” 0” (see “Localization mode for text fields” and “Prepend at Copy” in section “Installation”).

Language = all

if you set the language in a news record to “all” ths record will be displayed in all available languages.

Now let's see what else changed in a “localized” news article:

You see, that some fields are “missing” in the translated version. Those fields are taken from to the original-language (f.e.: type, related news). Categories are always copied from the record in the default language. The localized article shows only which categories are assigned they are not editable in translations. If the record has categories assigned that are not in the list of allowsed categories for the current BE user a warning message will be displayed and saving of the article will be disabled (see section “Categories” for more information).

Hint:
The image field of a localized news article is excluded by default (images are alwas taken from the record in the default language). If you need localized images (f.e. if the images show texts) you can enable the "image" field for translated news by setting "l10n_mode_imageExclude" to “0” in the extension configuration.

All fields are showing the value of their original-language below the input field.

Sys_language_mode

With the TS-var “sys_language_mode”, you can configure the handling of not translated news-articles. The default is to display the article in the default language if there is no translation was found. If you don't want this behaviour you can set “sys_language_mode” to strict

Example:

plugin.tt_news.sys_language_mode = strict

Let's say you have 10 news articles in your site (in the default language) and 5 of them are translated to the selected language. In the default “sys_language_mode” a news list will display 10 items. With “sys_language_mode=strict” the same list will show only 5 news articles.

The Language Menu

The example language-menu (/media/scripts/example_languageMenu.php) coming with older TYPO3 packages (“testsite” package) does not support the tt_news GETvars (the parameters in the Adressbar). The HMENU type=language (new in TYPO3 3.7.0) does exactly the same.

I included a new version of this script in the tt_news distribution. See file: EXT:tt_news/res/tt_news_languageMenu.php
This version keeps the link vars from tt_news (and other extensions) and it also works with simulateStaticDocuments and RealUrl.

You can also use the extension: “sr_language_menu” to switch your website's languages. This extension keeps also the linkVars from tt_news.

XML feeds from tt_news

To enable your site for serving news as XML-feed, add the static ext-template “News-feed (RSS 0.91, RSS 2 , RDF, Atom 0.3, Atom 1.0)” to your TypoScript setup. This adds a new page-type (100) and configures tt_news with the code “XML”, if a page with type=100 is requested.

the other settings for XML feeds can be configured in the constant editor or directly in your TypoScript setup.

Here's a comparison chart of the required (r), optional (o) and not available (n/a) settings for the different feed formats:

	rss091	rss2	rdf	atom03	atom1
xmlTitle	r	r	r	r	r
xmlLink	r	r	r	r	o
xmlDesc	r	r	r	o	o
xmlLang	r	o	n/a	o (recommended)	n/a
xmlIcon	r	o	o (must be 88x31px)	n/a	n/a

If you want to include the settings by TS – Here's the code:

# Configure tt_news to display the xml template

plugin.tt_news {

displayXML {

# rss091_tmplFile = EXT:tt_news/res/rss_0_91.tmpl

# rdf_tmplFile = EXT:tt_news/res/rdf.tmpl

# atom03_tmplFile = EXT:tt_news/res/atom_0_3.tmpl

# atom1_tmplFile = EXT:tt_news/res/atom_1_0.tmpl

rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl

# possibile values: rss091 / rss2 / rdf / atom03 / atom1

xmlFormat = rss2

xmlTitle = example.com: Latest News

xmlLink = http://example.com/

xmlDesc = Latest News

xmlLang = en

xmlIcon = fileadmin/tt_news_article.gif

title_stdWrap.htmlSpecialChars = 1

title_stdWrap.htmlSpecialChars.preserveEntities = 1

subheader_stdWrap.stripHtml = 1

subheader_stdWrap.htmlSpecialChars = 1

subheader_stdWrap.htmlSpecialChars.preserveEntities = 1

subheader_stdWrap.crop = 100 | ... | 1

subheader_stdWrap.ifEmpty.field = bodytext

xmlLastBuildDate = 1

}

}

## This enables the xml news feed

xmlnews = PAGE

xmlnews {

typeNum = 100

10 >

10 < plugin.tt_news

10.pid_list >

10.pid_list = {$plugin.tt_news.pid_list}

10.singlePid = {$plugin.tt_news.singlePid}

10.defaultCode = XML

config {

disableAllHeaderCode = 1

additionalHeaders = Content-type:text/xml

no_cache = 1

xhtml_cleaning = 0

}

}

## To get an additional RDF feed add the following
rdffeed = PAGE
rdffeed < xmlnews
rdffeed {
10.displayXML.xmlFormat = rdf
10.displayXML.xmlIcon = fileadmin/feed_icon_88x31.gif
typeNum = 101
}
## To get an additional Atom 0.3 feed add the following
atom03feed = PAGE
atom03feed < xmlnews
atom03feed {
10.displayXML.xmlFormat = atom03
typeNum = 102
}

## To get an additional Atom 1.0 feed add the following
atom1feed = PAGE
atom1feed < xmlnews
atom1feed {
10.displayXML.xmlFormat = atom1
typeNum = 103
}

Hint:
if you add the line below to the header of your site, browsers will detect this site as a RSS-source. (f.e. Firefox 1 with the nice “Add life bookmarks” feature)

<link rel="alternate" type="application/rss+xml" title="RSS-Feed"

href="http://my-server.org/index.php?id=5&type=100">

More information:

RSS 0.91 specification: http://my.netscape.com/publish/formats/rss-spec-0.91.html

RSS 2.0 specification: http://blogs.law.harvard.edu/tech/rss

RDF specification: http://web.resource.org/rss/1.0/spec / http://www.w3.org/TR/rdf-syntax-grammar/

Atom 0.3 specification: http://www.atomenabled.org/developers/syndication/atom-format-spec.php

Atom 1.0 specification: http://www.atomenabled.org/developers/syndication/

Extending tt_news

There are several possibilities to extend/change the functionality of tt_news without building a new extension (see list below). If you need additional fields in the BE-Form, you can create an extension with the kickstarter, that adds the new fields to the tt_news database-table. After this, take a look to the file EXT:tt_news/res/example_itemMarkerArrayFunc.php for an example, how to display the contents of an additional field with a userdefined marker.

You can also have a look at the extensions “news_author_rel” and “news_dam_con” which show how to extend tt_news by a field. “news_author_rel” offers also a single view for related records.

Another code example for using the hook in function getItemMarkerArray() can be found in the extension chcnewscon. So there should be enough “sources” to copy & paste your own “news_special_extended” extension.

Good Luck ;-)
Here the list of the userfunctions:

“newsAmenuUserFunc”: for processing the archive menu -> see example in folder res/

“itemMarkerArrayFunc”: for processing the complete marker array -> see example in folder res/

“imageMarkerFunc”: gives you the possibility to process the image markers by a user function. This userfunction works a bit different from the others: if it is enabled, the images are only processed by the userfunction not by both functions. (this could already be done by the “itemMarkerArrayFunc” but this would process the same images two times) Added an new example script: “res/example_imageMarkerFunc.php” that uses the new userfunction to add different wraps to the images in single view (see comments in file for needed TS-settings) -> see example in folder res/

“userPageBrowserFunc”: With this userfunction you can substitute the build-in pagebrowser from tt_news with your own script. See file: “res/example_userPageBrowserFunc.php”.
With the two example-pagebrowsers from this file it is possible, to use html-code like images for the “next” and “previous” links.

you can define different template parts with: “altMainMarkers” -> see example in “Reference”.

There are many function-“hooks” in the tt_news extension:

you can add extra-codes to the FF sheets with the function from “class.tx_ttnews_itemsProcFunc.php”: This function is called from the flexform xml files by using “tx_ttnews_itemsProcFunc->user_insertExtraCodes”
this adds the “codes” to the “What to display” selectbox, that are found in the array: $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['what_to_display'].

Hook for processing the extra codes in function main_news() (extraCodesProcessor).

Hook for processing extra markers for each news record in function getItemMarkerArray() (extraItemMarkerProcessor) .

Hook for processing the selectConf-array in function getSelectConf() (processSelectConfHook).

Hook for processing extra markers for the complete output in function displayList() (extraGlobalMarkerHook) .

Hook for adding a userdefined category menu (catmenu) in function displayCatmenu() (userDisplayCatmenuHook) .

Hook to add fields to search form in function displayList() (additionalFormSearchFields)

Hook to post-process search condition in function searchWhere() (searchWhere)

For more information about hooks see: TYPO3 Core APIs / The concept of "hooks"
and: http://typo3.org/development/articles/how-to-use-existing-hooks/

List of tt_news add-ons

Disclaimer: this chapter provides a list of extensions that contribute additional functionality to tt_news. This list is not guarantied to be complete but best efforts are made to keep it up to date. Inclusion to this list does not mean any preference, quality assessment or recommendation. This list is only for your information and convenience. tt_news developers generally have no relation to these plugins and cannot answer questions about these plugins. The information in this list is compiled from TER.

Extension title	Extension key	Author	Description
tt_news most popular	nc_ttnews_mostpopular	Dmitry Dulepov / Netcreators BV	Adds an option to tt_news to display most read news
SmoothGallery for TYPO3	rgsmoothgallery	Georg Ringer	Display tt_news images in a nice photogallery
Import an RSS feed into tt_news	xml_ttnews_import	Schopfer Olivier	This extension imports contents from an RSS feed into distinct tt_news records. Auto import is also possible.
ttnews_feeder	ttnews_feeder	Alex Tuveri	Fill tt_news with news from other web sites, which do not support RSS export
NewsPlus	sg_newsplus	Stefan Geith	Extends tt_news with FE-User-Editing and Layout-Selection
Flash files in News articles	ah_flashinnews	Andreas Hupfau	Insert Flash files into tt_news articles
DAM News	dam_ttnews	Erich Bircher	Adds DAM support to tt_news
News Calendar	newscalendar	Philip Almeida	News Calendar for EXT:tt_news. This extension provides a calendar view for tt_news extension. It also provides a list view that works together with the calendar.
Commenting system	comments	Dmitry Dulepov / Netcreators BV	Can be used to comment on tt_news items in FE

Sponsoring tt_news development

If you want to donate money, sponsor the development of tt_news or want to hire me as freelancer for a TYPO3 project, feel free to contact me: (Rupert Germann, rupi(at)gmx.li).

Donations can also be made directly at sourceforge.net (http://sourceforge.net/donate/index.php?user_id=1067864) where tt_news CVS project is hosted.

Or take a look at my amazon wishlist: http://www.amazon.de/gp/registry/1JS3I9WKKEG31

Known problems

tt_news version 1.5.x or higher is incompatible with the most (not tested all) extensions depending on a prior versions of tt_news (a version < tt_news 1.2.0). If you're using such an extension, I suggest to save your settings & templates and update to the current tt_news version. Most of the features from extensions for prior tt_news versions are now part of tt_news itself.

Do not install this extension on TYPO3 prior to version 3.6.2 because it requires the flexform features which are not present or buggy in earlier TYPO3 versions.

In TYPO3 versions below 3.8.0 the titles of the related-news and the category titles are not displayed in extended list view in BE. You'll see only the text “N/A”.

The old var-name for the single view page “PIDitemDisplay” does not work for links to related news in the default setup(since tt_news 1.6.3) please use the new name “singlePid” in your TS.

Depending on the installed MySQL version it can happen that If you open tt_news again in the extension manager after installing it, the extmanager will show a “Table error” concerning the default values of the uid columns (with MySQL > 4.x in TYPO3 3.7.1 and lower and with MySQL > 5.x in TYPO3 3.8.0 and lower ).
You can savely ignore this message because its reason is an error in the extension manager which has no influence on the FrontEnd output of tt_news.

“direct preview” with the save&preview button doesn't work in editforms of non-public versions of news articles -> use normal “version preview” instead.

“direct preview” works only in the “Live” workspace.

If you find problems, that are not listed here, please post them at the bugtracker (http://bugs.typo3.org) project tx_ttnews or in the tt_news newsgroup (news://news.netfielders.de/typo3.projects.tt-news )

To-Do list

extend the “web/page” BackEnd-module to work with localized news.

If you have a feature request. please post it at the bugtracker (http://bugs.typo3.org).

Changelog

changes in tt_news 2.5.0

New feature: category trees in BE are expandable and collapsible now (requires xajax)

New feature: added a new backend module called "tt_news category manager" (Requires TYPO3 4.0). This module is located under web/info. It shows the complete category tree - of course expandable and collapsable - and offers drag and drop for moving and copying news categories. Thank goes to: CNV (Christelijk Nationaal Vakverbond) for sponsoring this feature.

New feature: "Exclude already displayed news". The new TS option "excludeAlreadyDisplayedNews" allows you to place multiple news plugins on one page where the plugin itself takes care that no newsarticle is displayed twice. This feature makes the options "excludeLatestFromList" and "listStartId" obsolete. If "excludeAlreadyDisplayedNews" is enabled "excludeLatestFromList" and "listStartId" will be ignored.

New feature: added the category tree to be_users and be_groups records. Now it is possible to select the allowed and visible categories for a certain be_user/group with the category tree. If categories are selected in the be_user/group records the TSconfig settings 'options.useListOfAllowedItems', 'tt_newsPerms.tt_news_cat.includeList' and 'tt_newsPerms.tt_news_cat.allowedItems' have no effect anymore. (thanks to netcreators.nl for sponsoring this feature)

Many bugfixes and other small improvements.

see the complete changelog here: http://svn.sourceforge.net/viewvc/typo3xdev/tx_ttnews/trunk/ChangeLog?view=markup

changes in tt_news 2.4.0

New feature: added two new category modes:
2 = select only news which have all the selected categories assigned (AND)
-2 = show only news which have none of the selected categories assigned (OR)
thank goes to Reto Schmid/.hausformat for sponsoring this feature

changes in tt_news 2.3.0

New feature: Support for workspaces in TYPO3 4.0 (Thanks to netcreators.nl for sponsoring this).

New feature: Support for ATOM 1.0 feeds

New feature: new template marker ###NEWS_CATEGORY_ROOTLINE###. This marker will be filled with the titles of the parent categories of the first assigned category in SINGLE view or with the parents of the selected category in LIST view. See section "The category rootline" for details.

New feature: Added the possibility to exclude (or include) categories for certain users in BE forms.

New feature: Added the possibility to exclude (or include) categories in the FrontEnd category menu.

Many bugfixes and other small improvements. See Changelog for details.

changes in tt_news 2.2.0

New feature: “Subcategories”. News-categories can be nested now. (new field “parent category”)

New feature: “Controlling editing permissions with categories”. A list of allowed categories can be defined for a BE-user/group. If a news record does have a category assigned that is not in this list this BE-user can't change anything at this record.

New feature: The category fields “start”, “stop”, “hidden” and “fe-usergroup” are enabled now. If the category of a newsarticle is hidden, the newsarticle will not appear on the website, too.

New feature: “Hierarchical category menu”. With the code “CATMENU” a menu from nested categories can be displayed on the website.

New feature: Now it's possible to export news as RDF and Atom 0.3 additionally to the formats RSS 0.91 and RSS 2 (Thanks to Ingo Renner for the patches)

New feature: “Single view with multiple pages”. Pagebreaks can be inserted manually or after a certain amount of words.

New feature: “Bidirectional relations”. If a news record has a relation to another record, the relation back to the source article will be inserted automatically.

New feature: “Related pages” News relations can point to normal pages.

New feature: “Human readable Dates”. tt_news can now be configured to use “year” and “month” instead of “pS”. “pL” and “arc” for links pointing to certain archive periods. With the monthnames and numbers as key-value pairs in the realUrl configuration, Urls like this are possible: /news/view/2004/march/

New feature: Human readable dates can also be used for the link to the single view. Additionaly to year and month the link for single view can show the day, so realUrls can look like this: /news/view/2004/10/19/newstitle/ (Thanks again to Ingo Renner for the patches)

New feature: “Random news”. News lists can be ordered by random now.

New feature: “Editlock”. After activating the field “editlock” in a news record it can only be edited by admin users.

New feature: “Direct preview”. Clicking on “save & view” in a news record will open the single view of this record in the FrontEnd now.

New feature: “Version preview”: with a sprecial content element its possible to display the “version preview” of non-public record versions.

changes in tt_news 2.1.0

new Feature: “SinglePid by Category” you can now define a singlePid in the category record.

new TSvar “catOrderBy”: gives you the possibility to order the categories (in FE) f.e. by title

added 2 new text-fields for “alt” and “title” properties of the images

It's now possible to use the “Latest”-template to display archived news. (new TSvar: “displayArchivedInLatest”)

new TSvar “dontUseBackPid”: If you enable this, you can prevent the use of the variables for dynamic back-Links in links, that point to the single-view. The advantage is, that all those links will look the same, what will f.e. prevent multiple indexing by the indexed search. (RealUrl Links will also look nicer without backpid-paramters).

new Register: “newsMoreLink” -> see new Manual section: “Registers”

for a complete list of all changes and fixes take a look at the cvs changelog (see link below).

changes in tt_news 2.0.0

new feature: language relations between news-records. TYPO3 3.7.0 required.

new feature: you can now set the start-item and the number of items you want to show in a f.e. LIST template from the content-element. (thx paolo nugnes for sponsoring this feature)

new default html-template

static ext (TS)templates

Tab-dividers for tt_news records

support for the new versioning feature TYPO3 3.7.0 and MySQL 4 required

New userfunction “userPageBrowserFunc”: With this function you can substitute the build-in pagebrowser from tt_news with your own script. See file: “res/example_userPageBrowserFunc.php”.

and many other fixes and improvements. see the complete changelog here: http://svn.sourceforge.net/viewvc/typo3xdev/tx_ttnews/trunk/ChangeLog?view=markup

changes in tt_news 1.7.1-1.7.2

merged in new translations

changes in tt_news 1.7.0

new feature: RSS-feeds from tt_news (thank goes to Ingo Renner for implementing this) See Section “RSS feeds from tt_news” in manual. An example configuration is included in the file: EXT:tt_news/res/ext_typoscript_setup.txt

new feature: added the possibility to choose the ordering parameters for “LIST” and “LATEST” view from the content element or by TS

changed the formating of the “back to list” link in single view: now you can define the string for the backlink in this way: “Back to: %s” - “%s” is the title of the page, where the backlink points to

Added a possibility to process the image markers by a userfunction (example included)

Small new feature: now a “register” named “newsCategoryUid” is filled from the script with the uid of the category. You can access this register by TS to generate different wraps for different categories.

Added some more TS examples to the manual.

changes in tt_news 1.6.2 – 1.6.5

merged in new translations

uploaded new manual

changes in tt_news 1.6.1

changed default setting for the field datetime in tca.php to 24/hours format: -> this influences the BE form, the “age” output and the archive.

added “required” to the field newsfiles in tca.php

Changed the building of the getRelatedCObject. -> Now it is (again) possible to wrap the titles of related news with stdWraps (e.g. crop)
IMPORTANT: this requires changes in the TS setup for tt_news -> see: example configuration in ext_typoscript_setup.txt
AND it also requires that you change the old TS varname “PIDitemDisplay” to the new one “singlePid” in constants and setup. (otherwise the related news are not linked)

New feature: you can now configure the “order by” and “group by” parts of the query for the related news by TS. (new TS-vars: “orderBy” and “groupBy” )

added a section about “RTE configuration” to the manual -> this should solve the “RTE/typolist/typohead” problems.

updated the manual with some more examples

changes in tt_news 1.6.0

The “alt” and “title” texts of an image can now be filled with data from the news record. -> TSvar: 'imgAltTextField': this will define the field whose contents are inserted in the image html. (default: insert the caption as “alt=” and “title=”)

the substitution of the page title with the news title in single view is now selectable wit the Tsvar 'substitutePagetitle'

the news title in single view is also inserted as pagetitle, for the indexed-search. The result listing of the indexed search will show the title of the news item as pagetitle.

added a possiblity to process the contents of the Archive-menu by a userfunction. Included an example-script for dividing the archive in yearly periods.

The “back to list link” in the single view now shows the title of the page where it points to.

major change: changed the name of the TS-var “PIDitemDisplay” to “singlePid” -> should not require any changes to your setup, because the old var-name is still processed. (if both values are set, the new one will win)

all links in the tt_news-class are now build with the link functions from pibase.

the pagebrowser is now build with the pi_list_browseresults function from pi_base -> requires some new setting from TS

changed some function names, cleaned up the code

updated the manual with the new Vars and functions

added a small section “Extending tt_news” to the manual.

changed some parts of the default setup (RTE parse func, related, pagebrowser)

changes in the html templates and the stylesheet (searchfield name, pagebrowser)

changes in tt_news 1.5.2

new feature: 'excludeLatestFromList': by setting this TSvar you can exclude the news already shown in LATEST from the “LIST” view on the same page. (thank goes to Joey who posted this code snippet)

merged in new translations

new section about “Links in news” in the manual.

fixed a small bug with the “firstImageIsPreview” mode: now the captions are displayed correctly

Added a message which will appear when no news are found for display in the current list 'noNewsToListMsg'.

added some new vars and a db-field at the category table to make news more usable in websites that are build with frames.

Removed the included pagetree (t3d-file) from the extension. This pagetree will be included in the new extension “doc_tut_ttnews” (coming soon).

More details in changelog from cvs: http://svn.sourceforge.net/viewvc/typo3xdev/tx_ttnews/trunk/ChangeLog?view=markup

changes in tt_news 1.5.0:

new feature: Files can be attached to newsitems.

added an "use Storage Pid"-switch to the plugin-configuration in extension manager. This makes it possible to switch between the old behavior (showing categories from the whole pagetree) and the new way of showing categories only from the "General record storage page".

Fixed some smaller bugs. See cvs changelog for details: http://svn.sourceforge.net/viewvc/typo3xdev/tx_ttnews/trunk/ChangeLog?view=markup

new template: added a new CSS-based template. (Thank goes to Ingo Renner and Ben van t'Ende).

added an example pagetree as t3d-file. This pagetree contains a small site with some preconfigured news content-elements using the new news-template. (based on the MTB1 tutorial)

added a small tutorial section to the manual. (about installing the pagetree from the res/ folder)

changes in tt_news 1.4.3 – 1.4.6:

edited the manual

merged in new translations

changes in tt_news 1.4.2:

small new feature: "First image is preview image" – by setting the var "firstImageIsPreview" from TS or in the FF form (sheet: other settings) you can handle the first atachend image as preview image. This image is only displayed in list view.

Added more configuration/administration examples to the manual.

Changed the settings for the RichText Editor: now the RTE for a news article is configured exactly like the RTE for normal content.

Some smaller bugfixes (see wiki)

changes in tt_news 1.4.1:

rebuilded the table of contents for the extended manual. No changes to the extension.

changes in tt_news 1.4.0:

Fixed some old and new bugs.

major change: Categories are now only displayed if they are found in the "General Record Storage page".

Extended Constant editor with more of the basic configuration options

"news title" will be set as page title in the single view

major change: included the fixes for indexed search and caching from Karsten Hachmeister

re-arranged the FlexForm Sheets of the tt_news content element

moved the fields "starting point" and "recursive" to FF

cleaned up the html-template, added alternating templateparts removed font tags

added a 3rd wrap, eg. for the amenu header

added a 4th global color used by the list view

removed the maxCatText lenght cropping from FF (cause its only working in linkMode1 in the other link modes it causes broken html).

changes in tt_news 1.3.0:

major change: getLL language functionality for the html template. To make this work you'll have to remove all texts like: "prev","next"... from tt_news template (an updated template is included with the new version).

stdwraps for all text from the getLL function

single view don't override LATEST or LIST view anymore.

the LATEST template don't change its contents with the list view by clicking links in the pagebrowser or in the archive menu

the ordering of AMENU elements can now reversed by setting the TSvar "reverseAMenu" (which is set by default now)

the TS var "code=" is integrated again.

the uploadfolder for templates is now created at installation if it doesn't exist yet

you can now use the filetypes "tmpl" and "html" for templates uploaded by FF or in the constant editor

removed the field "recursive" from FF in content element

Hooks added for extra views and item markers.

added "allowTableOnStandardPages" for tt_news_cat -> this is more logically and keeps the FAQ smaller.

restructured the code in main class, added comments, code beautifying.

more possibilities to display the news_articles in the "insert records" content element. by setting the TS var "defaultCode" you can now choose between "SINGLE", "LIST" or your own template.

changes in tt_news 1.2.3:

New features known from News+, News Category Image and News Multiple Categories.

Added support for multiple categories, category images and shortcuts, RTE and more. Credits goes out to Andreas Schwarzkopf, Carsten Horst and Ingmar Schlecht.

Flexforms added.

Updater added for category table and CODE-field(select_key) to FlexForms.

EXT: news - 78

EXT: news

2006-04-05T09:44:51