.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ==================== 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: EXT: Admin Interface ==================== Extension Key: **admin\_interface** Copyright 2000-2002, 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: 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: Introduction ------------ .. _What-does-it-do: 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: Screenshots ^^^^^^^^^^^ Configuration involves inserting the admin\_interface plugin in a page and creating a TS template record on that page. |img-1| Results in front end list and search form |img-2| With buttons linking to editing forms |img-3| .. _Users-manual: 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: FAQ ^^^ .. _Administration: 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: FAQ ^^^ .. _Configuration: Configuration ------------- In this section, constants are gathered into functional sets with brief descriptions or examples. For details see the reference section. .. _Configuring-available-fields: 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: Configuring behaviors ^^^^^^^^^^^^^^^^^^^^^ - uiconfig - uiconfig.allowdelete - uiconfig.allowedit - uiconfig.allownew - uiconfig.allowprint - uiconfig.disableview - uiconfig.viewbeforeedit - uiconfig.autosearch .. _Search-Configuration: 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: 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: Configuring field customisations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ override and fakefields .. _Configuring-validation: 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: Configuring Email notifications ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - emailOn - infoMail - setfixed .. _Configuring-Database-Relationships: 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=|
Name###addlink###
edit=###name### ###editlink### . 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 ^^^^^^^^^^^^^^ 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: Creating Dependant Fields and Dependant Search Fields ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - type field and fakefields - .. _Other-Cusomisations: Other Cusomisations ^^^^^^^^^^^^^^^^^^^ XCLASSES, method override, php templates .. _Behavior-Customisation-using-TS-tests: 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: 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: Reference --------- .. _TS-Configuration-Options: TS Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^ Global configuration options affecting a range of behaviours. .. ### BEGIN~OF~TABLE ### .. _table: table """"" .. container:: table-row Property table Data type text Description Name of the database table to administer. REQUIRED. Default none .. _template: template """""""" .. container:: table-row Property template Data type filename Description Template file used with markers for major components including search form,list,form,view. Default none .. _fileUploadPath: fileUploadPath """""""""""""" .. container:: table-row Property fileUploadPath Data type path Description wher e are associated files uploaded. Default Defaults to extension directory for the table being edited. .. _debug: debug """"" .. container:: table-row Property debug Data type boolean(1/0) Description Show additional debug output? Default 0 .. _IncludeLibs: IncludeLibs """"""""""" .. container:: table-row 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: include """"""" .. container:: table-row 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: globalIncludes """""""""""""" .. container:: table-row 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: setFixedMD5Salt """"""""""""""" .. container:: table-row 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: loadTCA """"""" .. container:: table-row 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: lockToFEUser """""""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Section-join: 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. .. ### BEGIN~OF~TABLE ### .. _alias: alias """"" .. container:: table-row Property alias Data type text Description shorthand alias to the main table Default .. _join-0-table: join.0.table """""""""""" .. container:: table-row Property join.0.table Data type text Description additional table to join Default .. _join-0-alias: join.0.alias """""""""""" .. container:: table-row Property join.0.alias Data type text Description shorthand alias to additional table Default .. _join-0-condition: join.0.condition """""""""""""""" .. container:: table-row 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: join.0.fields """"""""""""" .. container:: table-row 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: join.0.requireJoinValue """"""""""""""""""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Section-record: 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. .. ### BEGIN~OF~TABLE ### .. _listFields: listFields """""""""" .. container:: table-row Property listFields Data type comma seperated list Description Fields to display in the list view. Default label field .. _editFields: editFields """""""""" .. container:: table-row Property editFields Data type comma seperated list Description Fields to display in the form Default all fields .. _viewFields: viewFields """""""""" .. container:: table-row Property viewFields Data type comma seperated list Description Fields to display in the view Default all fields .. _editViewFields: editViewFields """""""""""""" .. container:: table-row 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: infoMailFields """""""""""""" .. container:: table-row Property infoMailFields Data type comma seperated list Description Fields to show when QUICKVIEW marker is used in an infomail template. Default .. _selectFields: selectFields """""""""""" .. container:: table-row 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: insertFields """""""""""" .. container:: table-row 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: updateFields """""""""""" .. container:: table-row Property updateFields Data type comma seperated list Description List of fields in the main table in an update query. Default all database columns .. _listTotalFields: listTotalFields """"""""""""""" .. container:: table-row Property listTotalFields Data type comma seperated list Description Fields to tally when generating a list. Default none .. _sortFields: sortFields """""""""" .. container:: table-row Property sortFields Data type comma seperated list Description Fields to sort the results by Default .. _groupByFields: groupByFields """"""""""""" .. container:: table-row Property groupByFields Data type comma seperated list Description Fields to group the results by Default .. _requiredFields: requiredFields """""""""""""" .. container:: table-row Property requiredFields Data type comma seperated list Description Fields for which values are required on form validation Default none .. _uniqueFields: uniqueFields """""""""""" .. container:: table-row Property uniqueFields Data type comma seperated list Description Fields for which values must be unique on form validation Default none .. _specialFieldLabels: specialFieldLabels """""""""""""""""" .. container:: table-row 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 .. _setHidden: setHidden """"""""" .. container:: table-row Property setHidden Data type boolean(1/0) Description Should records be set hidden=1 when they are saved? Default 0 .. ###### END~OF~TABLE ###### .. _generated: ((generated)) """"""""""""" .. _Subsection-FakeFields: 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. .. ### BEGIN~OF~TABLE ### .. _record-fakeFields: record.fakeFields. '''''''''''''''''' .. container:: table-row 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 .. _record-fakeFields-fieldName-label: record.fakeFields.$fieldName.label '''''''''''''''''''''''''''''''''' .. container:: table-row Property record.fakeFields.$fieldName.label Data type text Description label for fake field Default .. _record-fakeFields-fieldName-override: record.fakeFields.$fieldName.override ''''''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. _record-fakeFields-fieldName-foreign-table: record.fakeFields.$fieldName.foreign\_table ''''''''''''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. _record-fakeFields-fieldName-foreign-table-fk: record.fakeFields.$fieldName.foreign\_table\_fk ''''''''''''''''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. _record-fakeFields-fieldName-foreign-editing-pid: record.fakeFields.$fieldName.foreign\_editing\_pid '''''''''''''''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.fakeFields.$fieldName.foreign\_editing\_pid Data type uid for page configured to edit child records Description none Default .. ###### END~OF~TABLE ###### .. _Subsection-inputRender: 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=|
Name###addlink###
edit=###name### ###editlink### } } .. ### BEGIN~OF~TABLE ### .. _record-inputrender: record.inputrender. ''''''''''''''''''' .. container:: table-row Property record.inputrender. Data type array Description configuration of relationship manager for 12M popup search and select Default none .. _record-inputrender-fieldName-type: record.inputrender.$fieldName.type '''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.type Data type text Description unused. must have the value- popupsearch Default none .. _record-inputrender-fieldName-editpid: record.inputrender.$fieldName.editpid ''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.editpid Data type integer Description uid for page configured for editing of child records Default none .. _record-inputrender-fieldName-extrawhere: record.inputrender.$fieldName.extrawhere '''''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.extrawhere Data type text Description extra sql condition to popup search results Default none .. _record-inputrender-fieldName-sortfields: record.inputrender.$fieldName.sortfields '''''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.sortfields Data type comma seperated list Description popup search is sorted by these fields Default none .. _record-inputrender-fieldName-popupListFields: record.inputrender.$fieldName.popupListFields ''''''''''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.popupListFields Data type comma seperated list Description fields to be shown in the popup search Default none .. _record-inputrender-fieldName-format-edit-text: record.inputrender.$fieldName.format.edit text '''''''''''''''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. _record-inputrender-fieldName-format-wrap: record.inputrender.$fieldName.format.wrap ''''''''''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. _record-inputrender-fieldName-maxListRows: record.inputrender.$fieldName.maxListRows ''''''''''''''''''''''''''''''''''''''''' .. container:: table-row Property record.inputrender.$fieldName.maxListRows Data type integer Description maximum results to display in popup selection box Default 20 .. ###### END~OF~TABLE ###### .. _Defaults-and-Overrides: Defaults and Overrides ~~~~~~~~~~~~~~~~~~~~~~ .. ### BEGIN~OF~TABLE ### .. _defaults: defaults '''''''' .. container:: table-row 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 .. _defaults-createonly: defaults.createonly ''''''''''''''''''' .. container:: table-row Property defaults.createonly Data type array Description Default .. _overrides: overrides ''''''''' .. container:: table-row 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 .. _overrides-createonly: overrides.createonly '''''''''''''''''''' .. container:: table-row Property overrides.createonly Data type array Description Default .. ###### END~OF~TABLE ###### .. ### BEGIN~OF~TABLE ### .. _record-postinsert-override-cruser: record.postinsert.override\_cruser '''''''''''''''''''''''''''''''''' .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Subsection-record-searchBoxFields: 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. .. ### BEGIN~OF~TABLE ### .. _fieldname-label: $fieldname.label '''''''''''''''' .. container:: table-row Property $fieldname.label Data type locallang Description Description for search box field Default empty .. _fieldname-type: $fieldname.type ''''''''''''''' .. container:: table-row Property $fieldname.type Data type text Description Picklist type could be text,picklist,daterange,picklist\_custom,value\_range,hidden Default none .. _fields: fields '''''' .. container:: table-row Property fields Data type comma seperated list Description Fields to be searched. daterange,picklist,value\_range can only specify a single field Default none .. _fieldname-minvalues: $fieldname.minvalues '''''''''''''''''''' .. container:: table-row Property $fieldname.minvalues Data type comma seperated list Description Discrete values to show in select box for minimum selection Default .. _fieldname-maxvalues: $fieldname.maxvalues '''''''''''''''''''' .. container:: table-row Property $fieldname.maxvalues Data type comma seperated list Description Discrete values to show in select box for maximum selection Default .. _fieldname-exact: $fieldname.exact '''''''''''''''' .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Subsection-record-TCA: Subsection record.TCA ~~~~~~~~~~~~~~~~~~~~~ \- simply overrides TCA \- TODO give explanation about how much TCA is implemented .. _Section-uiconfig: Section uiconfig ^^^^^^^^^^^^^^^^ Enable/disable functionality using the allowField. Various constants controlling behavior and to some extent rendering. .. ### BEGIN~OF~TABLE ### .. _allownew: allownew """""""" .. container:: table-row Property allownew Data type boolean(1/0) Description show add new link Default 1 .. _autosearch: autosearch """""""""" .. container:: table-row Property autosearch Data type boolean(1/0) Description remove search box and list all records (given other filters) Default 0 .. _viewbeforeedit: viewbeforeedit """""""""""""" .. container:: table-row Property viewbeforeedit Data type boolean(1/0)=0 Description list links to view of record prior to editing Default 0 .. _allowedit: allowedit """"""""" .. container:: table-row Property allowedit Data type boolean(1/0)=1 Description show link from view/list to edit Default 0 .. _allowdelete: allowdelete """"""""""" .. container:: table-row Property allowdelete Data type boolean(1/0)=1 Description show link from view/list to delete Default 0 .. _allowprint: allowprint """""""""" .. container:: table-row Property allowprint Data type boolean(1/0)=1 Description show link from view/list to print record Default 0 .. _allowView: allowView """"""""" .. container:: table-row Property allowView Data type boolean(1/0) Description enable viewing of record Default 1 .. _sortableLists: sortableLists """"""""""""" .. container:: table-row 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: sortableLists. """""""""""""" .. container:: table-row 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: filterByUser """""""""""" .. container:: table-row 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: childEditingOnly """""""""""""""" .. container:: table-row 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: loginPage """"""""" .. container:: table-row 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 .. _filterHidden: filterHidden """""""""""" .. container:: table-row Property filterHidden Data type boolean(1/0) Description dont show record with hidden flag set DEPRECIATED Default 1 .. _filterExtra: filterExtra """"""""""" .. container:: table-row 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: filterExtra. """""""""""" .. container:: table-row 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: defaultSearch """"""""""""" .. container:: table-row Property defaultSearch Data type sql string Description when the search criteria is empty use default search Default (1=1) .. _searchFormPosn: searchFormPosn """""""""""""" .. container:: table-row 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: labels """""" .. container:: table-row Property labels Data type Description array Default .. _maxListRows: maxListRows """"""""""" .. container:: table-row Property maxListRows Data type integer Description maximim rows to show in list output Default 500 .. _inputSize: inputSize """"""""" .. container:: table-row Property inputSize Data type integer Description width of text box Default none .. _textAreaWidth: textAreaWidth """"""""""""" .. container:: table-row Property textAreaWidth Data type integer Description width of textarea Default none .. _finaliseAfterSave-template: finaliseAfterSave.template """""""""""""""""""""""""" .. container:: table-row Property finaliseAfterSave.template Data type text Description Text containing HTML to display after a successful insert. Default .. _emailNotify-update: emailNotify.update.??? """""""""""""""""""""" .. container:: table-row Property emailNotify.update.??? Data type Description Default .. _editForm-hideSave: editForm.hideSave """"""""""""""""" .. container:: table-row Property editForm.hideSave Data type boolean(1/0) Description Hide save button on forms Default 0 .. _editForm-hideSaveAndClose: editForm.hideSaveAndClose """"""""""""""""""""""""" .. container:: table-row Property editForm.hideSaveAndClose Data type boolean(1/0) Description Hide save and close buttons on forms Default 0 .. _editForm-hideClose: editForm.hideClose """""""""""""""""" .. container:: table-row Property editForm.hideClose Data type boolean(1/0) Description Hide close button on forms Default 0 .. _linkposn: linkposn """""""" .. container:: table-row Property linkposn Data type text Description where to put the list links right (default if empty) or left Default none .. ###### END~OF~TABLE ###### .. _Section-renderingresources: Section renderingresources ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _form: form """" .. container:: table-row Property form Data type cObj Description HTML template embeded in TS. If set, this takes priority for template data. Default none .. _Unknown-Property: ((Unknown Property)) """""""""""""""""""" .. container:: table-row Property Data type Description .. _view: view """" .. container:: table-row Property view Data type filename Description Filename to use as template. eg EXT:admin\_interface/pi1/example\_templates.html Default none .. _list: list """" .. container:: table-row Property list Data type subpart key Description Subpart of template file to use Default none .. _searchform: searchform """""""""" .. container:: table-row Property searchform Data type fieldname Description Categorise list templates by this field. TODO implement this Default none .. ###### END~OF~TABLE ###### .. _Section-infomail: Section infomail ^^^^^^^^^^^^^^^^ Note that default infomail configuration exists for insert,update,delete,view,setfixed\_approve eg :: insert { template.text=###SYS_SETFIXED_EDIT###
###SYS_SETFIXED_APPROVE### ###SYS_SETFIXED_DELETE###
A new record has been created
###QUICKVIEW###
to.email={$admin_email} subject=Record Created from.email={$from_email} } .. ### BEGIN~OF~TABLE ### .. _infomailKey-template: $infomailKey.template. """""""""""""""""""""" .. container:: table-row Property $infomailKey.template. Data type array Description template configuration for infomail. See template section above for subfields. Default none .. _infomailKey-to-email: $infomailKey.to.email """"""""""""""""""""" .. container:: table-row Property $infomailKey.to.email Data type text Description where to send the message. Default .. _infomailKey-to-emailMarker: $infomailKey.to.emailMarker """"""""""""""""""""""""""" .. container:: table-row Property $infomailKey.to.emailMarker Data type text Description Marker to use as destination email address derived from rendering markers Default none .. _infomailKey-to-admin: $infomailKey.to.admin """"""""""""""""""""" .. container:: table-row Property $infomailKey.to.admin Data type text Description static email address to send a duplicate of the email. Default none .. _infomailKey-subject: $infomailKey.subject """""""""""""""""""" .. container:: table-row Property $infomailKey.subject Data type text Description subject for the message Default .. _infomailKey-subjectAdmin: $infomailKey.subjectAdmin """"""""""""""""""""""""" .. container:: table-row Property $infomailKey.subjectAdmin Data type text Description subject for the message sent to the admin email address Default .. _infomailKey-from-email: $infomailKey.from.email """"""""""""""""""""""" .. container:: table-row Property $infomailKey.from.email Data type text Description sender email address for the sent messages Default none .. _infomailKey-from-emailMarker: $infomailKey.from.emailMarker """"""""""""""""""""""""""""" .. container:: table-row Property $infomailKey.from.emailMarker Data type text Description Marker to use as email address for sent messages derived from rendering markers Default none .. ###### END~OF~TABLE ###### .. _Section-emailOn: Section emailOn ^^^^^^^^^^^^^^^ This section is used in conjunction with the infomail section to define when notification emails should be sent. .. ### BEGIN~OF~TABLE ### .. _action-infomailKey: action=$infomailKey """"""""""""""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Section-setfixed: 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. .. ### BEGIN~OF~TABLE ### .. _template-OK: template\_OK. """"""""""""" .. container:: table-row 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: template\_FAIL. """"""""""""""" .. container:: table-row 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: commands.$cmdKey.fields. """""""""""""""""""""""" .. container:: table-row 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: commands.$cmdKey.label """""""""""""""""""""" .. container:: table-row Property commands.$cmdKey.label Data type text Description Label for setfixed command link Default .. _commands-cmdKey-template-OK: commands.$cmdKey.template\_OK. """""""""""""""""""""""""""""" .. container:: table-row 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: commands.$cmdKey.template\_FAIL. """""""""""""""""""""""""""""""" .. container:: table-row 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: commands.DELETE. """""""""""""""" .. container:: table-row 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: commands.EDIT. """""""""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Section-upload: Section upload ^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _allowed: allowed """"""" .. container:: table-row Property allowed Data type comma seperated list Description file types that can be uploaded via the front end Default gif,jpg,png,txt .. _images: images """""" .. container:: table-row Property images Data type comma seperated list Description file types that are treated as images Default gif,jpg,png,jpeg .. ###### END~OF~TABLE ###### .. _Section-rte: 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 .. ### BEGIN~OF~TABLE ### .. _showButtons: showButtons """"""""""" .. container:: table-row 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. 2. Ordering of buttons must be done with page TS. Default From page TSCONFIG RTE.default.FE.showButtons .. _stdWrap: stdWrap. """""""" .. container:: table-row Property stdWrap. Data type stdWrap array Description stdWrap configuration for processing of RTE text before rendering Default brTag =
parseFunc < styles.content.parseFunc .. ###### END~OF~TABLE ###### .. _Section-functionOverride: 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. .. ### BEGIN~OF~TABLE ### .. _renderForm: renderForm """""""""" .. container:: table-row 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: renderList """""""""" .. container:: table-row 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: renderView """""""""" .. container:: table-row 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: renderSearchForm """""""""""""""" .. container:: table-row 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: dbDelete """""""" .. container:: table-row Property dbDelete Data type Description Default .. _dbSearch: dbSearch """""""" .. container:: table-row Property dbSearch Data type Description Default .. _processDataValues: processDataValues """"""""""""""""" .. container:: table-row Property processDataValues Data type Description Default .. _parseDate: parseDate """"""""" .. container:: table-row Property parseDate Data type Description Default .. ###### END~OF~TABLE ###### .. _Technical-Discussion: Technical Discussion -------------------- .. _Field-Selections: 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: Global and Class Variables ^^^^^^^^^^^^^^^^^^^^^^^^^^ \- better as functions?? conf piVars [DATA] [search] controller variables .. _Access-Controls: 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: Known problems -------------- - - .. _To-Do-list: 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=| - :: - 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: 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 |img-4| EXT: Admin Interface - 26 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.jpeg .. :align: left .. :border: 0 .. :height: 112 .. :id: graphics1 .. :name: graphics1 .. :width: 557 .. |img-2| image:: img-2.jpeg .. :align: left .. :border: 0 .. :height: 331 .. :id: graphics2 .. :name: graphics2 .. :width: 271 .. |img-3| image:: img-3.jpeg .. :align: left .. :border: 0 .. :height: 318 .. :id: graphics3 .. :name: graphics3 .. :width: 451 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102