.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ======================== EXT: RTE Generic Records ======================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Chi Hoang :Changed: 2009-03-04T16:48:16 :Email: info@chihoang.de :Info 2: :Info 3: :Info 4: .. _EXT-RTE-Generic-Records: EXT: RTE Generic Records ======================== Extension Key: **ch\_rterecords** Copyright 2006-2008, info@chihoang.de, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: RTE Generic Records 1** **Introduction 1** What does it do? 1 Requirements 1 Sponsors 1 Credits & Sponsors 1 Screenshots 2 **Adminstration 3** 1. Installation3 2. userFunc 3 3. Custom Label 4 4. Default Page 4 5. Problems 4 Reference 4 **Tutorial 5** **Known problems 5** **To-Do list 6** **Changelog 6** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension makes it possible to hyperlink any record in your favorite RTE by adding a new tab “Link record”. Currently this extension only supports the RTE “rtehtmlarea”. .. _Requirements: Requirements ^^^^^^^^^^^^ Typo3 3.8.0-Typo3 4.0.0, Typo3 4.2.0+. Typo3 Versions 4.0.0 – 4.2.0 are NOT supported. See chapter “Known problems” for more informations. It works best with Typo3 4.2.0 and rtehtmlarea 1.77. .. _Sponsors: Sponsors ^^^^^^^^ You may sponsor further development of this extension by sending your contribution to the author. Any donation is greatly welcome! My paypal account is chibo@gmx.de. .. _Credits-Sponsors: Credits & Sponsors ^^^^^^^^^^^^^^^^^^ Alexander Johne (Founder Takomat Gbr) for the Icon. Sven Holze for sponsoring. Typoheads GmbH / `www.typoheads.at `_ for sponsoring. Ndh for cool code suggestions and patches. Frans Storr-Hansen for sponsoring. Bioversity for coding. .. _Screenshots: Screenshots ^^^^^^^^^^^ .. _img-1: |img-1| ^^^^^^^ .. _Adminstration: Adminstration ------------- .. _1-Installation: 1. Installation ^^^^^^^^^^^^^^^ To install “RTE Generic Records” you must define a Typoscript object “ux\_linkrecord”. Please take a look at the ext\_tables.php file. The Typoscript object for the tt\_news extension could be looking like this: :: t3lib_extMgm::addUserTSConfig(' ux_linkRecord { 1 { table=tt_news GPparamUID=tx_ttnews[tt_news] GPparamCMD=tx_ttnews[mode]=single singlePID=10 GPparamBackPid=tx_ttnews[backpid] backPid=20 } 2 { table=tt_foo_1 GPparamUID=tx_ttfoo1[tt_foo_1] GPparamCMD=tx_ttfoo1[mode]=single singlePID=10 GPparamBackPid=tx_ttfoo1[backpid] backPid=20 } 3 { table=tt_foo_2 GPparamUID=tx_ttfoo2[tt_foo_2] GPparamCMD=tx_ttfoo2[mode]=single singlePID=10 GPparamBackPid=tx_ttfoo2[backpid] backPid=20 } etc. pp. ); You may add the Typoscript object to the Backend-User configuration, too. :: |img-2| .. _2-userFunc: 2. userFunc ^^^^^^^^^^^ You can define a userFunc to generate links: :: ux_linkRecord { 1 { table=tt_news GPparamUID=tx_ttnews[tt_news] GPparamCMD=tx_ttnews[mode]=single singlePID=10 GPparamBackPid=tx_ttnews[backpid] backPid=20 userFunc=renderProductLink } Example for a userfunc: :: function user_renderProductLink($params){ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('category','tx_my_products','uid = '.$params['uid']); $record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); return 'link_record(\''.$params['uid'].'\',\''.$params['GPparamUID'].'\',\''.$params['GPparamCMD'].'\',\''.$record['category'].'\',\''.$params['GPparambackPid'].'\',\''.$params['backPid'].'\',\''.$params['no_cache'].'\')'; } .. _3-Custom-Label: 3. Custom Label ^^^^^^^^^^^^^^^ You can define a custom label, if the default label is not suiting your installation: :: ux_linkRecord { 1 { table=tt_news GPparamUID=tx_ttnews[tt_news] GPparamCMD=tx_ttnews[mode]=single singlePID=10 GPparamBackPid=tx_ttnews[backpid] backPid=20 browseTabLabel=Foobar } .. _4-Default-Page: 4. Default Page ^^^^^^^^^^^^^^^ :: You can define a default page to expand when hyperlinking a record: ux_linkRecord { 1 { table=tt_news GPparamUID=tx_ttnews[tt_news] GPparamCMD=tx_ttnews[mode]=single singlePID=10 GPparamBackPid=tx_ttnews[backpid] backPid=20 defaultExpandPage=666 } .. _5-Problems: 5. Problems ^^^^^^^^^^^ If you have problem with additional Get-Parameter you may try this RTE-Configuration: :: RTE.default.addParams { cleanup=false } .. _Reference: Reference ^^^^^^^^^ Typoscript “ux\_linkrecord” object (see ext\_tables.php) .. ### BEGIN~OF~TABLE ### .. _table: table """"" .. container:: table-row Property table Data type string Description The table to choose the records from. Default tx\_chfoobar\_location .. _GPparamUID: GPparamUID """""""""" .. container:: table-row Property GPparamUID Data type string Description The UID-Key. Required. Default tx\_chfoobar\_pi1[uid] .. _GPparamCMD: GPparamCMD """""""""" .. container:: table-row Property GPparamCMD Data type string Description The CMD-Key and Value. Optional. Default tx\_chfobbar\_pi1[mode]=general .. _singlePID: singlePID """"""""" .. container:: table-row Property singlePID Data type integer Description The PID of the Single View . Required. Default 1 .. _GPparambackPid: GPparambackPid """""""""""""" .. container:: table-row Property GPparambackPid Data type boolean Description The BackPID-Key of the Single View. Optional. Default NUL .. _backPid: backPid """"""" .. container:: table-row Property backPid Data type integer Description The BackPID. Optional. Default NUL .. _no-cache: no\_cache """"""""" .. container:: table-row Property no\_cache Data type integer Description Cache Setting. Optional Default 1 .. _browseTabLabel: browseTabLabel """""""""""""" .. container:: table-row Property browseTabLabel Data type string Description custom label Default NUL .. _userFunc: userFunc """""""" .. container:: table-row Property userFunc Data type string Description defining a userFunc to generate links (this is helpful if you want to define the target page for a link depending on a property of the linked record for example a category) Default NUL .. _defaultExpandPage: defaultExpandPage """"""""""""""""" .. container:: table-row Property defaultExpandPage Data type integer Description defining a default expand page for the browse links popup, so if you click on the"Link records" tab, the folder or page you defined is expanded and you can select arecord immediately. custom pid (PID of the page) Default NUL .. _Unknown-Property: ((Unknown Property)) """""""""""""""""""" .. container:: table-row Property Data type Description Default .. ###### END~OF~TABLE ###### .. _Tutorial: Tutorial -------- Install “htmlarea” Install “RTE Generic Records” from the TER (Typo3 Extension Repository) Add a new Typoscript Object “ux\_linkrecord” to the global UserTSconfig Add a userFunc Open the RTE Select a word to hyperlink Open Link Menu Click “Link record” Select a record .. _Known-problems: Known problems -------------- - 0003649: Fatal error: Call to a member function formWidth() on a non- object (Link: `http://bugs.typo3.org/view.php?id=3649 `_ ) - 0005723: Fatal error: Call to a member function formWidth() on a non- object (Link: `http://bugs.typo3.org/view.php?id=5723 `_ ) - This extension uses the XCLASS-Method to extend some classes from the rtehtmlarea and t3lib. Please use “The Power Extension Manager” (Link: `http://typo3.org/extensions/repository/view/ch\_lightem/1.0.28/ `_ ) to check for possible XCLASS conflicts. - `http://bugs.typo3.org/view.php?id=8604 `_ - Tab "Page", "External Url" und "File" hat keine Auswahl mehr für Style und Title, - beim umschalten der Styles wird das Title Feld nicht automatisch angepasst - beim umschalten der Styles wird das Target Feld nicht automatisch angepasst - linkRecord (bei mir Presse) Tab übernimmt nicht die RTE.classesAnchor.linkRecord aus der pageTSConfig sonder die von "external Url", Das scheint leider zu stimmen: ##im TSconfig## RTE.classesAnchor { linkRecord { class = internal-link type = page titleText = Link altText = Link öffnen image > } } \- beim zweiten öffnen des Links (Modify Link) steht im Target-Feld die Url, was zu einem falschen Target führt, .. _To-Do-list: To-Do list ---------- - tt-news multilanguage support - Total new rewrite to get rid of the XCLASS-Method and support the new hooks in rtehtmlarea. - XClassing von der browse\_links (Hooks-injection) - Typoscripting von den Links - unlimited Tab-Generierung (Hooks-injection) - mod.tx\_linkhandler (für den normalen Link-Browser!???) - switch Link-record from userTSConfig to pageTSConfig .. _Changelog: Changelog --------- - 06.06.2006 initial release - 10.07.2008 major overhaul - 31.10.2008 document review - 31.10.2008 Bugfix remove link Bugfix htmlrte Typo3Link-API Feature request Multitab - 09.01.2009 Add linkhandler-Hook Bugfix Underline Bugfix absolute Url - 04.03.2009 disabling tinyrte support, some fixes in the manual |img-3| EXT: RTE Generic Records - 6 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.jpeg .. :align: left .. :border: 0 .. :height: 400 .. :id: Grafik1 .. :name: Grafik1 .. :width: 413 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 173 .. :id: Grafik2 .. :name: Grafik2 .. :width: 307 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102