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: Admin Interface¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed by: | Steve Ryan |
Changed: | 2007-04-19T11:22:32 |
Email: | admin_int@syntithenai.com |
Info 2: | |
Info 3: | |
Info 4: |
EXT: Admin Interface¶
Extension Key: admin_interface
Copyright 2000-2002, admin_int@syntithenai.com, <admin_int@syntithenai.com>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
Table of Contents¶
EXT: Admin Interface 1
Introduction 1
What does it do?. 1
Screenshots 2
Users manual 2
FAQ 2
Administration 2
FAQ 2
Configuration 2
Configuring available fields 2
Configuring behaviors 3
Search Configuration 3
Configuring HTML templates 3
Configuring field customisations 3
Configuring Email notifications 3
Configuring Email Editing Links 3
Configuring Database Relationships 3
Joins 4
Access Control 4
Creating Dependant Fields and Dependant Search Fields 4
Other Cusomisations 4
FAQ 4
Reference 5
TS Configuration Options 5
Section join 5
Section record 6
Section uiconfig 8
Section templates 9
Section infomail 9
Section emailOn 10
Section setfixed 10
Section upload 11
Section rte 11
Section functionOverride 11
Known problems 12
To-Do list 12
Changelog 14
Introduction¶
What does it do?.¶
This extension attempts to be a universal front end plugin by creating search/list/view/edit user interfaces for any table that has associated TCA meta data. Typically this extension is used in conjunction with the database kickstarter which is used to build the data model for an application. It is very useful for providing front end submission and administration of records for extensions that only provide front end rendering functionality. With flexible searchBoxFields TS configuration, it is very useful for search/list view also.
This extension is designed to be used by typo3 site developers with some knowledge of typoscript but not necessarily any knowledge of php. Being able to use the kickstarter is required if you want to make your own database tables.
It is also designed with hooks at many levels (method/wrap/field/sql/action) by an advanced user to simplify small customisations to the raw data model derived user interface..
The admin interface is placed in a page as a plugin and a template record is configured to define what table and fields are presented and what functionality is presented (search?/delete?/edit?). The extension is intended to be easy to use so the minimum required configuration is the name of the table that is to be presented. eg plugin.tx_admininterface_pi1.table=fe_users will produce a search/list/view user interface.
The extension was started by extracting form field rendering code from the fe_adminLib.inc class provided with the core typo3 code. It differs from the fe_adminLib (and derived fe administration solutions) by generating user interfaces without necessarily requiring HTML templates to make the rendering work and has many improvements in field type support including date, rich text, file upload and database relationship (including select/radio and popup window) types.
All output is templatable for maximum flexibility. A template file and subpart can be specified for the list/view/form/searchform views. Template files can be active in converting the provided data into a view format by embedding php in the template files.
This templating approach has been depreciated in favor of using TS content objects which provides even more flexibility.
There are many typoscript configuration options that include php functions to customise the functionality. These include method overrides, per field defaults and overrides. It is possible to create fake fields that appear in your output but are derived entirely from php.
Email notifications at various stages is the plugin process are configurable from typoscript. Links can be configured in emails to allow one click editing of records from an email client. This replicates the 'setfixed' behaviour of the fe_adminLib. Additionally it is possible to embed a login form into a HTML email.
Breaking news. The admin interface now has a wiki page for frequently asked questions. http://wiki.typo3.org/Admin_interface .
Screenshots¶
Configuration involves inserting the admin_interface plugin in a page and creating a TS template record on that page.
Results in front end list and search form
With buttons linking to editing forms
Users manual¶
At the moment, this extension is for administrators only. Soon to come flexforms will provide many of the available features to a normal user in simple way.
FAQ¶
Administration¶
A typical development process for deploying an online database application using this extension ncludes -
design and documentation of the database model, validation/transformation rules, screen flows, email notifications to determine the suitability of using a generalised plugin and articulate the amount of customisation that will be required to achieve client satisfaction.
- creation of data model as a separate extension in the typo3 kickstarter
- creation of pages, plugins and template records to get the basics of the user interface working
- at a minimum specify plugin.tx_admininterface_pi1.table= in the template record
- fine tuning of TS configuration. See configuration and reference sections.
- [optionally] creation of php functions to override default behaviors and massage field values
- [optionally] creation of HTML template fields to fine tune the output presentation
Quick Start
Insert a content element of type plugin, plugin type admin_interface.
Create a template on the same page with the setup plugin.tx_admininterface_pi1.table=fe_users
View the page
FAQ¶
Configuration¶
In this section, constants are gathered into functional sets with brief descriptions or examples. For details see the reference section.
Configuring available fields¶
Using typoscript it is possible to control which fields are displayed in the lst, view, edit and search forms.
- Only these fields are provided as markers and saved to database
- the HTML template can skip further fields
plugin.tx_admininterface_pi1 {
record {
listFields=name,email
viewFields=name,email,phone,fax,address
editFields=username,name,email.phone,fax,address
# these fields are non editable in the edit form
editViewFields=username
}
}
Configuring behaviors¶
- uiconfig
- uiconfig.allowdelete
- uiconfig.allowedit
- uiconfig.allownew
- uiconfig.allowprint
- uiconfig.disableview
- uiconfig.viewbeforeedit
- uiconfig.autosearch
Search Configuration¶
- record.searchBoxFields.key { type=text |daterange|picklist|picklist_custom fields=name,address }
- record.sortFields
- record.groupByFields
- uiconfig.maxListRows
- joins
Output Configuration/TS Content Object Templating¶
The section rendering resources defines a rendering configuration section for each major user interface component – view, form, list, searchform. Each section provides a renderObj which is a TEMPLATE cObj by default. The rendering methods provide a HTML default template including all relevant markers and wraps which is passed with a marker array to the cObj->getSingle method. Each section may also provide an imageRenderObj section to define how images are rendered for this view and a marks section to add additional markers or customise existing ones.
Use plugin.tx_admininterface_pi1.renderingresources.view.dumpDefault Template=1 to see the default template, a list of markers and the cObj configuration used for rendering the view. Similarly for form,list,searchform.
To override the template for the form, use renderingresources.form.renderObj.template.file=mynewtem.html
The default list configuration provides a series of nested subparts LIST_CATEGORIES_AND_ITEMS,LIST_CATEGORY,LIST_ITEMS,LIST_ITEM for which the rendering properties including stdWrap and wrap and marks and subparts and ... can be set. By overriding LIST_ITEM.marks it is possible to create button images using the GIFBUILDER content object.
The option renderingresources.list.categoriseBy=fieldname triggers categorisation during list rendering. The category field can be a relationship to another table. Where the relationship allows multiple select, the first selected item is used. The label field of the related table is provided when rendering the LIST_CATEGORY subpart as the CATEGORY_LABEL marker. Categories are sorted by the title of their label field.
Configuring field customisations¶
override and fakefields
Configuring validation¶
The validation routines use the TCA to determine if the incoming data is in a valid format. Additionally there are global options to simplify configuration of validation rules.
- record.uniqueFields
- record.requiredFields
Configuring Email notifications¶
- emailOn
- infoMail
- setfixed
Configuring Database Relationships¶
Multiple varieties of field types for database relationships are supported
one to many (foreign key in child pointing to parent)
- selector boxes and checkboxes
- search with popup. Implemented using the record.fakefields typoscript configuration
many to one (foreign key in parent pointing at child)
- radiobuttons
- popup window allowing management of related child with foreign key in parent. Allow search and select, new record creation and removal of association to child records. Implemented using the record.inputrender typoscript configuration
inputrender {
client_id {
type=popupsearch
# limit on search results that appear in popup box
extrawhere=
# page id configured for editing of child records
editpid=36
# fields that shown in popup box list
popupListFields=name,street,suburb
# formatting for display of related child inline to parent form
format {
# wrapped around whole input field – include markers for addlink, deletelink
wrap=<table border='1' width='100%'><tr ><th>Name</th><th align='right'>###addlink###</th></tr>|</table>
edit=<tr><td>###name###</td><td> ###editlink### </td></tr
}
}
Joins¶
It is possible to configure a join that will allow lists and views and search queries to access fields in join tables directly.
table=fe_users
alias=u
join.0 {
table=fe_groups
alias=g
condition=and find_in_set(g.uid,u.usergroup)
fields=title,description
}
If a join is configured then field names must be prefaced by the table alias in listFields etc. For example listFields=uname,gtitle,gdescription.
When referencing joined fields in searchBoxFields, the fields are prefaced by the table alias and a dot ready to be used directly in a sql query.
Where fields are configured as excludeFields in the TCA, the TCA meta data is not normally available for listFields etc unless there is a backend user logged in. By using the configuration option plugin.tx_admininterface_pi1.loadTCA=<comma seperated table names>. This is done by default for the current table but any join tables must be listed explicity to allow correct form/output generation. This needs to be fixed.
Access Control¶
Access control is based on front end users and groups. The plugin limits access in one of two ways. By using the inbuilt group based page/content access restrictions it is possible to limit access per group.
The configuration option plugin.tx_admininterface_pi1.lockToFEUser=1 limits editing of records to session users with a uid matching the cruser_id of the record.
Creating Dependant Fields and Dependant Search Fields¶
- type field and fakefields
Other Cusomisations¶
XCLASSES, method override, php templates
Behavior Customisation using TS tests¶
By using TS tests in the constants section of your template, it is possible to set configuration values per FE user group or based on other criteria that select how the extension behaves.
eg
CONSTANTS
AI.allowDelete=0
AI.editFields=name,date
# adminGroup
[userGroup=3]
AI.allowDelete=1
AI.editFields=name,date,restrictedfield
SETUP
plugin.tx_admininterface_pi1.record.editFields={$AI.editFields}
Another approach with similar results is to configure multiple pages with varying configurations that are access restricted to particular FE groups.
FAQ¶
- not an array error –> where invalid table name is specifiedma
- no show field input –> invalid input type – not supported type or missing TCA for field
- ### markers in output –> incorrect marker in template
- the default configuration options are all messed up -> remember that typoscript cascades. If you create a child editing page underneath a parent editing page in the page tree, the parent configuration will act as a default.
Reference¶
TS Configuration Options¶
Global configuration options affecting a range of behaviours.
table¶
Property
table
Data type
text
Description
Name of the database table to administer. REQUIRED.
Default
none
template¶
Property
template
Data type
filename
Description
Template file used with markers for major components including search form,list,form,view.
Default
none
fileUploadPath¶
Property
fileUploadPath
Data type
path
Description
wher e are associated files uploaded.
Default
Defaults to extension directory for the table being edited.
debug¶
Property
debug
Data type
boolean(1/0)
Description
Show additional debug output?
Default
0
IncludeLibs¶
Property
IncludeLibs
(top level NOT under plugin.tx_admininterface_pi1. This is the preferred way to include files)
Data type
filename
Description
Php files to be included in global scope. Use subkeys for each included file ie includeLibs.lib1=filename.php
Default
none
include¶
Property
include
Data type
comma seperated list
Description
Php files to be included in global scope from EXT:admin_interface/lib folder. Multiple files specified with comma seperators. Depreciated - use includeLibs instead.
Default
none
globalIncludes¶
Property
globalIncludes
Data type
comma seperated list
Description
Php files to be included in global scope from EXT:admin_interface/lib folder. Multiple files specified with comma seperators. Depreciated - use includeLibs instead.
Default
none
setFixedMD5Salt¶
Property
setFixedMD5Salt
Data type
text
Description
Combined with field values to generate MD5 hash used in setFixed authentication.
Default
you should type a random string here to improve security of setfixed editing
loadTCA¶
Property
loadTCA
Data type
comma seperated list
Description
additional tables to load full TCA. Sometimes required to get full meta data for joins.
Default
none
lockToFEUser¶
Property
lockToFEUser
Data type
boolean(1/0)
Description
Only allow editing of records where the cruser_id matcinfomail
hes the uid of the current logged in FE user
Default
0
Section join¶
It is possible to include fields from related database tables in list/view results and query criteria by configuring a sql join.
Multiple layers of joins can be created using join.0, join.1,.... resulting in queries like
select * from (bdg left join res on bdg.bid = res.bid) left join dom on res.rid = dom.rid;
When using the fields that result from a join query there are two conventions. listFields and viewFields prepend the alias of the additional table to the additional table field names. searchBoxFields.$fieldName.fields appends the alias and a dot to the field name so that the configuration can be used directly in the sql query string.
alias¶
Property
alias
Data type
text
Description
shorthand alias to the main table
Default
join.0.table¶
Property
join.0.table
Data type
text
Description
additional table to join
Default
join.0.alias¶
Property
join.0.alias
Data type
text
Description
shorthand alias to additional table
Default
join.0.condition¶
Property
join.0.condition
Data type
text
Description
sql condition to connect the two tables ie tt_address.cruser_id=fe_users.uid
Default
join.0.fields¶
Property
join.0.fields
Data type
comma seperated list
Description
fields from additional table to request data for in join query
Default
join.0.requireJoinValue¶
Property
join.0.requireJoinValue
Data type
boolean (1/0)
Description
By default, a left join is performed so that empty relationships to the additional join table are included in the results. If this field is set to 1, a normal join is performed, limiting the results to rows where there is a matching value in the join table
Default
0
Section record¶
Specify lists of fields that are used in various situations. The init method of the controller class provides default values for these configuration options using the TCA to find sensible defaults.
listFields¶
Property
listFields
Data type
comma seperated list
Description
Fields to display in the list view.
Default
label field
editFields¶
Property
editFields
Data type
comma seperated list
Description
Fields to display in the form
Default
all fields
viewFields¶
Property
viewFields
Data type
comma seperated list
Description
Fields to display in the view
Default
all fields
editViewFields¶
Property
editViewFields
Data type
comma seperated list
Description
Fields to display in the form as non editable. These fields must also be in the editFields list.
Default
none
infoMailFields¶
Property
infoMailFields
Data type
comma seperated list
Description
Fields to show when QUICKVIEW marker is used in an infomail template.
Default
selectFields¶
Property
selectFields
Data type
comma seperated list
Description
List of fields in the main table that are selected when loading or searching records
Default
all database columns
insertFields¶
Property
insertFields
Data type
comma seperated list
Description
List of fields in the main table that can be used in an insert query.
Default
all database columns
updateFields¶
Property
updateFields
Data type
comma seperated list
Description
List of fields in the main table in an update query.
Default
all database columns
listTotalFields¶
Property
listTotalFields
Data type
comma seperated list
Description
Fields to tally when generating a list.
Default
none
sortFields¶
Property
sortFields
Data type
comma seperated list
Description
Fields to sort the results by
Default
groupByFields¶
Property
groupByFields
Data type
comma seperated list
Description
Fields to group the results by
Default
requiredFields¶
Property
requiredFields
Data type
comma seperated list
Description
Fields for which values are required on form validation
Default
none
uniqueFields¶
Property
uniqueFields
Data type
comma seperated list
Description
Fields for which values must be unique on form validation
Default
none
specialFieldLabels¶
Property
specialFieldLabels
Data type
array
Description
fieldName=value pairs to use as labels. Modify the TCA and locallang file in preference. This is a quick alternative HACK.
Default
((generated))¶
Subsection FakeFields¶
Used to create field values which do no exist in the database but are available to rendering templates. Values for fake fields can be specified as constants or as php method names.
The foreign_* options are to allow editing of dependant child records (uid in child) by creating a nested editing field type. This section will be depreciated in favour of configuration that supports all relationship types using javascript/ajax rendering.
Property
record.fakeFields.
Data type
array
Description
define fake field names that can be used in listFields/editFields/viewFields. Values can be specified as a constant, a function or a database relationship.
Default
none
Property
record.fakeFields.$fieldName.label
Data type
text
Description
label for fake field
Default
Property
record.fakeFields.$fieldName.override
Data type
text
Description
where the text includes an open and close bracket possibly containing a comma seperated list of parameters, this is treated as a function call. Otherwise the text is treated as the value for the field.
Default
Property
record.fakeFields.$fieldName.foreign_table
Data type
text
Description
create a relationship manager for dependant children. Use this value as the dependant child table.
Default
Property
record.fakeFields.$fieldName.foreign_table_fk
Data type
text
Description
field (primary key?) in the main table to be used as the foreign key in the child table
Default
none
Property
record.fakeFields.$fieldName.foreign_editing_pid
Data type
uid for page configured to edit child records
Description
none
Default
Subsection inputRender¶
Used to indicate that rendering of a database relationship field should use the popup search list instead of the normal select/radio/checkbox rendering. This section will be depreciated in favour of configuration that supports all relationship types using javascript/ajax rendering.
eg
inputrender.client_id {
type=popupsearch
extrawhere=and find_in_set(usergroup,1)
editpid=36
popupListFields=name,street,suburb
format {
wrap=<table border='1' width='100%'><tr ><th>Name</th><th align='right'>###addlink###</th></tr>|</table>
edit=<tr><td>###name###</td><td> ###editlink### </td></tr>
}
}
Property
record.inputrender.
Data type
array
Description
configuration of relationship manager for 12M popup search and select
Default
none
Property
record.inputrender.$fieldName.type
Data type
text
Description
unused. must have the value- popupsearch
Default
none
Property
record.inputrender.$fieldName.editpid
Data type
integer
Description
uid for page configured for editing of child records
Default
none
Property
record.inputrender.$fieldName.extrawhere
Data type
text
Description
extra sql condition to popup search results
Default
none
Property
record.inputrender.$fieldName.sortfields
Data type
comma seperated list
Description
popup search is sorted by these fields
Default
none
Property
record.inputrender.$fieldName.popupListFields
Data type
comma seperated list
Description
fields to be shown in the popup search
Default
none
Property
record.inputrender.$fieldName.format.edit text
Data type
Description
HTML template to replace markers into for each related record. Available markers include editlink,deletelink,viewlink and one for all the field values. Markers are surrounded by ###name### in the template text.
Default
none
Property
record.inputrender.$fieldName.format.wrap
Data type
text
Description
HTML template to replace markers into. Available markers include editlink,deletelink,viewlink and one for all the field values. Markers are surrounded by ###name### in the template text. The template is split by a vertical bar. The before and after template subparts are wrapped around the list of selected records.
Default
none
Property
record.inputrender.$fieldName.maxListRows
Data type
integer
Description
maximum results to display in popup selection box
Default
20
Defaults and Overrides¶
Property
defaults
Data type
array
Description
array of fieldnames for which default values are set. For each field, the subkeys label and override may be set. Where the override value contains brackets it is treated as a php function call.
Default
none
Property
defaults.createonly
Data type
array
Description
Default
Property
overrides
Data type
array
Description
array of fieldnames for which override values are set. When the form is rendered and when the record is saved, the override function applies. For each field, the subkeys label and override may be set. Where the override value contains brackets it is treated as a php function call.
Default
none
Property
overrides.createonly
Data type
array
Description
Default
a
record.postinsert.override_cruser
b
comma seperated list
c
comma seperated list of pairs of values to set. eg cruser_id=uid,mydate=now(),approved=1. Text is embedded into a sql update query. This is useful in user registration configuration so that the users cruser_id can be set to the uid so that the automatic list own records feature works because the user owns his own record. This is a HACK and should be fixed into a more flexible configuration.
d
none
Subsection record.searchBoxFields¶
Quick configuration of search box and search criteria. Each listed searchbox field provides an input box on the default rendering of a search form and provides search criteria and implementation sensitive to the data posted by this input field.
Property
$fieldname.label
Data type
locallang
Description
Description for search box field
Default
empty
Property
$fieldname.type
Data type
text
Description
Picklist type could be text,picklist,daterange,picklist_custom,value_range,hidden
Default
none
Property
fields
Data type
comma seperated list
Description
Fields to be searched. daterange,picklist,value_range can only specify a single field
Default
none
Property
$fieldname.minvalues
Data type
comma seperated list
Description
Discrete values to show in select box for minimum selection
Default
Property
$fieldname.maxvalues
Data type
comma seperated list
Description
Discrete values to show in select box for maximum selection
Default
Property
$fieldname.exact
Data type
boolean(1/0)=1
Description
Does the field value need to match exactly or will a wildcard match do? Useful for integer key searches (picklists).
Default
none
Subsection record.TCA¶
- simply overrides TCA
- TODO give explanation about how much TCA is implemented
Section uiconfig¶
Enable/disable functionality using the allowField. Various constants controlling behavior and to some extent rendering.
allownew¶
Property
allownew
Data type
boolean(1/0)
Description
show add new link
Default
1
autosearch¶
Property
autosearch
Data type
boolean(1/0)
Description
remove search box and list all records (given other filters)
Default
0
viewbeforeedit¶
Property
viewbeforeedit
Data type
boolean(1/0)=0
Description
list links to view of record prior to editing
Default
0
allowedit¶
Property
allowedit
Data type
boolean(1/0)=1
Description
show link from view/list to edit
Default
0
allowdelete¶
Property
allowdelete
Data type
boolean(1/0)=1
Description
show link from view/list to delete
Default
0
allowprint¶
Property
allowprint
Data type
boolean(1/0)=1
Description
show link from view/list to print record
Default
0
allowView¶
Property
allowView
Data type
boolean(1/0)
Description
enable viewing of record
Default
1
sortableLists¶
Property
sortableLists
Data type
boolean(1/0)
Description
Generate a link on list column titles to sort the search results by that column
Default
1
sortableLists.¶
Property
sortableLists.
Data type
array
Description
Mapping between field names (which may include fake field names) and real sortable database column names
eg sortableLists.jobNumber=uid
Default
filterByUser¶
Property
filterByUser
Data type
boolean(1/0)
Description
show only records belonging to logged in user, if filter by user is set, then login page must be set. DEPRECIATED in favour of lockToFEUser
Default
0
childEditingOnly¶
Property
childEditingOnly
Data type
boolean(1/0)
Description
only allow editing on this page in the context of of a relationship manager field. Causes a redirect to home where there is no editing history to return to.
Default
loginPage¶
Property
loginPage
Data type
page id
Description
Redirect the user to this page ID for login where filterByUser is set and there is no logged in FE user
Default
none
filterExtra¶
Property
filterExtra
Data type
sql string
Description
extra filter, appended to sql query
Can be a function name
eg filterExtra=myFilterGenFunc()
BUT NOT
filterExtra=myFilterGenFunc() and hidden=0 and deleted=0
use the following filterExtra array format to add multiple criteria
Default
and hidden=0 and deleted=0
filterExtra.¶
Property
filterExtra.
Data type
array
Description
Same format as filterExtra above
eg
filterExtra= and hidden=0
filterExtra.0=and deleted=0
filterExtra.1=myFilterGenFunc
Default
defaultSearch¶
Property
defaultSearch
Data type
sql string
Description
when the search criteria is empty use default search
Default
(1=1)
searchFormPosn¶
Property
searchFormPosn
Data type
string
Description
where to place the search form. At the top of the template (default if empty) or bottom
Default
none
labels¶
Property
labels
Data type
Description
array
Default
maxListRows¶
Property
maxListRows
Data type
integer
Description
maximim rows to show in list output
Default
500
inputSize¶
Property
inputSize
Data type
integer
Description
width of text box
Default
none
textAreaWidth¶
Property
textAreaWidth
Data type
integer
Description
width of textarea
Default
none
finaliseAfterSave.template¶
Property
finaliseAfterSave.template
Data type
text
Description
Text containing HTML to display after a successful insert.
Default
emailNotify.update.???¶
Property
emailNotify.update.???
Data type
Description
Default
editForm.hideSave¶
Property
editForm.hideSave
Data type
boolean(1/0)
Description
Hide save button on forms
Default
0
editForm.hideSaveAndClose¶
Property
editForm.hideSaveAndClose
Data type
boolean(1/0)
Description
Hide save and close buttons on forms
Default
0
editForm.hideClose¶
Property
editForm.hideClose
Data type
boolean(1/0)
Description
Hide close button on forms
Default
0
linkposn¶
Property
linkposn
Data type
text
Description
where to put the list links right (default if empty) or left
Default
none
Section renderingresources¶
form¶
Property
form
Data type
cObj
Description
HTML template embeded in TS. If set, this takes priority for template data.
Default
none
((Unknown Property))¶
Property
Data type
Description
view¶
Property
view
Data type
filename
Description
Filename to use as template. eg EXT:admin_interface/pi1/example_templates.html
Default
none
list¶
Property
list
Data type
subpart key
Description
Subpart of template file to use
Default
none
searchform¶
Property
searchform
Data type
fieldname
Description
Categorise list templates by this field. TODO implement this
Default
none
Section infomail¶
Note that default infomail configuration exists for insert,update,delete,view,setfixed_approve
eg
insert {
template.text=<html>###SYS_SETFIXED_EDIT###<br/>###SYS_SETFIXED_APPROVE### ###SYS_SETFIXED_DELETE###<br/>A new record has been created <br>###QUICKVIEW###<br> </html>
to.email={$admin_email}
subject=Record Created
from.email={$from_email}
}
$infomailKey.template.¶
Property
$infomailKey.template.
Data type
array
Description
template configuration for infomail. See template section above for subfields.
Default
none
$infomailKey.to.email¶
Property
$infomailKey.to.email
Data type
text
Description
where to send the message.
Default
$infomailKey.to.emailMarker¶
Property
$infomailKey.to.emailMarker
Data type
text
Description
Marker to use as destination email address derived from rendering markers
Default
none
$infomailKey.to.admin¶
Property
$infomailKey.to.admin
Data type
text
Description
static email address to send a duplicate of the email.
Default
none
$infomailKey.subject¶
Property
$infomailKey.subject
Data type
text
Description
subject for the message
Default
$infomailKey.subjectAdmin¶
Property
$infomailKey.subjectAdmin
Data type
text
Description
subject for the message sent to the admin email address
Default
$infomailKey.from.email¶
Property
$infomailKey.from.email
Data type
text
Description
sender email address for the sent messages
Default
none
$infomailKey.from.emailMarker¶
Property
$infomailKey.from.emailMarker
Data type
text
Description
Marker to use as email address for sent messages derived from rendering markers
Default
none
Section emailOn¶
This section is used in conjunction with the infomail section to define when notification emails should be sent.
action=$infomailKey¶
Property
action=$infomailKey
Data type
text
Description
where action is one of insert,update,delete,view,setfixed.* the corresponding infomail is sent when one of these actions is triggered
Default
none
Section setfixed¶
Configuration of actions that can be executed by clicking on links (most likely embedded in emails). An MD5 hash of the field values of the record at the time of rendering is used to authenticate access. This means that access is only available until the record changes.
template_OK.¶
Property
template_OK.
Data type
array
Description
template configuration when setfixed processing succeeds and there is no per action template defined. See template section above for sub keys.
Default
Record Updated
template_FAIL.¶
Property
template_FAIL.
Data type
array
Description
template configuration when setfixed processing succeeds and there is no per action template defined. See template section above for sub keys.
Default
Failed to update record
commands.$cmdKey.fields.¶
Property
commands.$cmdKey.fields.
Data type
array
Description
Fieldname=value pairs that are updated in the database when the setfixed command is executed. eg approve {fields {hidden=0})
Default
none
commands.$cmdKey.label¶
Property
commands.$cmdKey.label
Data type
text
Description
Label for setfixed command link
Default
commands.$cmdKey.template_OK.¶
Property
commands.$cmdKey.template_OK.
Data type
array
Description
template configuration when setfixed processing succeeds. See template section above for sub keys.
Default
none
commands.$cmdKey.template_FAIL.¶
Property
commands.$cmdKey.template_FAIL.
Data type
array
Description
template configuration when setfixed processing succeeds. See template section above for sub keys.
Default
none
commands.DELETE.¶
Property
commands.DELETE.
Data type
array
Description
setfixed command DELETE is treated specially. The sub keys label, template_OK, template_FAIL are required but the fields configuration is not. Rather that updating the record fields, the record is deleted.
Default
none
commands.EDIT.¶
Property
commands.EDIT.
Data type
array
Description
setfixed command EDIT is treated specially. The sub keys label, template_OK, template_FAIL are required but the fields configuration is not. Rather that updating the record fields, the record is shown in a form for editing. The sub keys userStoragePID (required for login form), buttonLabel, UIDField (local field to use as uid for editing lookup) and editingPID (what page id to post the form to - defaults to page id that the infomail is sent from if empty)
Default
none
Section upload¶
allowed¶
Property
allowed
Data type
comma seperated list
Description
file types that can be uploaded via the front end
Default
gif,jpg,png,txt
images¶
Property
images
Data type
comma seperated list
Description
file types that are treated as images
Default
gif,jpg,png,jpeg
Section rte¶
RTE configuration here is very limited. It is best to use page TS config to set
RTE.default.FE {
showButtons=
toolbarOrder=
}
Remember to enable any plugins in the extension configuration
showButtons¶
Property
showButtons
Data type
comma seperated list
Description
Ordering and inclusion of buttons in the RTE. Possible options are - undo,redo,bar, fontstyle, space, fontsize, space, formatblock, bar, bold, italic, underline, strikethrough,subscript, superscript, bar, left, center, right, justifyfull, linebreak, bar, orderedlist, unorderedlist, outdent, indent, bar, textcolor, bgcolor, textindicator, bar, emoticon,insertcharacter, line, link, image plus extras for plugins.
NOTE
1. The buttons configured or required for the RTE in page TS will appear as well.
- Ordering of buttons must be done with page TS.
Default
From page TSCONFIG RTE.default.FE.showButtons
stdWrap.¶
Property
stdWrap.
Data type
stdWrap array
Description
stdWrap configuration for processing of RTE text before rendering
Default
brTag = <br/> parseFunc < styles.content.parseFunc
Section functionOverride¶
Three mechanisms for hooking in custom PHP are available.
- Fakefields/overrides/defaults all allow calling a function to act as the value for a field.
- By specifying a PHP file as a templates.searchForm|view|form|list.file, PHP becomes available at the component rendering level after the template markers have been prepared by the generic code.
- The functionOverride set of configuration allows redefining any of the methods that have these hooks for total control.
Examine the source for the details of parameter passing to hook functions.
renderForm¶
Property
renderForm
Data type
filename
Description
include this php file and capture its output as the return value of the renderForm method
Default
none
renderList¶
Property
renderList
Data type
filename
Description
include this php file and capture its output as the return value of the renderList method
Default
none
renderView¶
Property
renderView
Data type
filename
Description
include this php file and capture its output as the return value of the renderView method
Default
none
renderSearchForm¶
Property
renderSearchForm
Data type
filename
Description
include this php file and capture its output as the return value of the renderSearchForm method
Default
none
dbDelete¶
Property
dbDelete
Data type
Description
Default
dbSearch¶
Property
dbSearch
Data type
Description
Default
processDataValues¶
Property
processDataValues
Data type
Description
Default
parseDate¶
Property
parseDate
Data type
Description
Default
Technical Discussion¶
Field Selections¶
The default behavior of the admin interface is to automatically select fields that are shown in the form, view, list, .... It is also possible to override the fields available for a given purpose with TS configuration eg plugin.tx_admininterface_pi1.record.listFields=name,address.
Selection of default values is based on a number of sources.
- columns available in the TCA for this table are used to set defaults for user interface fields
- fields defined in the database table definitions (queried in init) are used to filter generation of database queries. dbFields,selectFields,insertFields,updateFields are set by default to all the available database columns.
the field configured as a label in the TCA for this table (config.label) is used to select a single default listField.
The result of selecting default values is stored in the conf variable as a comma seperated list under the keys plugin.tx_admininterface_pi1.record.???Fields. Where there is existing configuration coming from a TS template record, that is used in preference. HINT: To debug an some example configuration containing a complete list of the available fields, set plugin.tx_admininterface_pi1.debug.fields=1.
The resulting field lists include
VIEW
listFields,editFields,editViewFields,viewFields,emailQuickViewFields
DB
insertFields,updateFields,dbFields,sortFields,groupByFields,selectFiel ds
Other field lists that are not set automatically
fakefields,overrides,defaults
FakeFields provides a way to tie in constant value or function derived values as user interface fields. Fakefields can be used in the UI field lists above ie listFields=fake_combinedfirstlastname,address,phone
Overrides provides a way to set a constant value or function derived value into a field when the form is rendered and when loaded from or saved to the database. If overrides.$fieldName.createOnly=1, the overrides is only performed when creating a new record.
Defaults provides a way to set a constant value or function derived value into a field when a form is rendered for creating a new record.
Global and Class Variables¶
- better as functions??
conf
piVars
[DATA]
[search]
controller variables
Access Controls¶
NOTE: The following description is what will be. At time of writing only lockToFEUser and ***Fields are supported.
As this is a front end plugin, access controls are based strictly on fe users and fe groups.
By using this extension, you are opening access to potentially change and delete records from a database table. Whilst reasonable defaults are provided, it is possible to create situations when any web site visitor can manipulate database records. Use with care!!
Relevant configuration options include
TODO allowedTables comma seperated list comma seperated list of tables that are available for editing by this extension
lockToFEUser boolean(1/0) only allow access to records where the cruser_id field matches the uid of the current logged in user.
TODO lockToFEGroups comma seperated list group ids that are allowed to use this plugin.
***Fields comma seperated list list of database fields that are allowed for particular functions eg list,view,...
allow*** boolean(1/0) user interface features to enable
* By using typoscript conditions based on group membership it is possible to customise the available field lists for different user groups.
Where lockToFEUser and lockToFEGroups is disabled, if allowEdit or allowDelete are enabled a warning message is displayed about insecure configuration unless uiconfig.forcePublicEditing is enabled.
Alternatively different user interfaces can be presented to different user groups by creating multiple custom configured pages with group level access control enabled.
setFixed authentication
Known problems¶
To-Do list¶
A wish list of things you want to add or fix. This includes smaller problems/bugs which are best described as a todo item.
HIGH
documentation
manual
t3d examples - fields test,accounts,portal,meetings/minutes,user registration/management
new extension using AI as library
- stdwrap for field level and template level output and per
- renderView,renderForm etc - TS formatting wraps instead of embedded HTML wrapping
- NOTE that stdWrap config is passed with and without dot
$this->cObj->stdWrap($this->conf["pollTablePid"],$this->conf["pollTablePid."])
stdWrap {
fieldWrap.wrap
inputFieldWrap.wrap
formWrap.wrap
viewWrap
searchFormWrap
searchFieldWrap
listItemWrap.wrap
listWrap.wrap
perFieldWrap {
name=<span class='name'>|</span>
- rationalise getMarkers - getInfoMailMarkers, ..?? so there is a standard set of extended markers available in all templates for things like user details and fakefield functions
- caching
typolink API
- API calls - sql, links, paths, file upload, method calls
- removal global $TCA, session, get etc
- multiple list outputs - piVar to select template/list alg
uiconfig.views {
0 {
template=mytemplatefile.html
listItemWrap.wrap
listWrap.wrap
}
1 {
}
pdf printing?
- multiple file upload input type
- consistent use of editableFields,viewableFields,......
- specialFields
- fakefields
- allColumns
field/fakefield name
- testing structure
use case testing
search fields
list
view
edit
save
delete
unit testing
rendering
db
search
save
load
- group based user authentication
allowed fields
restricting criteria
extract validation
single field type validation
uploadprocessing
-> implement confirmaftersave
- flex forms
Visions for what the extension could become with more development.
Changelog¶
1.3.1
extract model/view/controller/validator/email
date fields
searchbox date fields
javadoc comments
remove print functions
fix bug with m2m selectors - all selected on edit
1.3.2
- fix view before edit
- convert links to form buttons everywhere with std style
- convert links to buttons to simplify CSS for 'actions'
- camelCase & case insensitive config
- tolowercase all config keys
- flatten all capitalised config tests
fix autosearch/default search behavior. All parameters now independant.
depreciate searchFields ?? - fix so that whatever is default works properly
update manual to include complete reference section
1.3.3
* AJAX multiple file upload
* dbal compliance
except
hack for post override - TOBE REMOVED
// TODO split the foreign_table_where string by "order by"
exec_SELECT with table -> includes 'left join blah b on a.uid=b.uid'
* 90% coding standards compliance
todo
still some double quotes/unquoted fieldnames in arrays
file management and includes
locales
- API calls - sql, links, paths, file upload, method calls
- removal global $TCA, session, get etc
* full load join fields for loadRecord as well as dbSearch
* remove add new link when editing a form
* consistent use of editableFields,viewableFields,......
SEE MANUAL (technical discussion) FOR details
* fix default search behavior to include start pos when returning to search
BUG FIXES
dup display errors on form - top and per field
lost click to focus search box
edit dependant child broken
based on fakefields
paginator shows CMD=save in link after view/back
view file list to split by comma and allow for various file types
remove post insert configuration
1.3.4
* TS cObj based rendering and configuration
TS control of image/other?? rendering using cobj
* categorised list rendering
* multiple list/view outputs - piVar to select template/list conf set
* include default TCA information for fields deleted,cruser_id,tstamp,crdate to replace specialFields treatment
* special fields replaced by defaultTCA config for deleted,crdate,tstamp and cruser_id which do not normally have TCA meta data.
* individual markers for buttons
move buttons into rendering configuration
gifbuilder buttons
SEE STATIC TEMPLATE graphic buttons
* automatic search and maxListRows for popup relationship selector
* BUG FIXES
using HTTP_POST?GET_VARS in populist relationship selector - replaced by _GET/POST
pagination
passing date criteria through hidden forms (pagination) broken for date criteria see view line 1350
EXT: Admin Interface - 26