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: Extend the Constant Editor & settings of exts inside the EM¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2009-07-06T19:16:31.650000000 |
Classification: | constantsextended |
Keywords: | constant editor, constants, extension manager settings |
Author: | Georg Ringer |
Email: | http://www.ringer.it |
Info 4: | |
Language: | en |
EXT: Extend the Constant Editor & settings of exts inside the EM - constantsextended
EXT: Extend the Constant Editor & settings of exts inside the EM¶
Extension Key: constantsextended
Language: en
Keywords: constant editor, constants, extension manager settings
Copyright 2000-2008, Georg Ringer, <http://www.ringer.it>
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.org
Table of Contents¶
EXT: Extend the t Editor & settings of exts inside the EM 1
`Introduction 3 <#1.1.Introduction|outline>`_
`Users manual 5 <#1.2.Users%20manual|outline>`_
`Configuration 6 <#1.3.Configuration|outline>`_
Adding the options to your extension 6
`You like the extension? 9 <#1.4.You%20like%20the%20extension_|outline>`_
`Known problems 10 <#1.5.Known%20problems|outline>`_
`To-Do list 11 <#1.6.To-Do%20list|outline>`_
`ChangeLog 12 <#1.7.ChangeLog|outline>`_
Introduction¶
What does it do?¶
This extension is for other extension developers only and doesn't produce any output! It allows other developers to have more available options inside the Constant Editor and the settings for extensions which can be done in the Extension Manager.
Current Available options are:
- Textarea
- Page selector,using the popup to select a page
- A record selector, using any table you like displayed as select field
- Plain image
- Iframe
- Plain HTML code
Screenshots¶
The screenshots should show an example how it can look like.
Image 1: Extended Constant Editor
Image 2: Extended settings in the Extension Manager
Users manual¶
Because this extension doesn't have an output, this chapter describes how you get the demo output inside your installation. Follow this steps:
Install the extension
Press the “Update” button to view the settings you can make inside the extension manager.
Go to your root page or any page where you have gotten a template record.
Include the static template “ DEMO Constants Extended ”.
Change to the “Constant Editor” and select “PLUGINS.CONSTANTSEXTENDED”.
This is everything!
Play around and if you find one of the new options useful, take a look at the next chapters to know how to icnlude those options into your own extensions!
Configuration¶
This chapter describes how you get the new options inside your own extension. This chapter won't describe how to create an extension!
Adding the options to your extension¶
There are 2 possible places for the options.
To the Constant Editor¶
To add the options to the Constant Editor you either add the code to the ext_typoscript_constants.txt file in the root directory of your EXT or you use the static TS file.
You can find the demo file inside the directory static.
To the settings inside the Extension Manager¶
To add the options to the Extension Manager, you need to place the code inside the ext_conf_template.txt file.
You can find the demo file with the same name inside the root directory of the extension.
General settings¶
All new options are configured in nearly the same way.
A typical input field would look like
# cat=basic;type=int[0-800]; label=With of something: Set the width of something
width = 470
How to call it¶
To get to the new options, you need to add the following snippet to the 1 st line:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->XXXXXX];
- It doesn't matter at which position but important is that every section ends with a ;
- XXXXXX needs to be replaced with the correct name of the option. Please take a look at the next sections to get to know more about it.
Specific settings¶
Most of the new options can be configured by adding a snippet like this to the 1 st line.
settings=key1:value1,key2:value2,key3:value3
Read the next sections about the details
Option “Textarea”¶
The textarea allows you to save multiple lines instead of the boring input option.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->textarea];
Options¶
All options are optional and can be used to style the textarea with any css code you know (and which works with textareas). Those are just examples:
width¶
Key
width
Example for the value
300px
Description
Width of the textarea
height¶
Key
height
Example for the value
50px
Description
Height of the textarea
Important¶
Because of the postprocessing of the data it is not possible to save linebreaks! Therefore they are changed to '#####' before saving (by using JS) and back before showing them on the page! So you need to explode by '#####'.
Option “Page selector”¶
Be able to let the users select a page from the page tree instead of typing the ID of the page into an input field.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->page];
Option “Record list”¶
Be able to render any resultset of a table as a select field to let the user pick a specific record.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->recordList];
Options¶
The only required option is the name of the table. All others are optional:
table¶
Key
table
Example for the value
pages, tt_content
Description
Table name
where¶
Key
where
Example for the value
Name!=””, ...
Description
Where clause
orderBy¶
Key
orderBy
Example for the value
Name desc, name asc, uid,...
Description
Order by
limit¶
Key
limit
Example for the value
2,10,100,1000,...
Description
Limit the result set
Option “Image”¶
This option is mainly interesting inside the extension managers settings to display an image which can help the user with his decisions.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->image];
Option “Iframe”¶
Like the image you can use this option to include a help page which could be a normal frontend page or a static HTML page from somewhere else or whatever you want to have.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->iframe];
Options¶
All options are the same as the attributes of the HTML object iframe (besides the https). No limitation.
src¶
Key
src
Example for the value
www.typo3.org , www.yourdomain.com/help.html
Description
Don't use the http:// there and start with the www. or withozt it. If you need https, take a look at the next line
https¶
width¶
Key
width
Example for the value
200, 30,..
Description
Width of the iframe
height¶
Key
height
Example for the value
200, 300
Description
Height of the iframe
Option “HTML”¶
Use this option to display plain HTML code to do whatever you want.
It is called by using:
type=user[EXT:constantsextended/class.tx_constantsextended.php:&tx_constantsextended->html];
Important¶
You need to be aware that you can't use any of the following characters: : , ;
If you still need those, for example to set a class or whatever, you need to replace them first with something else. It will be replaced to the original character before output.
:¶
Original character
:
Should be
#58#
;¶
Original character
;
Should be
#59#
,¶
Original character
,
Should be
#44#
Other options¶
If you need other things, write to me or much better: Do them yourself and send me a patch!
You like the extension?¶
I didn't have much work with this extension but it should be still honored. So if you like this extension, you can do one or more of the following things:
- Write me a mail or create a posting at http://www.rggooglemap.com/dev/constantsextended.html .
- Please rate the extension in the Repository: http://typo3.org/extensions/ search for constantsextended , click on the title and then at “Ratings” (You need to be registered and logged in at typo3.org)
One of those things is the least you can do for getting all those great extensions completely for free!
Known problems¶
- The extension needs at least TYPO3 4.2.0
- There are no other problems I am aware of.
To-Do list¶
Nothing for now