DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: News readed counter

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Jens Hirschfeld
Changed:2008-01-02T11:45:31
Email:Jens.Hirschfeld@KeepOut.de
Info 2:
Info 3:
Info 4:

EXT: News readed counter

Extension Key: newsreadedcount

Copyright 2005-2008, Jens Hirschfeld, <Jens.Hirschfeld@KeepOut.de>

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 readed counter 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 2

Configuration 2

Tutorial 2

Known problems 2

To-Do list 2

Changelog 2

Introduction

What does it do?

- This Extension counts, how often an News from the tt_news-Module is shown in the Singleview

- It adds the Marker ###NEWS_COUNTER###, ###NEWS_COUNTER_TEXT### and ###NEWS_COUNTER_VALUE### to the tt_news Extension, so you can use the Marker in your template

Screenshots

- Screenshot from the 'LIST' view of news:

img-1

- Screenshot from a 'SINGLE' view of news:

img-2

Note: The Look&Feel of the news depends on the template you are using!

Users manual

- Install the Extension with the Extension Manager. Make the Updates for the Table tt_news (There will be a field added).

- Now every time a User reads a Message in the 'SINGLE' View, the Counter for this News will be increased. This would happen only once per Browser session!

- You can use the Marker

###NEWS_COUNTER### which will be replaced with the counter and a text. Like “2 times shown”, ###NEWS_COUNTER_TEXT### which will be replaced with the text behind the label timeShowText. Like “Visits:”###NEWS_COUNTER_VALUE### in your News template. It will be replaced with the number, how many times the News was shown in the 'single'-view of the tt_news module. And only the number. No text around the value.

- The Counter of every News could be changed through the Backend. In the Tab 'Relations' of the News-Item on the bottom is the Field editable.

Configuration

- Use any of the Markers in the Template file for tt_news to display the relevant information.

In Version 0.3.0 added

- there are now four labels in the locallang file: OnetimeShown , timesShown , NoTimeShown and timeShowText .

- there are now three markers you can use, all are parsed through the stdwrap function, before they will be replaced.

- you can configure the behavior of the extension, if no one have readed a news. In this situation, there could be “nothing”.

Use “ShowNoHits = 1” to show a message like “0 mal gelesen”.

Typoscript Example for use the stdWrap functionality and the ShowNoHits option:

plugin.tt_news.newsReadedCount.counter.wrap = <div style="border:1px solid red">|</div>

plugin.tt_news.newsReadedCount.counter.required = 1

plugin.tt_news.newsReadedCount.ShowNoHits = 1

plugin.tt_news.newsReadedCount.countervalue.wrap = <div style="border:1px solid red">|</div>

plugin.tt_news.newsReadedCount.countervalue.required = 1

plugin.tt_news.newsReadedCount.countertext.wrap = <div style="border:1px solid green">|</div>

plugin.tt_news.newsReadedCount.countertext.required = 1

Obsolete

- In Version 0.1.4 a Space(blank) between the Value and the Text was inserted.

To disable the Space, just add the following Line to your Template:

plugin.tt_news.newsReadedCount.noSpaceAfterValue = 1

Tutorial

Install the Extension.

Add the Marker ###NEWS_COUNTER### to your tt_news HTML-Template

Known problems

- The Cache for News must be disabled. Because the cached 'single view' of a news will be shown if the caching is enabled. In this case this extension will not be called. So the value in the table will not be increased.Add to your Template:

plugin.tt_news.allowCaching = 0

To-Do list

- Perhaps try to avoid the cache Problem.

Changelog

  • - 08-01-02 Yannick Pavard < ypavard@infoglobe.ca >
  • Added %s character in translation for better presentation (OnetimeShown and timesShown)
  • New translation : OnetimeShown, NoTimeShown and timeShowText
  • New typoscript propriety (stdWrap) : newsReadedCount.counter, newsReadedCount.countertext and newsReadedCount.countervalue
  • noSpaceAfterValue typoscript is now deprecated !
  • It's now possible to hide markers when value is empty with plugin.tt_news.newsReadedCount.ShowNoHits = 0
  • Translations files are now in XML format
  • Counter lenght is now 6 characters and range is disabled
  • 06-03-03 Explained the caching-problem in the documentation (this file) and in the readme.txt (Thanks to Henrik for the Feedback)
  • 06-01-02 Inserted a Space between the Value and the Text (Thanks to Andreas for the Feedback), Added the possibility to disable this Space.
  • 05-12-10 Added some improvements to the Documentation (this File)
  • 05-12-09 This Documentation added
  • 05-12-09 Initial release

img-3 EXT: News readed counter - 3