DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: IDAA FE Utilities

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Jörg Körner
Changed:2007-06-01T18:53:23
Author:Jörg Körner
Email:jk@idaa-net.de
Info 3:
Info 4:

EXT: IDAA FE Utilities

Extension Key: idaa_fe_utilities

Copyright 2000-2002, Jörg Körner, <jk@idaa-net.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: My Extension 1

Introduction 1

What does it do? 1

Screenshots 1

Users manual 1

FAQ 1

Adminstration 1

FAQ 2

Configuration 2

FAQ 2

Reference 2

Tutorial 2

Known problems 2

To-Do list 2

Changelog 2

Introduction

What does it do?

idaa_fe_utilities is a collection of fe development helpers. Main Functions are:

  • Template rendering with automatically translated ###LL-???### Markers by using locallang.xml
  • Form and field rendering such as input, select, textarea and so on.
  • Error Message handling
  • CSV import into array
  • POST- and GET-Request generation out of the extension you develop. But curl must be loaded in your php.
  • Sending Mails with attachment
  • You can store application settings in DB to save, display and edit them in frondend.

Screenshots

img-1

Users manual

To use idaa_fe_utilities in your own extension just copy the following lines into your code:

*In header of your script:*

require_once(t3lib_extmgm::extPath('idaa_fe_utilities').'lib/class .idaa_fe_utilities.php');

*In main() function:*

$this->util = t3lib_div::makeInstance('idaa_fe_utilities');

$this->util->init($this,$this->templateCode);

From now your can access all functions of use idaa_fe_utilities by using:

$this->util ->functionName()

For use of automatically translation you have to call $this->pi_loadLL(); before $this->util->init($this,$this->templateCode);

Function list ( complete description follows soon I hope)

To see what happens, just take a look in $subpartArray by using debug($subpartArray); Since Typo3 4.0 you have to enable the debug function in Install-Tool first.

The following form field functions produces markers like ###FF-name of field###

*renderForm* ($subpartArray, $name, $method, $params);

*renderInput* ($subpartArray, $type, $name, $value, $params, $keepValues,$emptyValue);

*renderTextarea* ($subpartArray, $name, $value, $params, $keepValues);

*renderSelect* ($subpartArray, $type ,$name, $value, $aOptions, $params, $keepValues);

*renderRadio* ($subpartArray, $name, $aOptionValues, $value, $params, $keepValues);

*renderDate* ($subpartArray, $formName, $name, $value, $params, $keepValues);

*renderTemplate* ($subpartArray, $section);

by using this function all ###LL-index### markers will be replaced by the values under “index” in locallang.xml of your extension. Markers starting with ###LL-ERROR- or ###LL-MESSAGE- will be removed if no error or message hase been added while current request.

*setLLReplacement* ('label-index',replacement); Replacement can be an String or an Array like this:array('A','B','C');

in your locallang.xml you hav to set Markers like this:

<label index="someindex">Some Static Text ###0### More ###1### Text ###2### </label> would result in

Some Static Text A More B Text C

*renderErrorsAndMessages* ($subpartArray); Mainly for internal use by function *renderTemplate* ($subpartArray, $section)

*addError* ($value[,replacement]);

Where replacement can be an array or an String. In locallang.xml you can use replacement as follows:

<label index="error-someindex">Some Static Text ###0### More Text</label> or if replacemet is an array like this:

array('A','B','C');

<label index="error-someindex">Some Static Text ###0### More ###1### Text ###2### </label> would result in

Some Static Text A More B Text C

*noErrors* ();

*addMessage* ($value[,replacement]); using similar to addError();

*loadCsvIntoArray* ($file,$firstRowIsHeadline);

*get* ($url);

*post* ($url, $vars);

*sendMail* ($to, $from, $subject, $message, $file,$fileAlias,$asHtml);

All form fields can be layouted by using following class-schema :

Field Classes Renderd Field

input input, input-[fieldname] <input type=“text“ name=“email“ class=“input input-email“>

textarea textarea, textarea-[fieldname] <textarea name=“comment“ class=“textarea textarea-comment“>

In CSS-File:

textarea { Styles for all textareas} / div.tx-idaacareer-pi1 .textarea-comment { Styles only for comment field}

FAQ

- not known jet

Adminstration

Not necessary

Configuration

Not necessary

Target group: Developers

FAQ

not known jet

Known problems

To-Do list

  • Function sendMail schould be able to manage more than 1 attachement and charset handling schould be inserted
  • Please feel free to suggest som aditional features.

Changelog

01.06.2007

Parameter for empty value on function renderInput() added.

10.05.2007

Bugfixing plain/text mail in sendMail function

07.05.2007

Adding Parameters for LL-Markers Like ###0###

bugfixing Formfield file CSS-Class as „file“ now

bugfixing function getUserGroupsOptions() returns no more deleted Groups

04.13.2007

Adding CSS Style Classes for all form fields

04.12.2007

Adding this documentation and little improvements of this extension

img-2 EXT: IDAA FE Utilities - 3