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: newscalendar

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Philip Almeida
Changed:2010-06-14T19:23:47
Classification:newscalendar
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:news, calendar, jquery, tooltip
Author:Philip Almeida, Clemens Riccabona
Email:philip.almeida@freedomson.com, clemens@riccabona.biz
Info 4:
Language:en

img-1 img-2 EXT: newscalendar - newscalendar

EXT: newscalendar

Extension Key: newscalendar

Language: en

Keywords: news, calendar, jquery, tooltip

Copyright 2000-2009, Philip Almeida, Clemens Riccabona, <philip.almeida@freedomson.com, clemens@riccabona.biz>

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.org

Introduction

((generated))

What does it do?

img-3

Official freedomson extension page:

http://www.freedomson.com/index.php?id=175

This extension provides a calendar view for tt_news extension.It also provides a list view that works together with the calendar.

Working example: http://www.eventonizer.nl, http://www.acuasuboeste.com

Screenshots

img-4 1. Calendar view normal

img-5 2. Mouse over a day with news

Credits

This extension uses:

PHP Calendar ( version 2.3 )

written by Keith Devens ( http://keithdevens.com/software/php_calendar )

jQuery Beauty Tips ( version 0.9.5-rc1 )

written by Jeff Robbins ( http://www.lullabot.com/files/bt/bt- latest/DEMO/index.html )

Browser compatibility list

Linux (DEBIAN UBUNTU 9.10) Opera 10.10FF 3.6

Windows (XP) Safari 4.0.4Chrome 3.0.195.33Chrome 4.0.249.89 (38071)Opera 10.10 1853IE 6IE 7IE 8.0.6001.18702FF 3.5.2

Windows (7) FF 3.6Opera 10.10

Mac OSX 10.6.2 SafariFF 3.5.7FF 3.6

Sponsors

Eventonizer.nl and Geefgratis.nl

Eventonizer.nl and Geefgratis.nl sponsored the modifications introduced in version 0.1.0

Possibility to render news item between date interval.

Thanks to Jordan Bergen < jordan@eventonizer.nl >

phase2-networks.com

Sponsored dam_ttnews integration.

Category selector.

Digital-park.de

Sponsored FF 3.6 update

Users manual

((generated))

Installing calendar

“Include static (from extensions)”

Add “newscalendar” static template to static templates on your template record;

Create “newscalendar” plugin ( picture 1) record inside your page, choose display type between “Calendar” or “List”, the “List” view depends on an existing “Calendar” view and will not work alone;

Setup required fields, see example in below screen shot;

Add your locale configuration “locale_all” to the template setup section:

config.locale_all = en_GB

img-6 Picture 1 ( Plugin )

Activating news record

Proceed to the news record and activate “Show in calendar” (picture 2) option on desired news to show in calendar.In order to show all items independently of this option please refer to “Reference” chapter. If you want to use a different date to render the item, other then the “Date/Time” field of the “General” tab, please fill the date field in this tab.

img-7

Picture 2 ( News item activation screen )

Note:

If you want a news item to render to calendar between a interval of days and not just on “startdate” please fill the third field “End Date”.So, if you have a news record with a “startdate” of 2008-01-12 and a “enddate” of 2008-02-02, the calendar will render the item to all days between the two dates.

To render calendars as List with above option active please select display type “ListInterval”.

tt_news hooks

Hook in tt_news has been used in order to display markers for start and end date in single news view.

You have now 2 new additional markers available which you can place in your tt_news template.

###NEWS_STARTDATE### which displays the start date of newscalendar extension.

###NEWS_ENDDATE### which displays the end date of newscalendar extension.

###NEWS_STARTENDATE### a mix of the two first ones.

Note: The ###NEWS_ENDDATE### marker will only be filled if the end date is not empty.

FAQ

1. How do I make the "Show in calendar" unchecked by default?

You can set it by adding this line of Tsconfig to your users then the box will not be checked on news creation:

TCAdefaults.tt_news.tx_newscalendar_state = 0

2. I get funny characters on day or month display like “Sá.” instead of “Sáb.” What do I do?

Try to set $TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';

To your correct charset on your localconf.php

If the above does not work, try setting parse function to skip.

Note: You should always check your TS: config.locale_all=pt_PT.utf8 ( Example for Portuguese )

Multilanguage support

First I recommend reading “Frontend Localization Guide” or watching the podcast :

http://typo3.org/documentation/document-library/core- documentation/doc_l10nguide/1.0.0/view/toc/0/

http://castor.t3o.punkt.de/files/podkast_julestue4-localization.m4v

After reading this document , on each language configured on your site please insert the correct config.locale_all option.

Note: The operating system on which your site is installed must have the desire language pack installed so PHP may do the translation, this extensions uses the PHP “setLocale” function for handling language change:http://pt.php.net/manual/en/function.setlocale.phpBe aware that different server operating system handle differently PHP setLocale option.An example is windows and linux. The first accepts “portuguese” as a valid input, the second “pt_PT”To check if your system has a certain language installed please use the following command in Linux:

locale -a

If your server does not have your language pack installed do (example for portuguese):

apt-get install language-pack-pt language-pack-pt-base# Default configuration example.

config.locale_all = pt_PT.UTF-8 # If it was a windows system this would be set to Portuguese.

# Language specific configuration.

[globalVar = GP:L=1]

config {

sys_language_uid = 1

language = dk

locale_all = da_DK

}

[globalVar = GP:L=2]

config {

sys_language_uid = 2

language = en

locale_all = en_GB

}

[global]

Note: In some cases you must setup your php.ini configuration settings for translation to work as expected.This was reported in Canada where October month was displayed as November.“Since you use gmmktime(), the "php.ini" must have the right date.timezone information.

For us in Canada we needed to set UCT and now the right month is showing.” Patrick Gaumond

Since version 1.0.12 you may set your timezone via typoscript setup (by default the extension uses server timezone date.timezone from php.ini):

plugin.tx_newscalendar_pi1.calendar.timeZone = UTC

If you get some weird output like day number not marching week day your timezone is incorrect try the above config if it does not work try another time zone (http://pt.php.net/manual/en/timezones.php).

Configuration

((generated))

Reference

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

allRecords

a

allRecords

b

boolean

c

This option overwrites the local news record option "Display in calendar"

d

0

tsref:plugin.tx_newscalendar_pi1.show]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

cssCalendar

a

cssCalendar

b

string

c

CSS file for calendar

d

EXT:newscalendar/res/cssCalendar.css

cssContextMenu

a

cssContextMenu

b

string

c

CSS file for calendar context menu

d

EXT:newscalendar/res/cssContextMenu.css

jsJQuery

a

jsJQuery

b

string

c

JQuery API

d

EXT:newscalendar/res/jquery.min.js

jsJQueryTooltip

a

jsJQueryTooltip

b

string

c

Jquery Beauty tips ( http://www.lullabot.com/files/bt/bt- latest/DEMO/index.html )

d

EXT:newscalendar/res/bt-0.9.5-rc1/jquery.bt.min.js

jsDateChanger

a

jsDateChanger

b

string

c

Date Changer Script ( Thanks to Максим Левицкий - Maxim Levicky)

d

EXT:newscalendar/res/date_changer.js

jsGoogleCanvasAPI

a

jsGoogleCanvasAPI

b

string

c

Google Canvas API only included when browser is IE

d

realbrowser OR

EXT:newscalendar/res/bt-0.9.5-rc1/other_libs/excanvas_r3/excanvas.js

calendarViewTemplate

a

calendarViewTemplate

b

string

c

Template file for calendar view items

d

EXT:newscalendar/res/calendarViewTemplate.html

listViewTemplate

a

listViewTemplate

b

string

c

Template file for list view

d

EXT:newscalendar/res/listViewTemplate.html

arrowLeft

a

arrowLeft

b

string

c

Image file for calendar navigator

d

EXT:newscalendar/res/pic/arrow-left.png

arrowRight

a

arrowRight

b

string

c

Image file for calendar navigator

d

EXT:newscalendar/res/pic/arrow-right.png

arrowLeftDisabled

a

arrowLeftDisabled

b

string

c

Image file for calendar navigator when “calendar.hideIfInPast” is activeThanks to Grégory Goidin

d

EXT:newscalendar/res/pic/arrow-left.png

[tsref:plugin.tx_newscalendar_pi1.file]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

order

a

order

b

string

c

Order list by date “asc” or “desc”

d

asc

strftime.main

a

strftime.main

b

string

c

Time format

d

%B - %Y

strftime.header

a

strftime.header

b

string

c

Time format

Used in listview template marker ###HEADER###.

Note: only used if Display type is equal to “listinterval”.

d

%d - %A

strftime.item

a

strftime.item

b

string

c

Time format

d

%H:%M

hideIfInPast

a

hideIfInPast

b

boolean

c

If set past events are hidden from listView by Clemens Riccabona, Riccabona eSolutions.

d

0

image.file.maxW

a

image.file.maxW

b

integer

c

Max width of image shown in listView (if marker set in template) by Clemens Riccabona, Riccabona eSolutions

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.listView.image.file.maxW]

d

136

image.file.maxH

a

image.file.maxH

b

integer

c

Max height of image shown in listView (if marker set in template) by Clemens Riccabona, Riccabona eSolutions

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.listView.image.file.maxH]

d

150

subheader_stdWrap.crop

a

subheader_stdWrap.crop

b

stdWrap

c

Cropping as known from tt_news for short/bodytext in listView by Clemens Riccabona, Riccabona eSolutions

d

180 | ...

[tsref:plugin.tx_newscalendar_pi1.listView]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

startWeekDay

a

startWeekDay

b

int

c

The start week day for the calendar default 0 (Sunday)

d

0

timeZone

a

timeZone

b

string

c

Timezone for calendar generator. Please check http://pt.php.net/manual/en/timezones.php for supported timezones. By default the extension uses server timezone date.timezone from php.ini. Setting this values will overwrite php.ini settings.

If the current day does not correspond to the weekday on your time zone, you must edit this parameter.

d

Not set

strftime.contextHeader

a

strftime.contextHeader

b

string

c

Time format

d

%A %d, %B %Y

strftime.contextItem

a

strftime.contextItem

b

string

c

Time format

d

%H:%M

image.file.maxW

a

image.file.maxW

b

integer

c

Max width of image shown in calendar (if marker set in template)

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.calendar.image.file.maxW]

d

50

image.file.maxH

a

image.file.maxH

b

integer

c

Max height of image shown in calendar (if marker set in template)

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.calendar.image.file.maxH]

d

50

hideIfInPast

a

hideIfInPast

b

boolean

c

If set past events are hidden from calendar View by Clemens Riccabona, Riccabona eSolutions

The navigator for previous months will be rendered with no link. ( see also file.arrowLeftDisabled )

d

0

addNoCache2Navigation

a

addNoCache2Navigation

b

boolean

c

If set the previous and next link on the calendar will have “&no_cache=1” attached to the url parameters.

There were reports about this option breaking RealURL setups (http://bugs.typo3.org/view.php?id=8810), to deactivate set to 0.

d

1

dateChanger

a

dateChanger

b

boolean

c

Use date changer selector. Requires JQuery ( Thanks to Максим Левицкий - Maxim Levicky ). To activate selector, click on columYear.

d

0

jQueryNoConflict

a

jQueryNoConflict

b

boolean

c

Activate jQuery.noconflict mode flag.Activate this when using extension together with:- rgsmoothgallery- perfectlightbox

d

0

loadJQuery

a

loadJQuery

b

boolean

c

If false jQuery will not load by default. It will have to be included elsewhere.

d

1

loadJQueryTooltip

a

loadJQueryTooltip

b

boolean

c

If false jQuery Beauty Tip will not load by default. It will have to be included elsewhere.

d

1

loadJGoogleCanvasAPI

a

loadJGoogleCanvasAPI

b

boolean

c

If false Google Canvas API will not be included by newscalendar and has to be processed elsewhere for ie compability

d

1

renderNavigationAsImages

a

renderNavigationAsImages

b

boolean

c

Render calendar navigation as images

d

0

imageArrows.file.maxW

a

imageArrows.file.maxW

b

integer

c

Max width of image in calendar navigation (if active via renderNavigationAsImages)

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.calendar.imageArrows.file.maxW]

d

32

imageArrows.file.maxH

a

imageArrows.file.maxH

b

integer

c

Max height of image in calendar navigation (if active via renderNavigationAsImages)

Note: This property is reached by:

[tsref:plugin.tx_newscalendar_pi1.calendar.imageArrows.file.maxH]

d

32

[tsref:plugin.tx_newscalendar_pi1.calendar]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

maxItems

a

maxItems

b

int

c

Max number of items the view “nextItems” should display.

d

100

relativeToCalendar

a

relativeToCalendar

b

boolean

c

If there is a calendar view on the same page, the first date used to show the next events will be the first day of the month if relativeToCalendar=1 and if the chosen month is a future month, otherwise the first event will be the nearest event from current day.

d

0

[tsref:plugin.tx_newscalendar_pi1.nextEvents]

Note : In mode nextEvents, the display shows only events in the future.

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

hideIfInPast

a

hideIfInPast

b

boolean

c

If set past events are hidden from calendar View by Clemens Riccabona, Riccabona eSolutions

d

0

[tsref:plugin.tx_newscalendar_pi1.listInterval]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

displayType

a

displayType

b

int

c

Type of render:

1 – Calendar2 – List3 – ListInterval4 - Nextevents

d

not set

monthLinkDisplay

a

monthLinkDisplay

b

int

c

Show link to list.

1 – Yes

0 - No

d

not set

monthNavigationViaNews

a

monthNavigationViaNews

b

boolean

c

Experimental – Connects all navigator buttons to tt_news, you will need to had a regular tt_news list view in order to work. Only available via Typoscript.

Example:

Add a tt_news list content element to the page where the calendar is also included.Navigating the calendar will navigate the news list.

d

0

ie7compat

a

ie7compat

b

boolean

c

Activate the render of

<meta http-equiv="X-UA-Compatible" content="IE=7" />

Set this to true if you experience for ie8 compatibility issues.

Only available via Typoscript.

d

1

listPage

a

listPage

b

int

c

Uid of list page to link to.

Example: 2,3,4,5

d

not set

categorySelection

a

categorySelection

b

string

c

List of categories UIDs to display.

Example: 2,3,4,5

This can now be more complex (thanks to Lukas Taferner ): http://forge.typo3.org/issues/show/7266

This now as “stdWrap capabilies to the parameter and enable Features like categorySelection.data = GPvar : tx_ttnews|cat”

In Setup you have to add categorySelection=TEXT

d

not set

useSubCategories

a

useSubCategories

b

boolean

c

Select records from subcategories of selected categories

d

false

singleView

a

singleView

b

int

c

Uid of page that will render the single view for news item.

d

not set

backPage

a

backPage

b

int

c

Back page for news item.

d

not set

startingPoint

a

startingPoint

b

int

c

Starting point for news records.

d

Not set

recursion

a

recursion

b

int

c

Recursion level for startpoint

d

not set

dayNameLength

a

dayNameLength

b

int

c

Length of day description

d

3

[tsref:plugin.tx_newscalendar_pi1.render

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

parserFunction

a

parserFunction

b

string

c

Type of php function to parse special characters:

“htmlspecialchars” , “htmlentities” or “skip”

Some multi-language sites over different server configuration prefer different approaches. Change this value if you experience funny characters in your display.

d

htmlentities

[tsref:plugin.tx_newscalendar_pi1.special]

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

width

a

width

b

in

c

Tooltip width

d

300

backgroundColor

a

backgroundColor

b

string

c

Tooltip background color

d

#EEEEEE

borderColor

a

borderColor

b

string

c

Tooltip border color

d

#CCCCCC

borderWidth

a

borderWidth

b

Int

c

Tooltip border width

d

4

radius

a

radius

b

int

c

Tooltip radius

d

10

padding

a

padding

b

int

c

Tooltip content padding

d

10

spikeLength

a

spikeLength

b

int

c

Arrow (pointer) lenght

d

20

spikeGirth

a

spikeGirth

b

int

c

Arrow (pointer) girth

d

20

shadow

a

shadow

b

boolean

c

Activation flag for shadow on tooltip. ( Only firefox & Safari )

d

true

shadowBlur

a

shadowBlur

b

int

c

Tooltip shadow blur

d

12

shadowOffsetX

a

shadowOffsetX

b

int

c

Tooltip shadow OffsetX

d

0

shadowOffsetY

a

shadowOffsetY

b

int

c

Tooltip shadow OffsetY

d

5

positions

a

positions

b

string

c

Render position ( parsed as a javascript array )

d

[ 'top', 'right', 'bottom', 'left' ]

fadeSpeed

a

fadeSpeed

b

int

c

Tooltip show and hide fade speed

d

200

[tsref:plugin.tx_newscalendar_pi1.tip]

Please see, http://www.lullabot.com/files/bt/bt- latest/DEMO/index.html, for more information on tooltip additional config options.

Also check jquery.bt.js the javascript API file ( bottom of the file ) for a complete reference on configuration options.

Property:

a

Property:

b

Data type:

c

Description:

d

Default:

show

a

show

b

boolean

c

enable the pageBrowser

d

0

limit

a

limit

b

int

c

Number of events per page

d

10

maxPages

a

maxPages

b

int

c

Max number of pages to include in the browse bar

Note : if there is more pages than maxPages, the pageBrowser will create only maxPages that will slide along the global range of pages.

d

5

showResultCount

a

showResultCount

b

boolean

c

Shows the global number of results

d

1

tableParams

a

tableParams

b

string

c

Parameter that will be include in the table tag

d

class="browseBox"

pointer

a

pointer

b

string

c

Name of the pointer used to change pages

d

Calendar_list

showRange

a

showRange

b

boolean

c

Transform the pages links from “Page 1” “Page 2” … to the range of each page : “1-5” “6-10” ...

d

1

showFirstLast

a

showFirstLast

b

boolean

c

Display two more links that point to the first and last page of the pageBrowser

d

0

pagefloat

a

pagefloat

b

string/int

c

This defines were the current page is shown in the list of pages in the Pagebrowser. If this var is anu 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 pagelist

d

center

[tsref:plugin.tx_newscalendar_pi1.pageBrowser]

Note : the pageBrowser is only active with the displays of type : listview and nextItems.

Rendering plugin via Typoscript

Here is an example of how to achieve this, please change the values to fit your needs.

plugin.tx_newscalendar_pi1.show.allRecords = 1

plugin.tx_newscalendar_pi1.render.monthLinkDisplay = 1

plugin.tx_newscalendar_pi1.render.dayNameLength = 1

plugin.tx_newscalendar_pi1.render.singleView = 268

plugin.tx_newscalendar_pi1.render.backPage = 267

plugin.tx_newscalendar_pi1.render.displayType = 1

plugin.tx_newscalendar_pi1.render.listPage = 285

plugin.tx_newscalendar_pi1.render.startingPoint = 204

lib.calendarContainer < plugin.tx_newscalendar_pi1

Participating

((generated))

Join the team

Do you want to join the team and help?

Send a email to the authors with your forge typo3 username.

We will add you to the team.

Repository

You can find the Subversion repository at:

https://svn.typo3.org/TYPO3v4/Extensions/newscalendar

To-Do list

Paginate list results in listInterval.

Date Changer simple multilang capability.

Changelog

See changelog

Acknowledgments

Version 1.0.15

Version Update Author:- Clemens Riccabona (http://www.eur-ops.com/)

Version 1.0.14

Version Update Author:- Clemens Riccabona (http://www.eur-ops.com/)

Version 1.0.10

Michael Hitzler, paravista media (www.paravista.de)

Version 1.0.6

Author:- Clemens Riccabona (http://www.eur-ops.com/)Special Characters Bug Fix:

- Kutschker Martin (http://www.activesolution.at)Caching Bug Fix:

- Markus Waskowski (http://www.growing-media.de)

15