.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ================================================================ 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 |img-1| |img-2| EXT: Extend the Constant Editor & settings of exts inside the EM - constantsextended .. _EXT-Extend-the-Constant-Editor-settings-of-exts-inside-the-EM: 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, 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: Table of Contents ----------------- `EXT: Extend the t Editor & settings of exts inside the EM 1 <#1.EXT:% 20Extend%20the%20t%20Editor%20&%20settings%20of%20exts%20inside%20the% 20EM|outline>`_ **`Introduction 3 <#1.1.Introduction|outline>`_** `What does it do? 3 <#1.1.1.What%20does%20it%20do_|outline>`_ `Screenshots 3 <#1.1.2.Screenshots|outline>`_ **`Users manual 5 <#1.2.Users%20manual|outline>`_** **`Configuration 6 <#1.3.Configuration|outline>`_** `Adding the options to your extension 6 <#1.3.1.Adding%20the%20options%20to%20your%20extension|outline>`_ `General settings 6 <#1.3.2.General%20settings|outline>`_ `Option “Textarea” 6 <#1.3.3.Option%20%E2%80%9CTextarea%E2%80%9D|outline>`_ `Option “Page selector” 7 <#1.3.4.Option%20%E2%80%9CPage%20selector%E2%80%9D|outline>`_ `Option “Record list” 7 <#1.3.5.Option%20%E2%80%9CRecord%20list%E2%80%9D|outline>`_ `Option “Image” 7 <#1.3.6.Option%20%E2%80%9CImage%E2%80%9D|outline>`_ `Option “Iframe” 7 <#1.3.7.Option%20%E2%80%9CIframe%E2%80%9D|outline>`_ `Option “HTML” 8 <#1.3.8.Option%20%E2%80%9CHTML%E2%80%9D|outline>`_ `Other options 8 <#1.3.9.Other%20options|outline>`_ **`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: Introduction ------------ .. _What-does-it-do: 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: Screenshots ^^^^^^^^^^^ The screenshots should show an example how it can look like. |img-3| **Image 1:** Extended Constant Editor |img-4| **Image 2:** Extended settings in the Extension Manager .. _Users-manual: 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: 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: Adding the options to your extension ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There are 2 possible places for the options. .. _To-the-Constant-Editor: 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 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: 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: How to call it """""""""""""" To get to the new options, you need to add the following snippet to the 1 :sup:`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: **Specific settings** """"""""""""""""""""" Most of the new options can be configured by adding a snippet like this to the 1 :sup:`st` line. :: settings=key1:value1,key2:value2,key3:value3 Read the next sections about the details .. _Option-Textarea: 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: **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: .. ### BEGIN~OF~TABLE ### .. _width: width ~~~~~ .. container:: table-row Key width Example for the value 300px Description Width of the textarea .. _height: height ~~~~~~ .. container:: table-row Key height Example for the value 50px Description Height of the textarea .. ###### END~OF~TABLE ###### .. _Important: 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: 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]; .. _Options: Options """"""" .. ### BEGIN~OF~TABLE ### .. _formName: formName ~~~~~~~~ .. container:: table-row Key formName Example for the value tsStyleConfigForm Description Set the name of the form in which the page selector is used. If you are using this option inside the extension managers settings, set it to tsStyleConfigForm, otherwise it can be empty. Default is “editForm” .. ###### END~OF~TABLE ###### .. _Option-Record-list: 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: **Options** """"""""""" The only required option is the name of the table. All others are optional: .. ### BEGIN~OF~TABLE ### .. _table: table ~~~~~ .. container:: table-row Key table Example for the value pages, tt\_content Description Table name .. _where: where ~~~~~ .. container:: table-row Key where Example for the value Name!=””, ... Description Where clause .. _orderBy: orderBy ~~~~~~~ .. container:: table-row Key orderBy Example for the value Name desc, name asc, uid,... Description Order by .. _limit: limit ~~~~~ .. container:: table-row Key limit Example for the value 2,10,100,1000,... Description Limit the result set .. ###### END~OF~TABLE ###### .. _Option-Image: 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]; .. _Options: **Options** """"""""""" Only one option and this is required. .. ### BEGIN~OF~TABLE ### .. _file: file ~~~~ .. container:: table-row Key file Example for the value fileadmin/fo/abc.gif, typo3conf/ext/foobar/abc.gif Description Path to the image .. ###### END~OF~TABLE ###### .. _Option-Iframe: 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: **Options** """"""""""" All options are the same as the attributes of the HTML object iframe (besides the https). No limitation. .. ### BEGIN~OF~TABLE ### .. _src: src ~~~ .. container:: table-row 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: https ~~~~~ .. container:: table-row Key https Example for the value 0 or 1 Description If 1, the url will be prepended with https://, otherwise with http:// .. _width: width ~~~~~ .. container:: table-row Key width Example for the value 200, 30,.. Description Width of the iframe .. _height: height ~~~~~~ .. container:: table-row Key height Example for the value 200, 300 Description Height of the iframe .. ###### END~OF~TABLE ###### .. _Option-HTML: 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: **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. .. ### BEGIN~OF~TABLE ### .. _: : ~ .. container:: table-row Original character : Should be #58# .. _: ; ~ .. container:: table-row Original character ; Should be #59# .. _: , ~ .. container:: table-row Original character , Should be #44# .. ###### END~OF~TABLE ###### .. _Options: **Options** """"""""""" There is one option which is required .. ### BEGIN~OF~TABLE ### .. _code: code ~~~~ .. container:: table-row Key code Example for the value

Foo

Description Your HTML code .. ###### END~OF~TABLE ###### .. _Other-options: 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: 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: Known problems -------------- - The extension needs at least TYPO3 4.2.0 - There are no other problems I am aware of. .. _To-Do-list: To-Do list ---------- Nothing for now .. _ChangeLog: ChangeLog --------- See the changelog file 12 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 349 .. :id: Grafik1 .. :name: Grafik1 .. :width: 398 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 646 .. :id: Grafik3 .. :name: Grafik3 .. :width: 456