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: JS-Ticker newsfeed export

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Christoph Möller
Changed:2003-04-23T13:43:21
Author:Christoph Möller
Email:chris@byters.de
Info 3:
Info 4:

EXT: JS-Ticker newsfeed export

Extension Key: cm_jstickernews

Copyright 2000-2002, Christoph Möller, <chris@byters.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: JS-Ticker newsfeed export 1

Introduction 1

What does it do? 1

Screenshots 2

Users manual 2

FAQ 3

Configuration 3

Reference 3

Known problems 4

To-Do list 4

Changelog 4

Introduction

What does it do?

This FE plugin extension exports tt_news items as configurable and browser-independent JavaScript newsticker and therefore depends on an installed and properly configured tt_news extension. The JS ticker generated by this externsion can be shown inline as a content element on your T3 page or be included in external pages.

In its main mode, it inserts a link to the actual JS-Ticker newsticker page (page type 222).

In the BE, the Editor can choose whether or not the access to the newsticker shall be protected (by the logged in FE user's accound coded into the URL of the newsticker) or not.

Screenshots

This is how a ticker is inserted in the backend as frontend plugin, with an optional checkbox for the protection of the ticker and several optional settings that control its appearance and functionality:

img-1

Newsticker links are shown as content elements in this way (configurable by locallang.php):

img-2

All further config is done by TS values in an extension template on the page containing the newsticker.

In the browser, the ticker (horizontal one shown here) looks somewhat like this:

img-3

Users manual

Install the extension via the EM.

You can then insert a new content element type “JavaScript Newsticker” on any page:

img-4

Enter a header title and tick the checkbox “Protect external access to this newsticker?” if you wish it to be protected.

Protection in this case means that

a user needs to be logged in as a valid FE user in order to be presented the URL to the ticker

the URL for external access to the ticker will contain the user's username and his md5'ed password hash

The URL a user is shown in order to view our JS ticker basically looks like this:

  1. non-protected ticker:
index.php?id=<id_of_this_page>&type=222&feed_id=<content_element_id>&<some_settings_stuff>
  1. protected ticker:
index.php?id=<id_of_this_page>&type=333&feed_id=<content_element_id>&user=<fe_username>&pass=<md5_hash>&<some_settings_stuff>

An extension template needs to be created on the page the newsticker resides on to make some adjustments that are necessary in order to get properly formatted link tags etc.

An exemplary template setup should look somewhat like this:

cm_jstickernews >
cm_jstickernews = PAGE
cm_jstickernews {
  typeNum = 222
  config.disableAllHeaderCode = 1

  includeLibs.cm_jsticker = EXT:cm_jstickernews/pi1/class.tx_cmjstickernews_pi1.php

  10 = USER
  10 {
    userFunc = tx_cmjstickernews_pi1->make_ticker

    # prefix for direct tt_news item links
    # set up a news details page (code=SINGLE) with an extension template
    # that sets the correct backPID value to a news overview page!
    tickerItemLinkPrefix = http://your.domain.tld/newsfeeddetail.html?tt_news=

    # select news from these tt_news sysfolders, default=all
    #newsPidList = 38

    # which news categories to show, default=all
    #newsCatList = 1,2,3,5

    # how many items are shown, default=all
    #newsItemCount = 2

    # SQL sorting by tt_news field name, default=no ordering
    #newsItemOrderBy = crdate DESC
  }
}

Modify this to your situation, save and view the page. This should be it. A reference of the possible TS params is available below.

Several parameters in the resulting user URLs of the newsticker page can be adjusted by the end user who wants to include your ticker in his web page.

These are:

  • &style=[vertical | horizontal]
  • &bgcolor=[HEX value without leading #]
  • &speed=[int value (1-10)]
  • &width=[int value in px]
  • &height=[int value in px]

Inclusion on external pages is easy.

Add this snippet to your PHP-enabled page (.php):

<?php
        include(“http://link.generated.by.the.extension”);
?>

FAQ

Not yet.

Configuration

This section refers to the possible TS parameters that can be used to configure this extension.

Reference

tickerItemLinkPrefix

Property

tickerItemLinkPrefix

Data type

string

Description

Sets the link prefix for each tt_news item in the ticker.

The resulting URL looks like this in the ticker:

<a href=”tickerItemLinkPrefix<tt_news_item_id> target=”_blank”><tt_news_cat>: <tt_news_header></a>

Overriden by DB field “tx_cmjstickernews_jsticker_linkprefix” when ticker is being displayed inline.

Default

newsPidList

Property

newsPidList

Data type

Int+

Description

List of sysfolder PIDs that are supposed to be used for tt_news item fetching. Default behaviour: fetch from all tt_news sysfolders.

Default

newsCatList

Property

newsCatList

Data type

Int+

Description

List of tt_news category uid's that are supposed to be used for tt_news item fetching. Default behaviour: fetch from all tt_news categories.

Default

newsItemCount

Property

newsItemCount

Data type

Int+

Description

Sets how many tt_news items shall be included in the JS ticker. If not given, all items are included.

Default

newsItemOrderBy

Property

newsItemOrderBy

Data type

string

Description

If property is set, the SQL result ordering of the news items can be influenced. All columns of the tt_news table can be used for odering.

Syntax:

[crit1] [crit2] [crit3] ... [DESC] | [ASC]

Example:

newsItemOrderBy = crdate uid DESC

Default

[tsref:plugin.tx_cmjstickernews]

((generated))
Example

see chapter “Users manual”.

Known problems

None yet.

To-Do list

Come up with your ideas/concerns/feedback/whatever. I'm glad about any input I can get ;)

Changelog

  • 0.0.1.: first public version, should work as intended
  • 0.0.2.: fixed a minor bug: links in horizontal scroller make now use of the itemLinkPrefix

img-5 EXT: JS-Ticker newsfeed export - 4