Top Banner
EXT: abcourses Extension Key: abcourses Copyright 2005-2008, Stefan Precht, <[email protected]> and Andreas Behrens, <[email protected]> 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: abcourses............................................1 Introduction....................................................................1 What does it do?........................................................1 About the developing..................................................2 Screen shots..............................................................2 Key-Features..................................................................4 Available content records.............................................4 Category.....................................................................4 Course........................................................................4 Course type................................................................5 Teaching aids.............................................................5 Trainer........................................................................5 Event..........................................................................5 Location......................................................................6 Category.....................................................................6 Hotel...........................................................................6 Arrangements.............................................................6 Available views..............................................................6 Categories overview...................................................6 Mini search-box..........................................................7 Search result list.........................................................7 Detail view..................................................................8 Subscribe view...........................................................8 Last minute short........................................................9 Last minute detailed...................................................9 Category overview and a listing of current events.....9 Overview of selected events....................................10 Detail search............................................................10 Overview of selected categories..............................10 Installation....................................................................10 You should start with this.........................................10 The TS configuration...................................................12 plugin.tx_abcourses_pi1 .........................................12 TS for “Category overview”......................................15 TS for “Courses in category”....................................15 TS for “Quicksearch”................................................15 TS for “Resultlist”.....................................................15 TS for view-type “Detail”...........................................16 TS for view-type “Subscribe”....................................16 TS for view-type “Category overview with next courses”....................................................................18 TS for view-type “Selected events”..........................18 Template structure of the different view-types........18 Template marker for records / general......................18 Generally available markers.....................................18 All category fields.....................................................21 All course fields........................................................21 All event fields..........................................................22 All trainer fields.........................................................23 All location fields.......................................................23 All page fields...........................................................23 All hotel fields...........................................................23 All arrangement fields..............................................23 All teaching aid fields................................................24 All conditions fields...................................................25 Special content............................................................25 The manual location selector...................................25 The subscription hook..............................................25 The displayDetail Hook............................................25 The fillAllLabels Hook...............................................25 How to change the subscription form......................25 What you should know about the email template....26 Known problems..........................................................28 To-Do list......................................................................28 Changelog.....................................................................28 Introduction What does it do? abcourses is an extension for offering your seminars, courses, or appointments in various ways. This extension aims to be compatible with the most requirements. So if you are looking for an extension to offer many courses and appointments, this extension is made for you. But if you need a solution which can be used right after installation (like p lug'n play) than this is EXT: abcourses - 1
27

Manual 150

May 30, 2018

Download

Documents

Joseph Smith
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 1/27

EXT: abcoursesExtension Key: abcourses

Copyright 2005-2008, Stefan Precht, <[email protected]> and Andreas Behrens, <[email protected]>

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 ContentsEXT: abcourses............................................1

Introduction....................................................................1What does it do?........................................................1About the developing..................................................2Screen shots..............................................................2

Key-Features..................................................................4Available content records.............................................4

Category.....................................................................4Course........................................................................4Course type................................................................5Teaching aids.............................................................5Trainer........................................................................5Event..........................................................................5Location......................................................................6Category.....................................................................6Hotel...........................................................................6Arrangements.............................................................6

Available views..............................................................6Categories overview...................................................6Mini search-box..........................................................7Search result list.........................................................7Detail view..................................................................8Subscribe view...........................................................8

Last minute short........................................................9Last minute detailed...................................................9Category overview and a listing of current events.....9Overview of selected events....................................10Detail search............................................................10Overview of selected categories..............................10

Installation....................................................................10You should start with this.........................................10

The TS configuration...................................................12

plugin.tx_abcourses_pi1 .........................................12TS for “Category overview”......................................15TS for “Courses in category”....................................15TS for “Quicksearch”................................................15TS for “Resultlist”.....................................................15TS for view-type “Detail”...........................................16TS for view-type “Subscribe”....................................16TS for view-type “Category overview with nextcourses”....................................................................18TS for view-type “Selected events”..........................18

Template structure of the different view-types........18Template marker for records / general......................18

Generally available markers.....................................18All category fields.....................................................21All course fields........................................................21All event fields..........................................................22All trainer fields.........................................................23All location fields.......................................................23All page fields...........................................................23All hotel fields...........................................................23All arrangement fields..............................................23All teaching aid fields................................................24All conditions fields...................................................25

Special content............................................................25The manual location selector...................................25The subscription hook..............................................25The displayDetail Hook............................................25The fillAllLabels Hook...............................................25How to change the subscription form......................25What you should know about the email template....26

Known problems..........................................................28To-Do list......................................................................28Changelog.....................................................................28

IntroductionWhat does it do?abcourses is an extension for offering your seminars, courses, or appointments in various ways. This extension aims to becompatible with the most requirements. So if you are looking for an extension to offer many courses and appointments, thisextension is made for you. But if you need a solution which can be used right after installation (like plug'n play) than this is

EXT: abcourses - 1

Page 2: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 2/27

the wrong one. Abcourse is really flexible and it takes you some time to get in to it.

About the developmentSYMPLASSON http://www.symplasson.de/ started the development of this extension in close collaboration with @b-networks http://www.ab-networks.de/ in 2005 to create a solution for offering different courses with several thousandappointments a year.

Since then, the development was continued along our customers requirements or our own ideas.

This extension is still under further development (if requested ;-) ) and is supported by Andreas Behrens (@b-networks;[email protected] , Lüneburg, Germany) as well as by Stefan Precht ([email protected] , Hamburg, Germany)

Many people supported this extension within the last years. Independent from if it were just ideas, debugging or anythingelse. Here we want to say “thanks” for supporting the development to:

– IBS Schreiber Gmbh ( http://www.ibs-hamburg.com )

– Tallence GmbH (http://www.tallence.com )

– Kanton Basel-Landschaft ( http:// www.baselland.ch )

– as well as to all the others ...

Screen shotsYou will find some more screen shots associated to the different views later in this documentation. These few screens are

just for a small overview.Important notice:

The information as displayed on this sample screens are only for demonstrating the possible look and feel of this extension.Description and content of courses are test-data, just like shown prices or other informations!

EXT: abcourses - 2

Abbildung 1: Sample view of course details

Page 3: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 3/27

EXT: abcourses - 3

Abbildung 3: Sample of a start screen. The input field is rendered

with the search-view, the colored boxes are rendered with thecategory overview. Other parts are normal text content elements.

Abbildung 2: Another detail view. Highlighted area on the right is rendered by the Last-Minute short overview

Page 4: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 4/27

Page 5: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 5/27

● educational points (just for information)

● days (just for information of the course duration)

● contingent (just as information about the max. amount of participants)

● conditions (text input)

● conditions (reference to other course records)

● price (with or without VAT must be configured in TS)

Course typeA course type represents the skill level in another way than the value “skill level” (attr. of course records). You can onlyenter a title of a course type.

Teaching aidsYou can only enter a title for this records. Teaching aids are associated to course records for information purposes.

TrainerThe data for trainer records are saved in tt_address records. This is the reason for the fact, that tt_address is required for the use of abcourses.

Please consider that only a few fields are used in the template for a trainer. These are:

● name

● title

● company

● image

● trainer number

● trainer position

The last two attributes come with abcourses and extends the tt_address table.

EventEvents are the records a user can subscribe to and are associated to one course record.

Available fields are:

● event number

● start-date for registration

● end-date for registration

● start-date and time of the first day

● end-date and time of the last day

● associated course (course 1 : n event)

● associated trainers

● subscribed participants ( this field is not in use currently. See also the To-Do section...)● associated location (1:n)

● discount flag (if the price for this single event should differ to the base price as entered in the course record)

● discount value (enter a positive double value for raise, and a negative value for reduce the base price)

● last-minute flag (if activated and supported by the corresponding templates, a special css class can be associatedto this event for highlighting this record in listings. Records marked as “last minute” are shown in last-minute viewsautomatically)

● contingent amount (if contingent management is activated, this value limits the possible amount of subscriptions)

● subscriptions (this value is increased with each subscription and will be compared with “contingent amount” if contingent management is activated)

● associated arrangements (to offer additional accommodations)

EXT: abcourses - 5

Page 6: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 6/27

LocationA location can be assigned to an event for informational purposes.

These attributes can be entered for location records:

● title

● street

● zip

● city

● phone

● fax

● email

● contact person

● informations (as reference to a page record with e.g. additional informations)

CategoryTo categorize your offered courses.

You can enter:

● title

● teaser

● image

HotelIf you want to offer additional accommodations you have to enter some hotels and arrangements.

For a hotel you can enter:

● name

● subtitle

● link

● image (e.g. a logo)

● rating (0 start, 1 star ...)

ArrangementsTo offer additional accommodations with an event you need to enter arrangements to assign them later with the events.

For this you can enter:

● backendname (as title in BE view)

● frontendname (as title in FE output)

● associated hotel (hotel 1 : n arrangements)

● price (if this is with or without VAT depends on the global tax configuration)

Please consider that there is not really an interface for subscribing an accommodation. It is only included in the confirmationemail.

Available viewsHere we described the available views as offered with this extension.

Categories overviewThis view represents two views in one. At least one PlugIn with this view-type is required for abcourses.

On one hand this view-type can list all available categories, and on the other hand it can list all courses for one specificcategory. It depends on an URL parameter which view-type will be rendered. With a flag available in the FlexForm of thePlugIn, you can force the view-type to ignore the URL parameter and list the categories all the time. For example this isnecessary if you have one page with two PlugIns of this view type and you want to show the courses of the category on theleft and an overview of other available categories on the right.

EXT: abcourses - 6

Page 7: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 7/27

The following two screens represents the “courses in this category” view.

Both views based internally completely on the abcourses object layer. It is up to you and depends on the used templatewhich information will be displayed. Read more about this later in the template section...

Mini search-boxThis view renders only an input field for a textual search. You have to configure the page id of the result page to make itwork... See one sample of this search-box at Abbildung 4

Search result listCome on, just guess what it does :-) Not to derive from the name: The search result list will get the parameters fromindexed_search input fields for look ups as well. So you can combine both plug ins on the same page...

EXT: abcourses - 7

Abbildung 4: Courses in one category 2

Abbildung 5: An example for two PlugIns with view-type category overview on one page

Page 8: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 8/27

Detail viewThe detail view can show all informations associated with a course. It depends on the template what will be displayed.Please consider that this view is not completely based on the abcourses object layer! Why? Because the extension grewwith the time and there was no object layer in the first version. So this is a relict from previous version. But although itcontains the full scope of operation. Refactoring of this function is already on our to do list... Maybe the template structurefor this view can change then.

Events will be only shown if it is possible to subscribe. As an exception you can configure the count of days events may beexpired. These expired events will be shown but there is no subscribe link rendered for them.

See screen shots of this view at Abbildung1 and Abbildung3 .

Subscribe viewThe user reaches the subscribe view automatically (because the default subscribe view is configured via TS), if he clicks onan event for which a subscription is possible. Depending on the template the subscribe view shows all informations aboutthe course, the event and all records which you can assign via the BE.

Depending on TS configuration and one more template snippet you can create a form for subscribing an event (includingserver side input validation). And if available, the user could request an accommodation as well!

After successful registration the user is redirected to a “thank you” side (a page record from you cms) and an email will besend to the admin as configured in TS (and optionally to the user). During the registration a hook is called which you canuse for whatever you want it to do...

You can even use this PlugIn for direct subscriptions. Just add it via TYPO3 BE and select an event in the BE! Please don'tdo this for the default subscription view as configured in TS.

EXT: abcourses - 8

Abbildung 6: Front-End subscribe form

Page 9: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 9/27

Read more about setup, hook and template later in this documentation.

Last minute shortDeprecated. Use the selectedEvents view.

This view was used for short listings of last minute events. Since you can use the “selectedEvents” view for this (sinceversion 1.3.X) it is not recommended to use this short view. Also an argument for this is, that the selectedEvents view usethe abcourses object layer. See the selectedEvents section of this document for further informations.

Last minute detailedDeprecated. Use the selectedEvents view.This view was used for short listings of last minute events. Since you can use the “selectedEvents” view for this (sinceversion 1.3.X) it is not recommended to use this short view. Also an argument for this is, that the selectedEvents view usethe abcourses object layer. See the selectedEvents section of this document for further informations.

Category overview and a listing of current eventsThis view-type is a special variant of the category listing and is able not only to list categories but also show an configurablenumber of courses, which the closest events are assigned to.

This is very useful for search engine optimization (for internal linking), because the page has (computed) different contentwhich does not rotate with each page view or something like this but with each time one event is no longer the “closest”event within a category.

EXT: abcourses - 9

Abbildung 7: BE FlexForm PlugIn configuration

Abbildung 8: Sample screen shot for this view type.

Page 10: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 10/27

Overview of selected eventsThis view is for displaying events without the selection of a special class and renders only special events. You can selectthis events manually or you can configure this view-type to display events which are marked as “last-minute”. For the last-minute layout you can set an amount of events you want to display as well.

The last-minute feature is implemented since version 1.3.X and displaces the both last-minute view-types. This is because itdepends only on the assigned template file if you make this view type as an short or a detailed overview of last-minuteevents.If there is more than one event selected (or computed) for one course, they get merged with this course during therendering process.

Detail searchI'm sorry, but this is not functional at the moment.

Overview of selected categoriesThis view is for displaying categories. But other than the normal categories overview, this view type only renders categorieswhich you have manually selected in the BE FlexForm. Within the FlexForm use the Tab “Special View Settings” and thanthe selection “Categories to be shown within the special view Selected-Categories”.

There are some TS settings for this view to change the output. See more about this in the TS section of this documentation.

InstallationThere are a few steps required to get the extension working with the min. features... This basic settings should be done in15Min. But it can become very time expensive depending on the variants of configuration possibilities you want to use. Asexample: Using different templates for the same view-type on different pages and so on...

You should start with thisMake a back-up of your environment (to play safe)

Create some Sys-Folder records where your content for this extension is stored later. Depending on the number of recordsyou want to deal with, it could be recommended to create a folder for each category (to store your events in)

I recommend a folder structure like this:

EXT: abcourses - 10

Abbildung 9: Example layout for this view-type with additional course and trainer informations.

Page 11: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 11/27

○ Seminars

○ Categories and Course-Types

○ Courses

○ Events

○ Hotels and Arrangements

○ Trainers, Locations and Teachin-Aid's

Create some page records for your front-end PlugIns.Depending on the TS configuration and some implemented link features you need at least pages for:

● a categories overview

● The result view of search queries (as not in menu)

● the course details (as not in menu)

● the subscribe view (as not in menu)

● a “thank you” page where subscribers are redirected after a successful subscription

Add the corresponding PlugIn view types for the pages as mentioned above on each page

Overwrite the extensions default TS as described later in this documentation.

And: Do not forget to define a storage page within the backend. The storage page is used as pid for tracked subscriptions!

IMPORTANT! Have a look that the locale settings are correct. There are two fields for this within the plugins TypoScript:locale and offset. See more about this in the TS configuration table of this documentation and within the TS Default templateas well.

That's it... Was easy, wasn't it? :-)

If you need help with your configuration:Since Version 1.3.3 there is a third Tab in the Plugins BE FlexForm called “config info”. Check the box on this tab and reloadthe page where you have problems... And configuration check will be rendered then! Sometimes this is very usefull and cansave you a lot of time...

The TS configurationGuess how funny it is to write this down... :-( But O.K., I am sure it would be no(!) fun for you without this... :-)

plugin.tx_abcourses_pi1This is the basic PlugIn configuration.

Property Data Type Description Default

CMD Number With this value you can define theview-type for a PlugIn. Normallythis is set via FlexForm, but if youwant to insert one abcoursesPlugIn via TS, you need to setthis...1:CATOVERVIEW2:QUICKSEARCH3:RESULTLIST4:DETAIL5:SUBSCRIBE6:LMSHORT (deprecated)7:LMDETAIL (deprecated)8:CATOVERVIEWWITHCOURSE9:SPECIALEVENTOVERVIEW

pidList String Comma separated list with pageid's. List of page id's where theabcourses records should beavailable. Normally this is set viaFlexForm, but if you want to insertone abcourses PlugIn via TS, youneed to set this...

recursive number How deep could the pages benested where to look upabcourses records.

2

EXT: abcourses - 11

Page 12: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 12/27

Page 13: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 13/27

usecontingent boolean Set this to 1 if you want to activatethe contingent management.Consider that it is only possible tosubscribe for an event then, if theevent has a contingent of at least1 left.

0

dlimage String Filepath to the default downloadicon.

/typo3conf/ext/abcourses/images/dl_icon.gif

dlimage_pdf String Filepath to the download icon of pdf files.

/typo3conf/ext/abcourses/images/pdf_icon.gif

dlimage_tif string - =< dlimage

dlimage_zip string - =< dlimage

redirectDetailPage number See inline TS comments for thisplease.

N.A.

redirectDetailPageId number - N.A.

redirectToDomain number - N.A.

addOnLabels string Comma separated. If you add avalue to this list and (lowercase)to the locallang.xml then it isavailable as a marker in everyview. The marker is uppercase.

addonlbl-membershipnr

trackSubscriptionsAsRecords int Set this to 0 to disable thesubscription tracking. Set this to 1and every subscription will betracked as tt_address record.

1 (On!)

addressRecordUniqueField string This value is for looking up similar subscribers. It must be anavailable name of your formfieldsas well as a valid name for att_address attribute field

email

beUserId int BE Userid to create thett_address records. This is just for association. Your TYPO will notchange its user context!

0

EXT: abcourses - 13

Page 14: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 14/27

Page 15: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 15/27

TS for view-type “Detail”In because of this view-type is currently not completely based on the object-model, some of the TS properties are notnested as like for other view-type's.

Template structure and TS configuration for this view will change during the implementation of the object model for thisview-type!

plugin.tx_abcourses_pi1.coursedetail

Property Data Type Description DefaultparseFunc ParseFunc / function Further informations in the TSRef <

plugin.tx_abcourses_pi1.parseFunc

showeventsago number If you would like to display expiredevents too, set this to anappropriate number of days anevent may have expired.

0

eventcols number The template for displaying theevents of a course is split up inrows and columns so this valuewill define how many cols a rowshould contain.

1

conditionalCourse To start a sub part Below this, you can note all

available Course fields. This willbe used to display the referencedconditional courses

Just 3 small examples

All course fields - See template section for this...

All category fields -

All trainer fields -

All event fields -

All location fields -

All page fields -

All conditions fields -

Please consider, that the rendered “Similar courses” uses the “All course fields” too, because they are just course recordsand depends, technically, on the same rendering function.

TS for view-type “Subscribe”This view-type is responsible for rendering generally informations for the corresponding event on the one hand, and for generating the accommodation- and subscribe-form on the other hand.

For the generally event informationsplugin.tx_abcourses_pi1.eventsubscribe

Property Data Type Description Default

parseFunc ParseFunc / function Further informations in the TSRef <plugin.tx_abcourses_pi1.parseFunc

All course fields - See template section for this...

All event fields -

All trainer fields -

All location fields -

All category fields

noContingentWrap stdWrap If no contingent is left for an event,and short information is renderedand wrapped with this...

All participant fields - See template section for this

EXT: abcourses - 15

Page 16: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 16/27

For the accommodation- and subscribe-formplugin.tx_abcourses_pi1.subscribe

Property Data Type Description Default

sendTo string Recipient E-Mail address for theadministrative subscription info E-Mail.

[email protected]

mailFrom string The From-Address of the info E-Mail.

[email protected]

mailFromName string The From-Name of the info E-Mail.

Seminar Database

usedLabels string Comma separated list of all(!)used form fields.

anrede,vorname,nachname,email,telefon,fax,firma,adresse,eventid,arrangement,invoiceaddress

required string This string list below causes thecorresponding form fields to berequired

vorname,nachname,email

mailLabels string Use this list to determine whichform fields will be included in theconfirmation email.

anrede,vorname,nachname,email,telefon,fax,firma,adresse,arrangement,invoiceaddress

sendEmailsAfterSubscription boolean Setting this flag to 0 causes noconfirmation e-mail is sent at all.

1

sendConfirmation boolean Set this flag to 1 if you want your subscriber to get a confirmationmail too.Otherwise only the Admin willreceive a confirmation.This does not take an effect if theflag sendEmailsAfterSubscriptionis set to 0.The form field “email” is used for the E-Mail address of thesubscriber.

0

tt_address_mapping string Here you can map your form fieldswith the corresponding tt_address

entities.

first_name:vorname,last_name:nachname,email:email,gender:gende

r manlocselname string See more about this in the

“Special content” section.This value is rendered as nameattribute for the location selectbox.

wunschstandort

manlocselparams string Additionally parameters for theselect box.

class="mf-input"

manlocselvalues string The available options for theselect box. If you prefix this listwith a single “,”, the first value isrendered as an empty option.

,Hamburg,Hannover,Kassel,Berlin,Potsdam/Kleinmachnow,Stuttgart,Leipzig,Frankfurt,München,Regensburg,Nürnberg,Paderborn,Dortmund,Siegen,Wien

accommodationPeriod integer Possible period for accommodation, depending on thestart and enddate of thecorresponding event.

2

hotel All hotel fields... Take a look at the templatemarker section for this

arrangement All arrangement fields... -

EXT: abcourses - 16

Page 17: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 17/27

TS for view-type “Category overview with next courses”For this type of category overview you can display the next events and their courses too. This view type is really useful for SEO efforts because this list change every time an event is not the closest event for a category any more. So you cancreate a nice view with different internally links.

plugin.tx_abcourses_pi1.catoverviewwithnextevents

Property Data Type Description Default

All category fields... -nextevents Integer Number of closest

events in ancategory whichshould be rendered.

3

course All course fields...

course.event All event fields...

TS for view-type “Selected events”This view can represent a list of manually selected events and their corresponding courses as well as an computed list of events / courses which are marked as “last minute”.

Which variant this view stands for is normally selected via the FlexForm configuration of the PlugIn in the BackEnd. But if you want to insert this with TypoScript you must do this settings via TS too.

plugin.tx_abcourses_pi1.selectedevents

Property Data Type Description Default

cols Integer The template is divided in rowsand columns so this value setsthe number of columns renderedfor each row.

2

asLastMinuteView Boolean Set this to 1 if you want this viewto work as a last minute view.

N.A. (uncomment this line if youwant to use it)

maxNEvents Integer Number of closest last-minuteevents which should be rendered.

N.A. (uncomment this line if youwant to use it)

selectedEvents String Comma separated list of eventid's. You will need this if you wantto insert this view-type via TS butnot as last minute view.

N.A. (uncomment this line if youwant to use it)

showEventsAgo Integer This is ONLY available via TS atpresent. If you want to displayexpired events to, set this to thenumber of days an event can beexpired.

N.A. (uncomment this line if youwant to use it)

course All fields for courses... -

course.event All event fields... -

course.trainer All trainer fields... -

Template structure of the different view-typesThis extension is shipped with a default template. Please take a look at this default templates to get an overview of thecorresponding template structure for the view-type you want to edit...!

Template marker for records / generalGenerally available markersThe template marker as listed below can be used in every template! They are primarily intended to be used as labels.

Marker Usage TS Wrapper TS Description

###DAYSLABEL### Label for the “day” field in courses

EXT: abcourses - 17

Page 18: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 18/27

###LABELWARNING### This has content if some requiredform fields of the subscribe formare missed.

###WARNING### This has content if some requiredform fields of the subscribe formare missed.

###LABELTRAINER### Label for trainer records.

###LABELTITLE### In forms for form of address

###LABELTITLE.I.0### (.1, .2) This marker is comupteddepending on the availabletranslations in the locallang file.You can add there more valuesfor this like I.0, I.1, I.2 ...

###LABELADDITIONAL###

###LABELADDITIONAL.I.0###(.1...)

This marker is comupteddepending on the availabletranslations in the locallang file.You can add there more valuesfor this like I.0, I.1, I.2 ...

###LABELSELPERIODSTART###

Label of the select box for accommodation start period

###LABELSELPERIODEND### Label of the select box for accommodation end period

###LABELACCOMMODATION###

Label for accommodation records.

###LABELCOURSEDAYS### Label for the days value asentered in a course record.

###LABELSUBMIT### The text on the “send” button of the search form.

###LABELSUBMITSUBSCRIBE###

The label on the submit button ascontained in the subcribe view.

###LABELSUBSCRIBEHEADER###

Informational header of thesubscribe view.

###LABELNAME###

###LABELLASTNAME######LABELCOMPANY###

###LABELADDRESS###

###LABELINVOICEADDRESS###

###LABELEMAIL###

###LABELPHONE###

###TAXLABEL### As used for price information.

###LABELARRANGEMENTSDESC###

Label for the description of arrangements.

###CUR### Currency as entered in TS. For price informations.

###LABELTEACHINGAIDS###

###LABELSIMILAR### Label for listings of similar courses.

###LABELPAGES### Label for pages with further informations as assigned to acourse record.

###LABELPOINTS###

###LABELEVENT###

###LABELNOEVENTS###

###LABELEVENTTITLE###

###LABELCATOVERVIEW###

###LABELDATE######LABELPRICE###

###LABELPARTICIPIANTS###

EXT: abcourses - 18

Page 19: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 19/27

###LABELREGSTART### Label for information about thestart date of a registration period.

###LABELREGEND###

###LABELCOURSENUMBER###

###EDUPOINTSLABEL###

###CONDITIONSLABEL### A label to introduce the conditionsof a course.

###LABELNORESULTS######LABELERRORCONTACTUS###

###LINKCATOVERVIEW### This will render a link to thedefault PlugIn (as defined via TS)which contains a categoryoverview.

###LINKDETAILSEARCH### This will render a link to thedefault PlugIn which contains adetail search. (not in use!)

###LINKLMOVERVIEWSTART###

This will return only the <ahref=”xxx”> part of a link to thedefault PlugIn (as defined via TS)with a LastMinute overview.

###LINKLMOVERVIEWEND### Will return the </a> for theprevious marker.

###LINKLMOVERVIEW### Whole link to the last minute view.

###LABELLOCNAME### Location name

###LABELLOCSTREET###

###LABELLOCZIP###

###LABELLOCCITY###

###LABELLOCPHONE###

###LABELLOCFAX###

###LABELLOCEMAIL###

###LABELLOCPERSON###

###REQUIREDHINT### To mark something as “required”

###LBLMSHORTTITLE### Label Last Minute short title byexample for usage as headline.

###LBLMOVERVIEWTITLE### Label last minute overview byexample for usage as headline

###LABELLOCATIONINFO###

###LABELBACKTOCOURSE###

###LABELMAX### Max participants label

###LABELCOURSETYPE###

###LABELHEADERSEARCHRESULTS###

There is a hook which you can use to change this markers... See more about this in the “hooks” section of thisdocumentation.

EXT: abcourses - 19

Page 20: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 20/27

Example for labeladditional<div class="additionaly">

###LABELADDITIONAL###<br /><select name="Raucherzimmer">

<option select="selected">###LABELADDITIONAL.I.0###</option><option>###LABELADDITIONAL.I.1###</option><option>###LABELADDITIONAL.I.2###</option>

</select></div>

Example for labeltitle<div class="form-label">

<label for="Anrede">###LABELTITLE###</label></div><select name="Anrede">

<option select="selected">###LABELTITLE.I.0###</option><option>###LABELTITLE.I.1###</option><option>###LABELTITLE.I.2###</option>

</select>

All category fields

Marker Usage TS Wrapper TS Description- For rendering of later values. parseFunc parseFunc/function

###CATTITLELINK### Title of the category. Linked to the“courses in category” overview.

catTitleLinkWrap stdWrap/function

###CATIMAGE### Icon for a category. catImageWrap IMAGE/cObj

###CATTITLE### Same as above, but without thelink.

catTitleWrap

###CATTEASER### Teaser for a category. catTeaserWrap < parseFuncThere is a template subpart ###NOCOURSES### for categories which tried to list their courses. This is only implementedwithin the Category object an may not be available in all kinds of view types.

All course fields

Marker Usage TS Wrapper TS Description

- For rendering of later values. parseFunc parseFunc/function

###COURSEUID### - -

###NUMBER### Course number courseNumberWrap stdWrap/function

###TITLE### title courseTitleWrap stdWrap/function

###SUBTITLE### subtitle courseSubtitleWrap stdWrap/function

###TEASER### ... courseTeaserWrap < parseFunc

###DESCRIPTION### ... courseDescriptionWrap < parseFunc

###EDUPOINTS### ... courseEdupointsWrap stdWrap/function

###CONTINGENT### ... courseContingentWrap stdWrap/function###DAYS### ... courseDaysWrap stdWrap/function

###DAYSLABEL### Days label. Singular/Pluraldepending on days.

courseDayslabelWrap stdWrap/function

###CONDITIONSTEXT### The textual entered courseconditions

courseConditionWrap stdWrap/function

<--###CONDITIONS### begin--> This starts a template subpart torender referenced conditionalcourses. Please take a look intothe default template to get anexample.

<--###FILES### begin --> This starts a template subpart torender referenced files. Find anexample within the defaulttemplate.

###DETAILLINK### Link to the detail view courseDetaillinkWrap stdWrap/function

###TITLELINK### Title of the course as link to thedetail view

courseTitlelinkWrap stdWrap/function

EXT: abcourses - 20

Page 21: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 21/27

Page 22: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 22/27

###LASTMINUTE### If the event is marked as lastminute, this marker is filled withthe css class as configured in thebasic PlugIn TS.

- -

Example for the usage of the sub template “Locations”:<!-- ###EVENT### begin -->

<div class="event ###LASTMINUTE###">###DATE### - ###PRICE######CUR### (###PRICETAX######CUR### ###TAXLABEL###)<br />###SUBSCRIBELINK###

</div><!-- ###LOCATIONS### begin -->

<!-- ###LOCATION### begin -->###LOCCITY###

<!-- ###LOCATION### end --><!-- ###LOCATIONS### end -->

<!-- ###EVENT### end -->

All trainer fields

Marker Usage TS Wrapper TS Description

###TRAINERTITLE### The title as entered in thett_address record.

trainerTitleWrap stdWrap/function

###FULLNAME### Full name trainerFullnameWrap stdWrap/function###TRAINERCOMPANY### Company trainerCompanyWrap stdWrap/function

###TRAINERIMAGE### Image if uploaded trainerImageWrap COBJ / IMAGE

###TRAINERNUMBER### Trainer number - -

###TRAINERPOSITION### Trainer position - -

All location fields

Marker Usage TS Wrapper TS Description

###LOCNAME### Name of the location. locationNameWrap stdWrap/function

###LOCSTREET### Street locationStreetWrap stdWrap/function###LOCZIP### Zipcode locationZipWrap stdWrap/function

###LOCCITY### City locationCityWrap stdWrap/function

###LOCPHONE### Phone locationPhoneWrap stdWrap/function

###LOCFAX### Facsimile number locationFaxWrap stdWrap/function

###LOCEMAIL### E-Mail address of a contactperson

locationEmailWrap stdWrap/function

###LOCPERSON### Name of a contact person locationPersonWrap stdWrap/function

All page fieldsMarker Usage TS Wrapper TS Description

###PAGETITLE### The title of a page assigned to acourse.

pageTitleWrap StdWrap / function

###PAGESUBTITLE### The subtitle of a page assigned toa course.

pageSubtitleWrap StdWrap / function

###PAGELINK### The title of a page assigned to acourse. Rendered as link to thispage.

pageLinkWrap StdWrap / function

All hotel fields

Marker Usage TS Wrapper TS Description

<!-- ###ARRANGEMENTS### --> If this subtemplate is available andif there are initializedarrangements for this hotel, therendering of the arrangements istriggered as well.

- -

###NAME### The name of this hotel record. - -

EXT: abcourses - 22

Page 23: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 23/27

Page 24: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 24/27

All conditions fieldsIn this case conditions are course records which contains recommended previous knowledge. You can integrate them onlyin the detail view of a course record at the moment. This is because the support for of them is currently not assumed in theobject model.

Marker Usage TS Wrapper TS Description

###TITLE### Course title conditionsTitleWrap stdWrap/function

###SUBTITLE### Course subtitle conditionsSubtitleWrap stdWrap/function

###DETAILLINK### Course detail link conditionsLinkWrap stdWrap/function

All participant fieldsThese are the available fields for tracked participants. You can create create participant records manually as well. They willonly automatically created if you have activated and configured this feature.

Marker Usage TS Wrapper TS Description

###TITLE### Corresponding record field titleWrap stdWrap/function

###FULLNAME### Corresponding record field fullnameWrap stdWrap/function

###COMPANY### Corresponding record field companyWrap stdWrap/function

###GENDER### Corresponding record field genderWrap stdWrap/function

###FIRST_NAME### Corresponding record field firstNameWrap stdWrap/function###MIDDLE_NAME### Corresponding record field middleNameWrap stdWrap/function

###LAST_NAME### Corresponding record field lastNameWrap stdWrap/function

###EMAIL### Corresponding record field emailWrap stdWrap/function

###PHONE### Corresponding record field phoneWrap stdWrap/function

###MOBILE### Corresponding record field mobileWrap stdWrap/function

###CITY### Corresponding record field cityWrap stdWrap/function

###ZIP### Corresponding record field zipWrap stdWrap/function

Special contentThe manual location selectorComing soon...

The subscription hook Pre-subscription hook. The variable $hookAbort is passed into the expected method. If you implement this as an referencein your hook handler, you can abort the subscription an the user will get an error message...

if (is_array ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'subscription' ])) {foreach ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'subscription' ] as $classRef ) {

$hookObj = &t3lib_div::getUserObj( $classRef ); if (method_exists( $hookObj , 'startSubscription' )) {

$hookObj ->startSubscription( $MA, $MACourse , $MAEvent , $MATrainer , $MALocation , $hookAbort , $this );

}}}

The parameters prefixed with $MA are associative marker arrays for template substitutions. $this is the PHP commonreference to the current object. In this case, the pi1 class instance.

The displayDetail Hook This hook is called just before the output of the displayDetail Method renders the detailed View of an course. That is thehook:if (is_array ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'displayDetail' ])){

foreach ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'displayDetail' ] as $classRef ){$hookObj = &t3lib_div::getUserObj( $classRef );

if (method_exists( $hookObj , 'customDisplayDetail' )) {$hookObj ->customDisplayDetail( $sRet , $MACourse );

} }}

Your method customDisplayDetail MUST receive the parameter as Reference to take an effect!!!

EXT: abcourses - 24

Page 25: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 25/27

The fillAllLabels Hook This hook is called just before the method fillAllLabels returns. The method fills an array with general markers and is usedfor substitution before the output of each view type! So you can use this hook to add different labels.

Thats the hook:if (is_array ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'fillAllLabels' ])) {

foreach ( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXTCONF' ][ $this ->extKey][ $this ->prefixId][ 'fillAllLabels' ] as $classRef ){$hookObj = &t3lib_div::getUserObj( $classRef );

if (method_exists( $hookObj , 'customFillAllLabels' )) {

$hookObj ->customFillAllLabels( $MA);}}

}

How to change the subscription formDue to the fact that a submitted subscription form is not stored in any way by this extension currently, you can add as manyfields as you want. If you want the submitted data to be stored anywhere, you can use the subscription hook for this. Of course, that means you have to do some coding.

However, add some fields to the subscription form does not require any coding skills.

Here an example. Expecting you have a form-template with input fields for firstname, surname and email, the templatewould look like this:

<!-- ###SUBSCRIBEFORMTMPL### begin -->

<h2>###LABELSUBSCRIBEHEADER###</h2>###LABELWARNING######WARNING###<form action="###PATHSUBSCRIBE###" method="POST">

The next 3 lines are the input fields!

###LABELNAME### <input type="text" name="vorname" value="###VORNAME###"/><br />###LABELLASTNAME### <input type="text" name="nachname" value="###NACHNAME###"/><br />###LABELEMAIL### <input type="text" name="email" value="###EMAIL###"/> <br />

<input type="hidden" name="subscribe" value="1" /><input type="hidden" name="eventid" value="###EVENTID###" /><br /><input type="submit" value="###LABELSUBMITSUBSCRIBE###" />

</form>

<!-- ###NOSUBSCRIBEFORMTMPL### begin -->###LABELERRORCONTACTUS###<br>###LINKCATOVERVIEW###<br>###LINKDETAILSEARCH###

<!-- ###NOSUBSCRIBEFORMTMPL### end --><!-- ###SUBSCRIBEFORMTMPL### end -->

And now, we want to add an required input field where the subscriber should enter the name of the company he is workingfor. We call the input field “company”.

For a new Input field we can:

● create a new localized template marker for the label of the field as shown on the rendered subscribing form

● create a new localization for the rendered mails

● define the new field as “required” input

● suppress or show the field in the generated mail

Especially the last point is usefull if you integrate some hidden form fields which may be required within your subscriptionhook.

At first, you add one line in the template of you form:

<input type="text" name="company"/><br />But now you have only an input field. You want to have a localized label as well. So you add a marker for the label:

###ADDONLBL-COMPANY### <input type="text" name="company"/><br />

Now, add “addonlbl-company” to the comma separated list of the plugins TS configuration. This is explained above in thesection “TS Configuration”. And of course, add one line to the pi1's locallang.xml file. Use the key “addonlbl-company” for the index attribute of the new line in the XML file. Do not forget: f you update abcourses later, make a backup of youlocallang.xml to play save!

We want the new form field to be stikky. That means, that the input of the field is not deleted if the subscriber returns to thesubscribing form in case of a failed form validation. So, add the “value” attribute to the new form field and insert a marker.The marker must be the uppercase “name” attribute of the form field, but with 3 # prefixed and post-positioned.

###ADDONLBL-COMPANY### <input type="text" name="company" value=”###COMPANY###”/><br />

EXT: abcourses - 25

Page 26: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 26/27

The first step is done now. You have a new line in your form, made it stikky, added a label and localized it. Great ;-)

But what is about the “required” setting as mentioned above? And where to find the visibility settings? Go back to the TSConfiguration and you will find some description for the template marker: usedLabels, required, mailLabels.

For our example setup it should look like this:

# ALL fields of the form must be listed here!!!usedLabels = vorname, nachname, email, subscribe, eventid, company

# Here you list all fields that you wants to be reuired!!!required = email, company

# And last but not least: list all labels that you wants to appear within the sent mails.mailLabels = vorname, nachname, email, company

One more hint! The name of the field “email” is automatically validated as an email address and will be used as the sendTorecipient for the customers confirmation email.

Thats it! I hope this quick overview was usefull for you.

What you should know about the email templateWithin the email template you will find a marker ###FORMDATA###.

This marker will be replaced by the _POST variables of the subscription form. For each key>value pair their will be one newline rendered.

Please note that you have to define the values, which you want to be included in this listing, within the TS setup variable“mailLabels”.

By example: The _POST variable “company” will be rendered like this:

Company : XYZ AG

But where comes the “Company” from? Abcourses tries to look up every POST key in the locallang.xml. If you added therea line with “company” as index, you can localize the form field labels for the mail template.

If abcourses do not found a localization, it uses the key of the field as label with an upper cased first letter.

Please consider that you should not choose key names which already exists in the locallang.xml!

EXT: abcourses - 26

Page 27: Manual 150

8/14/2019 Manual 150

http://slidepdf.com/reader/full/manual-150 27/27

Known problems – If you do not use static url's and your mini search box uses “GET” as method, the values may be not submitted

correctly. This is not due to abcourses but rather a generally booby trap with forms, when they have already an getparameter in their relative action path.

– Some querys are incompatible with the dbal extension because dbal fails while translating some join querys.

– If you encounter a difference between the start/end time you have entered for an event in the back end and therendered value in the front end, take notice of the setting “offset” as described within the TS section of thisdocumentation. This is necessary due to the fact, that the timestamp for field of TCA type “time” are not really a UTC+/-0 values as the fields of the type “date”.

– Please report all bugs you may encounter!!!

To-Do list – Refactoring of the course-details view-type using completely the integrated object model. During this the template

structure for this view as well as the TS structure will change. But do not panic, I will write down further informationsabout the changes then!

– Refactoring of the subscribe view-type using completely the integrated object model. During this the template structurefor this view as well as the TS structure will change. But do not panic, I will write down further informations about thechanges then!

Do you have any special requirements? Do you need hooks on different places or need any special feature what could benice for others too? Just write an E-Mail and vote for it.

Currently on the “wishlist”:

– A generated form for requests to an event or course.

– Language overlays for the available content types.

– Different date formats for start- and end-date of an event.

– Assignment between courses and categories n:m

– ...

Currently just an idea:

– Automated front-end user and group creation for offering course specific informations to the subscribers (Downloads,FAQ's, Podcasts, Forum like features for asking the trainer and so on...)

– ...

ChangelogPlease take a look at the corresponding ChangeLog file in the extensions folder for this.