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.
Browser Tutorial Calendar (en)¶
Created: | 2010-10-13T21:40:33 |
---|---|
Changed by: | Dirk Wildt |
Changed: | 2012-05-17T05:04:06 |
Classification: | browser_tut_calendar_en |
Description: | Publish your data based on a calendar! Tutorial Calendar for the Browser - the TYPO3-Frontend-Engine. |
Keywords: | forAdmins, forDevelopers, forBeginners, forAdvanced, cal, calendar |
Author: | Dirk Wildt - Die Netzmacher |
Email: | http://wildt.at.die-netzmacher.de |
Website: | http://die-netzmacher.de |
Language: | en |
Browser Tutorial Calendar (en)|img-3|
Browser Tutorial Calendar (en)¶
Publish your data based on a calendar! Tutorial Calendar for the Browser - the TYPO3-Frontend-Engine.
Unofficial version!
- The Browser will support all features of +Browser Calendar from version 4.5
- You can use the day's schedule from version 4.0 only!
Version: 3.9.14, 2012-05-17
Extension Key: browser_tut_calendar_en - Tutorial for the extension Browser (extkey: browser)
Language: en
Keywords: forAdmins, forDevelopers, forBeginners, forAdvanced, cal, calendar
Copyright 2011 - 2012, Dirk Wildt - Die Netzmacher, <http://wildt.at .die-netzmacher.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.org
Table of Contents¶
Browser Tutorial Calendar (en) 1
Tutorial +Browser Calendar I/II 6
Install a database with events 6
Extend the Browser with +Browser Calendar 13
Tutorial +Browser Calendar II/II 15
Introduction¶
What does it do?¶
This is a tutorial for the extension Browser (extkey: browser).
It is
an manual how to publish your own data based on a calendar
only.
The result of the tutorial is
- a day' schedule
- with a small navigation
Unofficial version!
- The Browser should support all features of the plugin +Browser Calendar from version 4.5
- You can use the day's schedule from version 4.0 only!
Further Information¶
This tutorial in PDF format¶
You find this tutorial as a PDF file at
Browser Manual and Browser Tutorial Basics¶
Manual: The Browser has it's own manual (with the reference of course).
- HTML http://typo3.org/documentation/document-library/extension- manuals/browser_manual_en/current/
- PDF: http://typo3.org/extensions/repository/view/browser_manual_en/ current/info/?tx_terfe_pi1%5BdownloadFile%5D=doc%252Fmanual.pdf
Tutorial Basics: A lot of step-by-step introductions.
Forum¶
Illustration 3: The TYPO3-Frontend-Engine Browser Forum
The Browser has its own forum (leading language is German). You are welcome to post any question, bug or snippet code in German and Englisch at
TYPO3-Frontend-Engine Browser: Forum http://typo3-browser-forum.de/
Tutorial +Browser Calendar I/II¶
What do you need?¶
A database with records with a date time value for the beginning and - optional - with a date time for the end of the item. Items can be appointments, dates, deadlines, events or news and products for example.
The Browser extension.
Install a database with events¶
If you have a database with records with date time values, you can use this database for the tutorial. You may skip this step and go on with the next step.
Install the Organiser¶
We take the extension Organiser (org), It has a database for events.
We will remove the extension at the end of the tutorial and will clean up your database.
TYPO3 backend:
- Modul > Admin Tools > Extension Manager > Import Extensions
- Look for: Organiser
- Install extension but ignore dependencies:
- We need the extension Browser only.
- We don't need any other extension for this tutorial.
- Klick the button [Make updates]
The Browser and the Organiser will displayed in the extension manager like in the illustration above, if the installation was successful.
Page and folder¶
Add a page and a folder to your website like
my_website (your root page)
calendar (page)
events (folder)
Page¶
- Call your page "Calendar".
- Enable the visibility
- Hide it in menus
Folder¶
- Call your folder "Events"
- Set the page type to folder
- Enable the visibility
- And if you like the calendar icon like in the illustration below
- select the tab [Appearance]
- select in the field "Contains Plugin" the option [Org: Calendar]
The page tree should look like in the illustration below:
Records¶
Add some records to the event table.
Web > List
Page tree: folder events (here: id 391)
Edit area: click the icon [create new record)
click the icon [Calendar]
Please add three icons with the date of today and varied times like
- Event I - today from 10:00 h to 12:00 h
- Event II - today from 11:00 h to 13:00 h
- Event III - today from 19:00 h to 23:00 h
TypoScript¶
The Browser plugin needs the static template of the Browser.
Than the Browser has to know, which data should displayed in the frontend.
Please
- Add a TypoScript template to the page "Calendar"
- Copy and paste the TypoScript code from below into the "Setup" field of the TypoScript template
plugin.tx_browser_pi1 {
template {
extensions {
my_calendar {
calendar {
name = My Calendar
file = fileadmin/my_calendar.tmpl
csvViews = 1
}
}
}
}
views {
list {
1 = My Calendar
1 {
name = My Calendar
select (
tx_org_cal.title,
tx_org_cal.datetime,
tx_org_cal.datetimeend
)
orderBy = tx_org_cal.datetime DESC
}
}
single {
1 = My Calendar
1 {
select (
tx_org_cal.title,
tx_org_cal.datetime,
tx_org_cal.datetimeend,
tx_org_cal.bodytext
)
}
}
}
}
Please include the static templates
- Browser and
- +Browser Calendar
Intermediate result¶
The intermediate result should be look like in the illustration above.
Plugin +Browser Calendar¶
Add it!¶
Please
- add the plugin +Browser Calendar to the page "Calendar"
- call it [+Browser Calendar]
- select the tab [Calendar] and set the "Initial View" to [Day]
- save the plugin
Check the plugin¶
The first tab [Plugin check] of the plugin +Browser Calendar should report, that everything seems to be ok. See the illustration below.
If it will display any error, please take care of a proper configuration.
Get your own HTML template¶
Copying¶
Please copy the default HTML template of the +Browser Calendar to the fileadmin. Copy it on your own way.
This would be the command in the console.
wwwrun@s15315906:.../typo3> cp typo3conf/ext/browser/pi5/res/default.tmpl fileadmin/my_calendar.tmpl
If you are using another destination than fileadmin/my_calendar.tmpl, than you have to change the path in the TypoScript snippet below too.
Editing¶
Replace the strings
- "Your filter field" with "###TX_ORG_CAL.DATETIME###"
- "Your calendar item" with "###TX_ORG_CAL.TITLE###"
Please don't copy and paste the quotes!
Extend the Browser with +Browser Calendar¶
Extend it!¶
Please select the tab [Extend it!] of the Browser plugin. Follow the wizard of the tab.
Calendar 1. step: user interface¶
Please select "Browser Calendar: [+Browser Calendar]".
Calendar 2. step: view¶
Please select "Browser Calendar View: 1 (My Calendar)".
Calendar 3. step: field date begin¶
Please select [tx_org_cal.datetime]
Calendar 4. step: field date end¶
Please select [tx_org_cal.datetimeend]
See the result in the illustration below.
Select the HTML template¶
Please
- select in the tab [Templating]
- field "HTML": select [My Calendar (my_calendar)]
- save the plugin
Frontend¶
Tutorial +Browser Calendar II/II¶
Coloured calendar items¶
If you like to use different colours for each calendar item, every calender item has to wrapped with a defined style.
We have to extend the TypoScript like in the snippet below.
TypoScript¶
plugin.tx_browser_pi1 {
...
views {
list {
1 {
...
orderBy = tx_org_cal.datetime DESC
tx_org_cal {
title = TEXT
title {
value = ###TX_ORG_CAL.TITLE###
typolink {
parameter = ###SINGLEPID### - "linktosingle invert" "###TX_ORG_CAL.TITLE###"
additionalParams = &tx_browser_pi1[showUid]=###TX_ORG_CAL.UID###
}
wrap (
<div style="background:###CAL_COLOUR###;float:left;padding:0 .2em;">
|
</div>
)
}
}
filter {
...
Colours are defined in the array
plugin.tx_browser_pi1.flexform.pi5.sDEF.colours
Frontend¶
TypoScript snippets¶
Get the current day, if there isn't anything selected¶
plugin.tx_browser_pi1 {
...
views {
list {
1 {
select (
...
)
andWhere = COA
andWhere {
10 = TEXT
10 {
if {
isFalse {
data = GPvar:tx_browser_pi1|tx_org_cal.datetime
}
}
value = tx_org_cal.datetime >= UNIX_TIMESTAMP(CONCAT(CURDATE(),' 00:00:00'))
noTrimWrap = | | |
}
}
orderBy = tx_org_cal.datetime DESC
...
Get a fixed day, if there isn't anything selected¶
Get dates, which are beginning after midnight of 13th of June 2011
plugin.tx_browser_pi1 {
...
views {
list {
1 {
select (
...
)
andWhere = COA
andWhere {
10 = TEXT
10 {
if {
isFalse {
data = GPvar:tx_browser_pi1|tx_org_cal.datetime
}
}
value = tx_org_cal.datetime >= UNIX_TIMESTAMP('2011-06-13 00:00:00')
noTrimWrap = | | |
}
}
orderBy = tx_org_cal.datetime DESC
...
filter {
tx_org_cal {
datetime < plugin.tx_browser_pi1.displayList.master_templates.category_menu
datetime {
first_item = 0
area < plugin.tx_browser_pi1.displayList.master_templates.areas.sam ple_period
area {
interval {
case = day
day {
url_stdWrap {
strftime >
}
start_period {
stdWrap {
value = 13. June 2011
}
}
selected_period {
stdWrap {
value = 13. June 2011
}
}
}
}
}
...
Remove the Organiser¶
Extension manager¶
- Disable the extension Organiser
- Remove it
Install Tool¶
- Compare Database
- Remove all Organiser tables
Reference¶
Completely Browser Reference¶
Javascript¶
javascript¶
Property
javascript
Data type
array
Description
plugin.tx_browser_pi1 {
javascript {
jquery {
// [STRING] Path to jQuery
file = \
http://code.jquery.com/jquery-1.4.2.min.js
}
ajax {
// [STRING] JSS file with ajax methods
file = \
EXT:browser/res/js/tx_browser_pi1_ajax.js
// [STRING] JSS file with ajax language values
fileLL = \
EXT:browser/res/js/\
tx_browser_pi1_ajax_languages.js
html {
marker {
// [STRING / UPPERCASE] Class in \
// CHECKBOX, RADIOBUTTONS, SELECTBOX.
ajax_onchange = ONCHANGE
}
}
// [PAGE] page object
page = PAGE
page {
typeNum = 0
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
}
10 = CONTENT
10 {
table=tt_content
select{
// only use current page
pidInList = this
// only use current language
languageField=sys_language_uid
andWhere.cObject = COA
andWhere.cObject {
// choose all Browser plugins...
10 = TEXT
10.value = list_type = 'browser_pi1'
// if an UID is provided in the querystring,\
// choose only that plugin
20 = TEXT
20.data = GPvar:tx_browser_pi1|plugin
20.if.isTrue.data = \
GPvar:tx_browser_pi1|plugin
20.outerWrap = AND uid = |
}
}
}
}
}
general {
// [STRING] JSS file with general methods
file = EXT:browser/res/js/tx_browser_pi1.js
}
}
}
Default
Master Template¶
((Unknown Property))¶
Property
Data type
Description
Position of the master templates
plugin.tx_browser_pi1 {
displayList {
master_templates {
...
}
}
}
Default
master_templates¶
Property
master_templates
Data type
array-> local
Description
You can configure the AJAX behaviour for every filter (checkbox, radiobutton and selectbox). See the ajax_onchange property.
Master templates are drafts. The will be copied to the view. They should be configured in the copy only.
See the reference in the Browser manual. See section "local".
master_templates {
// Master template for a checkbox
checkbox = CHECKBOX
checkbox {
...
// [Boolean]: 1: If value is changing, AJAX
// will reload the form. 0: No auto reload.
ajax_onchange = 1
...
}
// Master template for radio buttons
radiobuttons = RADIOBUTTONS
...
// Master template for a selectbox
selectbox = SELECTBOX
...
}
Default
Helpful suggestions¶
If you have helpful suggestions, feel free to publish any question, bug or code snippet on
http://typo3-browser-forum.de/
Posts are welcome in English and German.
Change Log¶
3.9.14 Initial Release
Illustration Index¶
Illustration 1: The Browser Calendar in the TYPO3 frontend - here: day's schedule 3
Illustration 2: The +Browser Calendar plugin in the TYPO3 backend - here: day's schedule 4
Illustration 3: The TYPO3-Frontend-Engine Browser Forum 5
Illustration 4: Browser and Organiser 6
Illustration 5: Page tree 7
Illustration 6: Adding records to the event table 8
Illustration 7: Three sample event records 8
Illustration 8: Pasted TypoScript code in the field "Setup" 10
Illustration 9: Include static templates Browser and +Browser Calendar 10
Illustration 10: List view in the frontend 11
Illustration 11: the tab [Plugin check] of the plugin +Browser Calendar 11
Illustration 12: tab [Extend it!] of the plugin Browser 13
Illustration 13: The calendar in the frontend 14
Illustration 14: The calendar in the frontend with a small navigation 16
Illustration 15: Coloured calendar items 17
25