Manual 150

  • Uploaded by: Joseph Smith
  • 0
  • 0
  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Manual 150 as PDF for free.

More details

  • Words: 8,154
  • Pages: 27
EXT: abcourses Extension Key: abcourses Copyright 2005-2008, Stefan Precht, <[email protected]> and Andreas Behrens, 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 plug'n play) than this is EXT: abcourses - 1

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

About the development SYMPLASSON http://www.symplasson.de/ started the development of this extension in close collaboration with @bnetworks http://www.ab-networks.de/ in 2005 to create a solution for offering different courses with several thousand appointments 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 anything else. 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 shots You 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!

Abbildung 1: Sample view of course details

EXT: abcourses - 2

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

Abbildung 3: Sample of a start screen. The input field is rendered with the search-view, the colored boxes are rendered with the category overview. Other parts are normal text content elements.

EXT: abcourses - 3

Key-Features By combining the different views on an page, you have various possibilities to advertise your offered courses. In the list below you will find some of the features not necessarily to derive from the available views. ●

content types for categories, courses, course types, events, trainers, skill level, teaching aids, accommodations, arrangements for accommodation and locations



10 different view-type's available



each view is completely template based and it is up to you on which standard you want to implement them (HTML ||XHTML)



the search plug-in can be combined with the result page of the indexed_search (both catch the param. “sword”)



calculated prices can be shown with or without VAT, based on configurable input type and VAT value (the opposite value is then computed)



subscribing to events generates template based confirmation e-mails to a defined recipient and, if activated, to the subscriber



there is a hook implemented during subscribing process with references to the pi1 of abcourses an the used proxy class. So it is possible to interface an external application



you can switch on a contingent management for limiting the number of subscriptions to a certain number (for each event)



internally usage of a proxy class



to configure abcourses you can make some settings about a flex form but the most important values are configurable with TS too



you can use the flex form configuration to assign each abcourses PlugIn on the same page with different template files



configurable output format of shown dates and time



there is a special feature to look up the changed URL of the detail-view. Just in case your page works with realurl and you moved the page where your detail-view PlugIn is on. (useful for SEO efforts)



you can enter a date value (start / stop) for each event, if you want to limit the registration to a specific date range



there is a documentation available in the BE for the most important input values



server side input validation of the subscribing form as configured via TS

Available content records In this chapter I want to introduce the available records coming with the installation of abcourses and their possible attributes.

Category Courses are associated with categories. For a category you can enter a title, a description and you can upload an image for representing the category.

Course For a course you can enter the following: ●

number



title



subtitle



associate a category (category 1 : n courses)



associate a type (type 1 : n courses)



associate teaching aids (teaching aids n : m courses)



teaser



description



associate pages with e.g. further informations



upload files as an associated download for a course (max. 5)



associate trainers (n : m)



skill level (represented with a small icon) EXT: abcourses - 4



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 type A course type represents the skill level in another way than the value “skill level” (attr. of course records). You can only enter a title of a course type.

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

Trainer The 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.

Event Events 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 associated to this event for highlighting this record in listings. Records marked as “last minute” are shown in last-minute views automatically)



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

Location A 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)

Category To categorize your offered courses. You can enter: ●

title



teaser



image

Hotel If 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 ...)

Arrangements To 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 confirmation email.

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

Categories overview This 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 specific category. It depends on an URL parameter which view-type will be rendered. With a flag available in the FlexForm of the PlugIn, you can force the view-type to ignore the URL parameter and list the categories all the time. For example this is necessary if you have one page with two PlugIns of this view type and you want to show the courses of the category on the left and an overview of other available categories on the right. EXT: abcourses - 6

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

Abbildung 4: Courses in one category 2

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

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

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

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

EXT: abcourses - 7

Detail view The 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 grew with the time and there was no object layer in the first version. So this is a relict from previous version. But although it contains the full scope of operation. Refactoring of this function is already on our to do list... Maybe the template structure for 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 be expired. 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 view The user reaches the subscribe view automatically (because the default subscribe view is configured via TS), if he clicks on an event for which a subscription is possible. Depending on the template the subscribe view shows all informations about the 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 (including server 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 be send to the admin as configured in TS (and optionally to the user). During the registration a hook is called which you can use 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't do this for the default subscription view as configured in TS.

Abbildung 6: Front-End subscribe form

EXT: abcourses - 8

Abbildung 7: BE FlexForm PlugIn configuration

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

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

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

Category overview and a listing of current events This view-type is a special variant of the category listing and is able not only to list categories but also show an configurable number 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 content which 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.

Abbildung 8: Sample screen shot for this view type. EXT: abcourses - 9

Overview of selected events This view is for displaying events without the selection of a special class and renders only special events. You can select this events manually or you can configure this view-type to display events which are marked as “last-minute”. For the lastminute 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 it depends only on the assigned template file if you make this view type as an short or a detailed overview of last-minute events. If there is more than one event selected (or computed) for one course, they get merged with this course during the rendering process.

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

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

Overview of selected categories This view is for displaying categories. But other than the normal categories overview, this view type only renders categories which you have manually selected in the BE FlexForm. Within the FlexForm use the Tab “Special View Settings” and than the 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.

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

You should start with this Make 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 records you 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



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 template as 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 reload the page where you have problems... And configuration check will be rendered then! Sometimes this is very usefull and can save you a lot of time...

The TS configuration Guess 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_pi1 This is the basic PlugIn configuration. Property

Data Type

Description

CMD

Number

With this value you can define the view-type for a PlugIn. Normally this is set via FlexForm, but if you want to insert one abcourses PlugIn via TS, you need to set this... 1:CATOVERVIEW 2:QUICKSEARCH 3:RESULTLIST 4:DETAIL 5:SUBSCRIBE 6:LMSHORT (deprecated) 7:LMDETAIL (deprecated) 8:CATOVERVIEWWITHCOURSE 9:SPECIALEVENTOVERVIEW

pidList

String

Comma separated list with page id's. List of page id's where the abcourses records should be available. Normally this is set via FlexForm, but if you want to insert one abcourses PlugIn via TS, you need to set this...

recursive

number

How deep could the pages be nested where to look up abcourses records.

Default

2

EXT: abcourses - 11

template

string

Filepath to your template file, starting at the root.

typo3conf/ext/abcourses/pi1/abco urses_template.tmpl

uploaddir

string

Don't change this...

uploads/tx_abcourses/

skillimagepath

string

Where to look up the skill images. It is up to you to change them.

typo3conf/ext/abcourses/

ratingimagepath

string

Where to look up the hotel-rating images. It is up to you to change them.

typo3conf/ext/abcourses/images/

parseFunc

parseFunc

Take a look at the TSRef for further information

tt_content.text.20.parseFunc

pidResults

page_id

The id of the page which contains the default abcourses plugin with view-type 3 “Resultlist”.

pidCourseDetails

page_id

The id of the page which contains the default abcourses plugin with view-type 4 “Detail”.

pidOverview

page_id

The id of the page which contains the default abcourses plugin with view-type 1 “Catoverview”.

pidLMOverview

page_id

This is used to render some links. Since the LM-Overview is deprecated this should be set to a page id which contains a corresponding PlugIn of view type 9.

pidSubscribe

page_id

The id of the page which contains the default abcourses plugin with view-type 5 “Subscribe”.

pidSubscribeSuccess

page_id

This is the id of the page the subscribers are redirected to after an successful subscription. It is up to you what this page contains. I consider something like a “thanks for your subscription” to be in order.

pidDetailSearch

page_id

This is actually not in use.

ddmmyy

string

Format of the date output as used %d.%m.%Y by PHP's strftime function. See http://de.php.net/manual/de/functio n.strftime.php for reference.

hhmmss

string

Format of the date output as used %H:%M by PHP's strftime function. See http://de.php.net/manual/de/functio n.strftime.php for reference. This is used for time output format.

locale

string

Set this to your locale.

de_DE

offset

integer

Is there a difference between the time as entered within the BE and the time as shown in the FE? So use this to adjust them. Read more about this later in this documentation.

-60

priceWithTax

boolean

Set this to 1 if your entered prices 0 are already with VAT. Set this to 0 if they are without VAT.

taxValue

number

Tax value

19

currency

String

Abbrev. of the used currency

EUR

lastminuteclass

string

Additional css class name as used in event listings for last minute events. (usage depends on the template)

lastminute

searchcoursefields

string

Where the text query should look up.

tx_abcourses_course.uid-titleteaser

sortingfieldcoursesincat

String

Name of the DB attribute of a name course for sorting the course list in category overviews.

EXT: abcourses - 12

usecontingent

boolean

Set this to 1 if you want to activate 0 the contingent management. Consider that it is only possible to subscribe for an event then, if the event has a contingent of at least 1 left.

dlimage

String

Filepath to the default download icon.

/ typo3conf/ext/abcourses/images/d l_icon.gif

dlimage_pdf

String

Filepath to the download icon of pdf files.

/ typo3conf/ext/abcourses/images/p df_icon.gif

dlimage_tif

string

-

=< dlimage

dlimage_zip

string

-

=< dlimage

redirectDetailPage

number

See inline TS comments for this please.

N.A.

redirectDetailPageId

number

-

N.A.

redirectToDomain

number

-

N.A.

addOnLabels

string

Comma separated. If you add a value to this list and (lowercase) to the locallang.xml then it is available as a marker in every view. The marker is uppercase.

addonlbl-membershipnr

trackSubscriptionsAsRecords

int

Set this to 0 to disable the 1 (On!) subscription tracking. Set this to 1 and every subscription will be tracked as tt_address record.

addressRecordUniqueField

string

This value is for looking up similar email subscribers. It must be an available name of your formfields as well as a valid name for a tt_address attribute field

beUserId

int

BE Userid to create the 0 tt_address records. This is just for association. Your TYPO will not change its user context!

EXT: abcourses - 13

TS for “Category overview” plugin.tx_abcourses_pi1.catoverview Description

Default

parseFunc

Property

ParseFunc / function

Data Type

Further informations in the TSRef

< plugin.tx_abcourses_pi1.parseFun c

catImage

IMAGE / cObj

Preconfiguration for rendered images.

wrap = |

cols

Number

The template of this view is 2 splitted in colums and rows. This value indicates how many cols will be rendered for each row.

All category fields

...

Additionally you can configure all TS values as available for categories here. You will find more about this in the documentation of the template markers for categories.

TS for “Courses in category” plugin.tx_abcourses_pi1.coursesincat

Property

Data Type

Description

Default < plugin.tx_abcourses_pi1.parseFun c

parseFunc

ParseFunc / function

Further informations in the TSRef

initevents

boolean

Set this to 1, if you want to display 0 events in this view too. If you do not set this flag, the events are not available for the course instances and so they will not be rendered! Keep in mind that this query may be expensive...

category

All category fields

Additionally you can configure all TS values as available for categories here. You will find more about this in the documentation of the template markers for categories.

category.course

All course fields

Additionally you can configure all TS values as available for courses here. You will find more about this in the documentation of the template markers for courses.

category.course.event

All events fields

See template section for this...

TS for “Quicksearch” Actually there is no configuration required for this view.

TS for “Resultlist” plugin.tx_abcourses_pi1.resultlist

Property

Data Type

Description

Default < plugin.tx_abcourses_pi1.parseFun c

parseFunc

ParseFunc / function

Further informations in the TSRef

course

All course fields

See template section for this...

EXT: abcourses - 14

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 not nested 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 this view-type!

plugin.tx_abcourses_pi1.coursedetail Description

Default

parseFunc

Property

ParseFunc / function

Data Type

Further informations in the TSRef

< plugin.tx_abcourses_pi1.parseFun c

showeventsago

number

If you would like to display expired 0 events too, set this to an appropriate number of days an event may have expired.

eventcols

number

The template for displaying the events of a course is split up in rows and columns so this value will define how many cols a row should contain.

1

conditionalCourse

To start a sub part

Below this, you can note all available Course fields. This will be used to display the referenced conditional 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 records and 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 informations plugin.tx_abcourses_pi1.eventsubscribe Property

Data Type

Description

Default < plugin.tx_abcourses_pi1.parseFun c

parseFunc

ParseFunc / function

Further informations in the TSRef

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 rendered and wrapped with this...

All participant fields

-

See template section for this

EXT: abcourses - 15

For the accommodation- and subscribe-form plugin.tx_abcourses_pi1.subscribe

Property

Data Type

Description

Default

sendTo

string

Recipient E-Mail address for the administrative subscription info EMail.

[email protected]

mailFrom

string

The From-Address of the info EMail.

[email protected]

mailFromName

string

The From-Name of the info EMail.

Seminar Database

usedLabels

string

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

anrede,vorname,nachname,email, telefon,fax,firma,adresse,eventid,a rrangement,invoiceaddress

required

string

This string list below causes the corresponding form fields to be required

vorname,nachname,email

mailLabels

string

Use this list to determine which form fields will be included in the confirmation email.

anrede,vorname,nachname,email, telefon,fax,firma,adresse,arrange ment,invoiceaddress

sendEmailsAfterSubscription

boolean

Setting this flag to 0 causes no confirmation e-mail is sent at all.

1

sendConfirmation

boolean

Set this flag to 1 if you want your subscriber to get a confirmation mail too. Otherwise only the Admin will receive a confirmation. This does not take an effect if the flag sendEmailsAfterSubscription is set to 0. The form field “email” is used for the E-Mail address of the subscriber.

0

tt_address_mapping

string

Here you can map your form fields first_name:vorname,last_name:na with the corresponding tt_address chname,email:email,gender:gende entities. r

manlocselname

string

See more about this in the “Special content” section. This value is rendered as name attribute for the location select box.

wunschstandort

manlocselparams

string

Additionally parameters for the select box.

class="mf-input"

manlocselvalues

string

The available options for the select box. If you prefix this list with a single “,”, the first value is rendered as an empty option.

, Hamburg,Hannover,Kassel,Berlin, Potsdam/Kleinmachnow,Stuttgart, Leipzig,Frankfurt,München,Regen sburg,Nürnberg,Paderborn,Dortm und,Siegen,Wien

accommodationPeriod

integer

Possible period for 2 accommodation, depending on the start and enddate of the corresponding event.

hotel

All hotel fields...

Take a look at the template marker section for this

arrangement

All arrangement fields...

-

EXT: abcourses - 16

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 can create a nice view with different internally links.

plugin.tx_abcourses_pi1.catoverviewwithnextevents Property

Data Type

All category fields...

-

nextevents

Integer

course

All course fields...

course.event

All event fields...

Description

Number of closest events in an category which should be rendered.

Default 3

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 rows and columns so this value sets the number of columns rendered for each row.

2

asLastMinuteView

Boolean

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

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

maxNEvents

Integer

Number of closest last-minute events which should be rendered.

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

selectedEvents

String

Comma separated list of event id's. You will need this if you want to insert this view-type via TS but not as last minute view.

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

showEventsAgo

Integer

This is ONLY available via TS at present. If you want to display expired events to, set this to the number of days an event can be expired.

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

course

All fields for courses...

-

course.event

All event fields...

-

course.trainer

All trainer fields...

-

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

Template marker for records / general Generally available markers The template marker as listed below can be used in every template! They are primarily intended to be used as labels.

Marker ###DAYSLABEL###

Usage

TS Wrapper

TS Description

Label for the “day” field in courses

EXT: abcourses - 17

###LABELWARNING###

This has content if some required form fields of the subscribe form are missed.

###WARNING###

This has content if some required form fields of the subscribe form are missed.

###LABELTRAINER###

Label for trainer records.

###LABELTITLE###

In forms for form of address

###LABELTITLE.I.0### (.1, .2)

This marker is comupted depending on the available translations in the locallang file. You can add there more values for this like I.0, I.1, I.2 ...

###LABELADDITIONAL### ###LABELADDITIONAL.I.0###(.1 This marker is comupted ...) depending on the available translations in the locallang file. You can add there more values for 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 as entered in a course record.

###LABELSUBMIT###

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

###LABELSUBMITSUBSCRIBE# The label on the submit button as ## contained in the subcribe view. ###LABELSUBSCRIBEHEADER ###

Informational header of the subscribe view.

###LABELNAME### ###LABELLASTNAME### ###LABELCOMPANY### ###LABELADDRESS### ###LABELINVOICEADDRESS## # ###LABELEMAIL### ###LABELPHONE### ###TAXLABEL###

As used for price information.

###LABELARRANGEMENTSDE SC###

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 a course record.

###LABELPOINTS### ###LABELEVENT### ###LABELNOEVENTS### ###LABELEVENTTITLE### ###LABELCATOVERVIEW### ###LABELDATE### ###LABELPRICE### ###LABELPARTICIPIANTS###

EXT: abcourses - 18

###LABELREGSTART###

Label for information about the start date of a registration period.

###LABELREGEND### ###LABELCOURSENUMBER### ###EDUPOINTSLABEL### ###CONDITIONSLABEL###

A label to introduce the conditions of a course.

###LABELNORESULTS### ###LABELERRORCONTACTUS ### ###LINKCATOVERVIEW###

This will render a link to the default PlugIn (as defined via TS) which contains a category overview.

###LINKDETAILSEARCH###

This will render a link to the default PlugIn which contains a detail search. (not in use!)

###LINKLMOVERVIEWSTART## This will return only the part of a link to the default PlugIn (as defined via TS) with a LastMinute overview. ###LINKLMOVERVIEWEND###

Will return the
for the previous 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 by example for usage as headline.

###LBLMOVERVIEWTITLE###

Label last minute overview by example for usage as headline

###LABELLOCATIONINFO### ###LABELBACKTOCOURSE### ###LABELMAX###

Max participants label

###LABELCOURSETYPE### ###LABELHEADERSEARCHRE SULTS###

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

EXT: abcourses - 19

Example for labeladditional

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


Example for labeltitle

<select name="Anrede">

All category fields Marker

Usage

TS Wrapper parseFunc

TS Description

-

For rendering of later values.

parseFunc/function

###CATTITLELINK###

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

stdWrap/function

###CATIMAGE###

Icon for a category.

catImageWrap

IMAGE/cObj

###CATTITLE###

Same as above, but without the link.

catTitleWrap

###CATTEASER###

Teaser for a category.

catTeaserWrap

< parseFunc

There is a template subpart ###NOCOURSES### for categories which tried to list their courses. This is only implemented within the Category object an may not be available in all kinds of view types.

All course fields Marker -

Usage For rendering of later values.

###COURSEUID###

TS Wrapper

TS Description

parseFunc

parseFunc/function

-

-

###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/Plural depending on days.

courseDayslabelWrap

stdWrap/function

###CONDITIONSTEXT###

The textual entered course conditions

courseConditionWrap

stdWrap/function

<--###CONDITIONS### begin-->

This starts a template subpart to render referenced conditional courses. Please take a look into the default template to get an example.

<--###FILES### begin -->

This starts a template subpart to render referenced files. Find an example within the default template.

###DETAILLINK###

Link to the detail view

courseDetaillinkWrap

stdWrap/function

###TITLELINK###

Title of the course as link to the detail view

courseTitlelinkWrap

stdWrap/function

EXT: abcourses - 20

###NUMBERLINK###

Number of the course as link to the detail view

courseNumberlinkWrap

stdWrap/function

###BASEPRICE###

Base price without VAT

basepriceWrap

stdWrap/function

###BASEPRICETAX###

Base price with VAT

basepricetaxWrap

stdWrap/function

###COURSESKILLLEVELIMAGE Image, corresponding to the ### entered skill level.

courseSkillImageWrap

IMAGE / cObj

###DOWNLOADLINK###

Textual downloadlink

-

-

###DOWNLOADLINKIMAGE###

Image downloadlink

-

-

All event fields Marker

Usage

TS Wrapper

TS Description



If this marker is present in the events template and an assigned location is available for this event, the rendering of the location is triggered as well.. See an example below this table.

-

###EVENTNUMBER###

Number of the event.

eventNumberWrap

stdWrap / function

###EVENTTEASER###

The event teaser

eventTeaserWrap

stdWrap/function

###CONTINGENT###

The available contingent.

eventContingentWrap

stdWrap/function

###CONTINGENTLEFT###

Remaining contingent

eventContingentLeftWrap

stdWrap/function

If the contingentmanagement is disabled, this marker is rendered with the ts wrapper usecontingentInactiveWrap instead. ###DAYS###

The duration of this event in days. eventDaysWrap

stdWrap/function

###DATE###

This marker contains the start eventDateWrap date of this event and, if available, the end date as well. The date is formatted with the php strftime() function.

stdWrap/function

###DATESTART###

Shows only the start date of an event. The date is formatted with the php strftime() function.

eventDateStartWrap

stdWrap/function

###DATEEND###

Shows only the end date of an event. The date is formatted with the php strftime() function.

eventDateEndWrap

stdWrap/function

###TIMEDATESTART###

Shows the start and, if available, the end time related to the first date of an event. The date is formatted with the php strftime() function.

eventTimeDateStartWrap

stdWrap/function

###TIMEDATEEND###

Shows the start and, if available, the end time related to the last date of an event. The date is formatted with the php strftime() function.

eventTimeDateEndWrap

stdWrap/function

###PRICE###

The price for this event without VAT.

eventPriceWrap

stdWrap/function

###PRICETAX###

The price with VAT included.

eventPriceTaxWrap

stdWrap/function

###REGSTART###

Shows the date the subscribe links are effective from.

eventRegStartWrap

stdWrap/function

###REGEND###

Shows the date the subscribe links losing their validity.

eventRegEndWrap

stdWrap/function

###SUBSCRIBELINK###

One link to reach the subscribe view for this event. The link text comes from the locallang file.

eventSubscribeWrap

stdWrap/function

###DATESUBSCRIBELINK###

Link to the subscribe view. Link text is the date of the event.

dateEventSubscribeWrap

stdWrap/function

EXT: abcourses - 21

###LASTMINUTE###

If the event is marked as last minute, this marker is filled with the css class as configured in the basic PlugIn TS.

-

-

Example for the usage of the sub template “Locations”:
###DATE### - ###PRICE######CUR### (###PRICETAX######CUR### ###TAXLABEL###)
###SUBSCRIBELINK###
###LOCCITY###

All trainer fields Marker

Usage

TS Wrapper

TS Description

###TRAINERTITLE###

The title as entered in the tt_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 contact person

locationEmailWrap

stdWrap/function

###LOCPERSON###

Name of a contact person

locationPersonWrap

stdWrap/function

All page fields Marker

Usage

TS Wrapper

TS Description

###PAGETITLE###

The title of a page assigned to a course.

pageTitleWrap

StdWrap / function

###PAGESUBTITLE###

The subtitle of a page assigned to a course.

pageSubtitleWrap

StdWrap / function

###PAGELINK###

The title of a page assigned to a course. Rendered as link to this page.

pageLinkWrap

StdWrap / function

All hotel fields Marker

Usage

TS Wrapper

TS Description

If this subtemplate is available and if there are initialized arrangements for this hotel, the rendering of the arrangements is triggered as well.

-

###NAME###

-

The name of this hotel record.

-

EXT: abcourses - 22

###SUBTITLE###

Subtitle for this hotel.

-

-

###LINK###

This could be a hyper link to the hotels website or an internal link.

-

-

###IMAGE###

Renders an image if you uploaded image on for this hotel.

COBJ / IMAGE

###RATING###

Renders an rating image corresponding to the rating you have chosen in the back end.

COBJ / IMAGE

ratingImage

All arrangement fields Marker

Usage

TS Wrapper

TS Description

###FORMFIELD###

The uid of this record. See an example how to use this within a hotel template below this table.

-

-

###FRONTENDNAME###

The name of this arrangement as shown in the frontend.

-

-

###PRICE###

The price for this arrangement. Without VAT.

priceWrap

stdWrap/function

###PRICETAX###

Price with tax included.

priceTaxWrap

stdWrap/function

All teaching aid fields For subtemplates of teaching aid records, there is only a fieldmarker ###NAME### without any special wrapping.

EXT: abcourses - 23

All conditions fields In this case conditions are course records which contains recommended previous knowledge. You can integrate them only in the detail view of a course record at the moment. This is because the support for of them is currently not assumed in the object 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 fields These are the available fields for tracked participants. You can create create participant records manually as well. They will only 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 content The manual location selector Coming soon...

The subscription hook Pre-subscription hook. The variable $hookAbort is passed into the expected method. If you implement this as an reference in 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 common reference 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 the hook: 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

The fillAllLabels Hook This hook is called just before the method fillAllLabels returns. The method fills an array with general markers and is used for 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 form Due to the fact that a submitted subscription form is not stored in any way by this extension currently, you can add as many fields 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 template would look like this:

###LABELSUBSCRIBEHEADER###

###LABELWARNING### ###WARNING###


The next 3 lines are the input fields! ###LABELNAME###
###LABELLASTNAME###
###LABELEMAIL###

###LABELERRORCONTACTUS###
###LINKCATOVERVIEW###
###LINKDETAILSEARCH###

And now, we want to add an required input field where the subscriber should enter the name of the company he is working for. 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 subscription hook. At first, you add one line in the template of you form:


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###


Now, add “addonlbl-company” to the comma separated list of the plugins TS configuration. This is explained above in the section “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 you locallang.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 the subscribing 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###
EXT: abcourses - 25

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 TS Configuration 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 sendTo recipient for the customers confirmation email. Thats it! I hope this quick overview was usefull for you.

What you should know about the email template Within 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 new line 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 there a 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

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 get parameter 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 the rendered value in the front end, take notice of the setting “offset” as described within the TS section of this documentation. 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 informations about the changes then!



Refactoring of the subscribe 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 informations about the changes then!

Do you have any special requirements? Do you need hooks on different places or need any special feature what could be nice 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...)



...

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

EXT: abcourses - 27

Related Documents

Manual 150
July 2020 5
Lifan 150-11 Manual
October 2019 4
150
November 2019 45
150
November 2019 56
150
October 2019 48
150
November 2019 47

More Documents from ""