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: 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¶
Extension Key: ch_rterecords
Copyright 2006-2008, info@chihoang.de, <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¶
EXT: RTE Generic Records 1
Introduction 1
What does it do? 1
Requirements 1
Sponsors 1
Credits & Sponsors 1
Screenshots 2
Adminstration 3
- Installation3
- userFunc 3
- Custom Label 4
- Default Page 4
- Problems 4
Reference 4
Tutorial 5
Known problems 5
To-Do list 6
Changelog 6
Introduction¶
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¶
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¶
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¶
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¶
Adminstration¶
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¶
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¶
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¶
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¶
If you have problem with additional Get-Parameter you may try this RTE-Configuration:
RTE.default.addParams {
cleanup=false
}
Reference¶
Typoscript “ux_linkrecord” object (see ext_tables.php)
table¶
Property
table
Data type
string
Description
The table to choose the records from.
Default
tx_chfoobar_location
GPparamUID¶
Property
GPparamUID
Data type
string
Description
The UID-Key. Required.
Default
tx_chfoobar_pi1[uid]
GPparamCMD¶
Property
GPparamCMD
Data type
string
Description
The CMD-Key and Value. Optional.
Default
tx_chfobbar_pi1[mode]=general
singlePID¶
Property
singlePID
Data type
integer
Description
The PID of the Single View . Required.
Default
1
GPparambackPid¶
Property
GPparambackPid
Data type
boolean
Description
The BackPID-Key of the Single View. Optional.
Default
NUL
backPid¶
Property
backPid
Data type
integer
Description
The BackPID. Optional.
Default
NUL
no_cache¶
Property
no_cache
Data type
integer
Description
Cache Setting. Optional
Default
1
browseTabLabel¶
Property
browseTabLabel
Data type
string
Description
custom label
Default
NUL
userFunc¶
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¶
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))¶
Property
Data type
Description
Default
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¶
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.
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¶
- 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¶
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
EXT: RTE Generic Records - 6