• No results found

EXT: News Event. Extension Key: mbl_newsevent Copyright , Mathias Bolt Lesniak,

N/A
N/A
Protected

Academic year: 2021

Share "EXT: News Event. Extension Key: mbl_newsevent Copyright , Mathias Bolt Lesniak,"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

EXT: News Event

Extension Key: mbl_newsevent

Copyright 2000-2004, Mathias Bolt Lesniak, <mathias@lilio.com>

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 Event... 1

Introduction... 1

What does it do?... 1

This Extension in relation to other Calendars... 1

User's manual... 2

Installation... 2

Quick start... 2

Adding event information... 2

Listing Events... 2

The Event Period Selector... 2

Upgrading from versions before 0.3.0...2

Configuration... 2

Include static extension templates... 2

Adding event information to the tt_news template... 3

Reference...3

Configuring the ICS feature...4

Known problems...4 To-do list... 4 Changelog... 5 Changes in version 0.2.0... 5 Changes in version 0.3.0... 5 Changes in version 0.3.2... 5 Changes in version 0.4.0... 5 Changes in version 0.4.1... 5 Changes in versions 0.4.2-0.4.4... 5 Changes in version 0.4.5... 5

Introduction

What does it do?

News Event is an extension for News (tt_news) enabeling news articles to also be events. The idea is that, when announced, events will also be announced with a news article. With News Event a couple of fields containing event information is simply added to the usual news article.

Features:

Events and news information merges. You only need to publish the information once to make it list both as an event and as a news article. It's basically just new cool extra features for tt_news!

Adds from/to date and time fields for event dates/times to news articles.Adds event location information to news articles.

News artices don't need to be events – it's just an option!

Adds specific listing options for past/future events in the tt_news plugin.Avoids conflicts with other extensions, using new features of tt_news 1.7.0. • ICS calendar file download.

This Extension in relation to other Calendars

There's a huge number of calendar extensions for Typo3. This extension was not made with competition in mind. The main reason for making this extension was to make publishing events and news as easy and fast as possible. I think it is important that Typo3 extensions are made to work together and use eachother's functionality as much as possible. This makes the day easier for the users, and it saves development time.

I would be happy to cooperate with other programmers to make mbl_newsevent work well and cooperate with their extensions (that includes other calendar extensions)!

(2)

– Mathias Bolt Lesniak, developer. <mathias@lilio.com>

User's manual

This User's manual assumes that you have read the News (tt_news) documentation.

Installation

Install the extension with the extension manager.

For details about Templates, please see the "Configuration" section.

Quick start

News Event adds no new content elements; it only adds to what already exists through tt_news.

You should read the section “Including static extension templates” under “Configuration”. Without this, the extension will probably work poorly.

Adding event information

When you create a new news article, or open an old one, you will find the News Event fields at the bottom of the usual form. 1. Click the "Event" checkbox to mark the news article as an event.

2. Type in times, dates and location information in the correct fields 3. Assuming you have filled in the necessary news fields; click save.

I haven't found out how to separate the date from the time information in the backend. Therefore: You'll have to type in a time, although you only want a date. A good tip is to make the time 00:00, so that the date ends up looking like this: “00:00 25-09-2004“ for the 25th September 2004. The ICS function automatically removes time information if the time is set to 00:00.

A way around fiddeling with typing in the event dates all the time is the Date2Calendar extension (erotea_date2cal), which lets you choose a date from a pop-up calendar.

Listing Events

The News (tt_news) plugin takes care of News Event listing. When you installed News Event, a number of new options were added to the "What to display" field on the "General settings" sheet. These are:

FIELD: What to display Description

EVENT_FUTURE A list of events in the future EVENT_PAST A list of events in the past

LATEST_EVENT_FUTURE A list of the closest upcomming events (short) LATEST_EVENT_PAST A list of the closest recent events (short)

EVENT_SELECTOR A list of events in certain periods (like the archive menu - “AMENU”)

Template note: EVENT_FUTURE and EVENT_PAST uses the same template as the News plugin's LIST option, and LATEST_EVENT_FUTURE and LATEST_EVENT_PAST uses the same as LATEST. If you want to use a different template for listing events, make a new plugin content element, and add a different template in the "Template" sheet in the tt_news plugin configuration.

The Event Period Selector

The Event Period selector in many ways works like the usual archive menu (“AMENU”) in tt_news, but instead of showing a list of periods (months, quarters or years) when news articles have been posted, it shows a list of periods when events happen. The Event Period Selector can either be a menu (with auto-submit) or a list. This is defined with the eventSelector TS property. See Configuration->Reference for more information.

Upgrading from versions before 0.3.0

Some bugs have been fixed that slightly changed the output in the pre-0.3.0 versions of News Events. If you should want to restore what these bugs caused, this list should tell you what to do:

Listing latest published events instead of the most upcomming events in LATEST_EVENT_FUTURE and the most recent events in LATEST_EVENT_PAST: Set the TypoScript variable

plugin.tt_news.mbl_newsevent.latestShowsNewEvents to 1.

Correcting the time displayed: Set the typoscript variable plugin.tt_news.mbl_newsevent.dateCorrect to the amount of seconds (negative or positive) that you want to change the time with. In pre-0.3.0 versions this value was set to 86400 (one day).

Configuration

The News Event (mbl_newsevent) extension can only be configured through the TypoScript setup. As it is an extension of (and thus in theoretical forms a part of) tt_news, configuration settings are stored within tt_news' TS setup.

Include static extension templates

(3)

must be included through the templates:

It is important to include the News Event static templates after the static templates from tt_news, because of certain limitations in the tt_news TypoScript.

Adding event information to the tt_news template

News Event introduces a number of extra template markers to tt_news' template parser. These can be used to add event information to news listings.

The fastest way to show event information is to add the ###EVENT_WRAP### and ###EVENT_WHERE_WRAP### markers where you want the event and location information to appear in the news lists and single view. You can also use a more advanced approach, by using the specific event markers. For an example, please see the default extension file at

EXT:mbl_newsevent/event_template.tmpl.

If you make a new template file, you can actually put what you need into the news template (to have everything in the same place). You'll just have to set the plugin.tt_news.mbl_newsevent.templateFile property to the same as the news template (sorry, FlexForms won't work with this – yet).

Reference

plugin.tt_news.mbl_newsevent properties:

Property Data type Description Default

dateCorrect integer The number of seconds to put the dates shown into the future or the past. Corrects date changes that happen on certain servers (it seemes).

Example:

#Adds one hour to the displayed time

plugin.tt_news.mbl_newsevent.dateCorrect = 3600 0

dateSelItem_std

Wrap ->stdWrap StdWrap for items in the Event Selector.

dateSelOrder string Sorting ascending (ASC) or descending (DESC). Insert values

“ASC” or “DESC” ASC

eventPeriodPID Integer The page ID (PID) to link EventPeriod Selector links to. Set to zero

for same page 0

eventPeriodTar

get String Target for Event Period Selector liniks _self eventSelector String For the EVENT_SELECTOR option. Possible values are “list” or

“menu”. Makes the Event Period Selector show either as a list or as a menu.

menu

latestLimit integer Same as plugin.tt_news.latestLimit

Defines the max numner of listed articles on one page for

LATEST_EVENT_FUTURE and LATEST_EVENT_PAST. Set to 0 to use the value from plugin.tt_news.latestLimit 0 latestShowsNe

wEvents boolean If true, LATEST_EVENT_FUTURE and LATEST_EVENT_PAST shows the newest events, and not the ucomming events. 0 limit integer Same as plugin.tt_news.limit.

Defines the max number of listed news articles on one page for EVENT_FUTURE and EVENT_PAST. Set to 0 to use the value

from plugin.tt_news.limit 0

showEventPerio

dCount Boolean Show a count of articles in the periods listed by the Event Period Selector (“EVENT_SELECTOR”) 1 showOrganizer

Email boolean If true, an event organizer's e-mail address is shown. 1

templateFile resource The template file containing the few extra template items for News Event. Example: plugin.tt_news.mbl_newsevent.templateFile = EXT:mbl_newsevent/event_template.tmpl EXT:mbl_newsevent/ event_template.tmpl timeperiodSelM ode

integer For the event shown in the event selector: 0=all, 1=future events,

2=past events 0

(4)

Property Data type Description Default

fileName string The name of the downloaded ICS file. Event Calendar.ics

from string Older events than this date is not loaded into the ICS file. For info about the date formats, see:

http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html

1 year ago

templateFile resource The template file for the ICS generator. This file does normallly not need any changes, so the best is to let this setting stay at it's default.

EXT:mbl_newsevent/ res/ics_template.tmpl to string Events further in the future than this is not loaded into the ICS file.

For info about the date formats, see:

http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html

1 year

The following properties give the same results as in tt_news, but limited to event listings, when put into plugin.tt_news.mbl_newsevent: limit, latestLimit

Properties within the display settings for "LIST" and "LATEST", for example within plugin.tt_news.dispalyList.mbl_newsevent:

Property Data type Description Default

date_stdWrap ->stdWrap stdWrap for display of the event dates organizer_stdW

rap ->stdWrap stdWrap for display of the event organizer time_stdWrap ->stdWrap stdWrap for display of the event times

where_stdWrap ->stdWrap stdWrap for display of the where field (event location).

Configuring the ICS feature

The ICS feature makes it possible to download a .ics (also called iCalendar) file with events. This feature closely resembles the RSS feed feature in tt_news. It can be configured either by including the static template “ICS feed (type=101)”

or with normal TypoScript like this:

icsevents = PAGE icsevents { typeNum = 101 10 > 10 < plugin.tt_news 10.pid_list > 10.pid_list = {$plugin.tt_news.pid_list} 10.singlePid = {$plugin.tt_news.singlePid} 10.defaultCode = ICS config { disableAllHeaderCode = 1 #additionalHeaders = Content-type:text/calendar no_cache = 1 xhtml_cleaning = 0 } }

The lines that are different from the RSS example in the tt_news manual have been colored red. One line has been commented out. That is additionalHeaders = Content-type:text/calendar, which value has been internalized. The ICS feature has only been tested in Apple's iCal, but should work most places. An exceptioin may be Microsoft Outlook. Please give feedback ifyou can give me reports on other applications that the ICS is compatibe or incompatible with. In case of an incompatbility I'd be very happy if you could send me the error message you get (if any). I'd be over-enthusiastic if you could tell me why it doesn't work!

(5)

Known problems

• The Extension is not compatible with versions of tt_news below 1.7.0. • The ICS feature doesn't always work with sites that are using frames.

• The tt_news page browser doesn't seem to show the correct page count. A fix is in development. Please contact if you know of an easy way!

To-do list

Please feel free to suggest items for the to-do list. Please tell if you're interested in giving a helping hand in the development of features. Some items in the to-do list have version numbers in brackets. Those numbers refer to the version when these features may be expected to have been implemented.

• Event registration and organizing tools (1.0.0)

• Additional FlexForm sheet for event specific settings. (I don't think I know how to di this, but I'll try!) • Implement hooks for third party extensions.

• Extending the TS properties so that the extension doesn't just use tt_news' TS settings for listings etc. (Makes configuration easier)

• Small calendar with dates/weeks/months. Clicking on the date/week/month brings up a list of events in that date/week/month. (1.0.0)

• Spam protected e-mail addresses for Organizers.

Changelog

Changes in version 0.2.0

• Added new field called “EVENT_SELECTOR”. It lists events for different periods, like the archive menu (“AMENU”). • Added possibility to define the limit and latestLimit TS properties specificly for the event lists.

• Some changes to the manual (corrections and additions).

• Changed the icon slightly (added a plus-sign) to indicate that the extension extends tt_news. • Localizeable template markers for strings like “Event date(s):” and “Location”.

Changes in version 0.3.0

• ICS calendar download possibility.

• Organizer information (can be gathered from fe_users, be_users or tt_address). Introduces the fields ###EVENT_ORGANIZER### and ###EVENT_ORGANIZER_TEXT### (the last for the label) in the template.

• Added the field ###EVENT_TO_TEXT### in the templates for translated versions of the english word “to” in the template. • An amount of seconds can now be added to or subtracted from the times displayed in listings.

• Misc. bugs corrected.

Changes in version 0.3.2

• It is now possible to make the event selector show either all, future or past events through the TypoScript variable

plugin.tt_news.mbl_newsevent.timeperiodSelMode. Thanks to Stig Færch for this. • New translations included (Norwegian and Finnish).

Changes in version 0.4.0

• ICS feed available as a static ext template.

• TypoScript Constants and Setup files preconfigured.

• Divider to tabs implemented. News Event now has it's own tab when you create or edit a news article. (Requires tt_news 2.0.2 or higher, and Typo3 version 3.7.0 or higher.)

• Tested with multilingual news. Work without problems.

Changes in version 0.4.1

• Static template must be included for News Events to work. • Some bugs corrected.

(6)

Changes in versions 0.4.2-0.4.4

• Bugs corrected

• Added dateSelOrder TypoScript property to choose ascending or descending sorting of the Event Period Selector.

Changes in version 0.4.5

• Corrected a bug that made the Event Selector not show in some cases. • German localization (thanks to René Rossi)

• Correction to the Norwegian localization (Quarter is “kvartal”, not “kvarter”).

• The Extension repository now has the same version number as this manual. How surprising!

Changes in version 0.4.6

• Corrected a bug in the Event Selector where items were shown that shouldn't be visible. (Thanks to Stig Nørgaard Færch for that.)

References

Related documents

Professional Development for University Faculty If participation is to be optimized in the higher educa- tion environment to increase the success of a wider pop- ulation of

By clicking on the template name or selecting a template and clicking on &#34;Edit&#34; in the Template Overview screen, you open the Template Parameters screen.. Here,

Thus, the analysis of the life cycle of a product (i.e., building) makes it possible to evaluate its main environmental impacts (energy demand, greenhouse gas

This is respectively subsequently submitted to a taxonomic database to retrieve textual, visual or acoustic information of the identified species to return to the field device

To apply the template to an existing document, create a new blank document with the OpenOce Importer template styles as described in &#34;Creating a New Document with the

Hong Kong Science and Technology Parks Corporation (HKSTPC) invites professional research consultancy firms to submit a tender proposal to conduct a study and gap analysis of the

The following features on the Compact 7 RemoteFX-enabled client, work together with a server that runs Windows Server 2008 R2 SP1 with RemoteFX features to provide a full

Supervisor: Timothy Hartshorne, Ph.D.  Research studies: 1) investigating adolescence in CHARGE syndrome with regard to genetic testing, changes in physical development,