[TYPO3-german] Kniffeliges TCA-Problem

Widmann, Manfred mpunktw at gmx.net
Sat Jun 20 09:42:13 CEST 2009


Hi NG!

Also da brauche ich unbedingt eure Hilfe, denn alleine schaffe ich das nicht 
... mit der TCA kenn' ich mich einfach (noch?) nciht so aus!

Ich habe eine Extension geschrieben, die an die tt_content ein paar Felder 
anhängt und die im Backend dann bei jedem Content-Record wartbar sein 
sollen; sie soll auch als Plugin-Content eingegliedert werden können (sh. 
ext_tables.php im Anhang und unten).

Zwei Probleme habe ich damit:
1: Die Felder werden zum Warten in den Content-Elementen automatisch ins 
letzte Tab ("Access") gestellt; ein neuer, eigener Tab wäre schön ... wie 
geht das?

2 - und Hauptproblem: Will man die Extension als Plugin-Content einbinden, 
so ist das ja auch ein Content und dann findet man die hinzugefügten Felder 
a) unnötigerweise im Tab "Plugin" und b) im Tab "Access" - und dieser Tab 
ist noch dazu mit einem "!" markiert ("Eingabe fehlt!"). Wenn man sich dann 
aber ansieht, welche Eingabe da fehlt, sieht man kein weiteres Rufzeichen. 
Zu a) wie kann ich das verhindern? Zu b) Viel wichtiger: Was ist da 
verkehrt? Was ist da mandatory?

Anzumerken ist noch, dass in Version 4.1.x der Plugin-Content eingefügt 
werden konnte, mit 4.2.6 allerdings nciht mehr - nicht einmal mehr 
gespeichert.

Biiiiitte!!! Erbarmt sich ein Spezialist?
Manfred


Hier die ext_tables.php:
<?php
if (!defined ('TYPO3_MODE'))  die ('Access denied.');
$tempColumns = Array (
 "tx_wmcontentteaser_teaseme" => Array (
  "exclude" => 1,
  "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teaseme",
  "config" => Array (
   "type" => "check",
   "cols" => 4,
   "items" => Array (
    Array("LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teaseme.I.0", 
""),
   ),
  )
 ),
 "tx_wmcontentteaser_teasertext" => Array (
  "exclude" => 1,
  "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teasertext",
  "config" => Array (
   "type" => "input",
   "size" => "30",
   "eval" => "trim",
  )
 ),
 "tx_wmcontentteaser_teaserstart" => Array (
  "exclude" => 1,
  "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teaserstart",
  "config" => Array (
   "type"     => "input",
   "size"     => "8",
   "max"      => "20",
   "eval"     => "date",
   "checkbox" => "0",
   "default"  => "0"
  )
 ),
 "tx_wmcontentteaser_teaserstop" => Array (
  "exclude" => 1,
  "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teaserstop",
  "config" => Array (
   "type"     => "input",
   "size"     => "8",
   "max"      => "20",
   "eval"     => "date",
   "checkbox" => "0",
   "default"  => "0"
  )
 ),
        "tx_wmcontentteaser_teaserimage" => Array (
            "exclude" => 1,
            "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teaserimage",
            "config" => Array (
                "type" => "group",
                "internal_type" => "file",
                "allowed" => "gif,png,jpeg,jpg",
                "max_size" => 250,
                "uploadfolder" => "uploads/tx_wmcontentteaser",
                "show_thumbs" => 1,
                "size" => 2,
                "minitems" => 0,
                "maxitems" => 1,
            )
        ),
        "tx_wmcontentteaser_teasercontent" => Array (
            "exclude" => 1,
            "label" => 
"LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.tx_wmcontentteaser_teasercontent",
            "config" => Array (
                "type" => "text",
                "cols" => "30",
                "rows" => "5",
                "wizards" => Array(
                    "_PADDING" => 2,
                    "RTE" => array(
                        "notNewRecords" => 1,
                        "RTEonly" => 0,
                        "type" => "script",
                        "title" => "Full screen Rich Text 
Editing|Formatteret redigering i hele vinduet",
                        "icon" => "wizard_rte2.gif",
                        "script" => "wizard_rte.php",
                    ),
                ),
            )
        ),
);


t3lib_div::loadTCA("tt_content");
t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes ("tt_content"
                              ,"tx_wmcontentteaser_teaseme,tx_wmcontentteaser_teaserstart, 
tx_wmcontentteaser_teaserstop,tx_wmcontentteaser_teasertext, 
tx_wmcontentteaser_teaserimage, 
tx_wmcontentteaser_teasercontent;;;richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|outdent|indent|link|image]:rte_transform[mode=ts]"
                              ,""
                              ,"");



t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='tx_wmcontentteaser_teaseme;;;;1-1-1, 
tx_wmcontentteaser_teasertext, tx_wmcontentteaser_teaserstart, 
tx_wmcontentteaser_teaserstop, tx_wmcontentteaser_teaserimage, 
tx_wmcontentteaser_teasercontent;;;richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|outdent|indent|link|image]:rte_transform[mode=ts]';


t3lib_extMgm::addPlugin(array('LLL:EXT:wm_contentteaser/locallang_db.xml:tt_content.list_type_pi1', 
$_EXTKEY.'_pi1'),'list_type');


t3lib_extMgm::addStaticFile($_EXTKEY,"pi1/static/","Content Teaser");
?> 


begin 666 ext_tables.php
M/#]P:' -"FEF("@A9&5F:6YE9" H)U194$\S7TU/1$4G*2D@"61I92 H)T%C
M8V5S<R!D96YI960N)RD[#0HD=&5M<$-O;'5M;G,@/2!!<G)A>2 H#0H)(G1X
M7W=M8V]N=&5N='1E87-E<E]T96%S96UE(B ]/B!!<G)A>2 H"0D-"@D)(F5X
M8VQU9&4B(#T^(#$L"0D-"@D)(FQA8F5L(B ]/B B3$Q,.D585#IW;5]C;VYT
M96YT=&5A<V5R+VQO8V%L;&%N9U]D8BYX;6PZ='1?8V]N=&5N="YT>%]W;6-O
M;G1E;G1T96%S97)?=&5A<V5M92(L"0D-"@D)(F-O;F9I9R(@/3X at 07)R87D@
M* T*"0D)(G1Y<&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#0H)*2P-"@DB='A?
M=VUC;VYT96YT=&5A<V5R7W1E87-E<G-T;W B(#T^($%R<F%Y("@)"0T*"0DB
M97AC;'5D92(@/3X@,2P)"0T*"0DB;&%B96PB(#T^("),3$PZ15A4.G=M7V-O
M;G1E;G1T96%S97(O;&]C86QL86YG7V1B+GAM;#IT=%]C;VYT96YT+G1X7W=M
M8V]N=&5N='1E87-E<E]T96%S97)S=&]P(BP)"0T*"0DB8V]N9FEG(B ]/B!!
M<G)A>2 H#0H)"0DB='EP92(@(" @(#T^(")I;G!U="(L#0H)"0DB<VEZ92(@
M(" @(#T^("(X(BP-"@D)"2)M87 at B(" @(" @/3X@(C(P(BP-"@D)"2)E=F%L
M(B @(" @/3X@(F1A=&4B+ T*"0D)(F-H96-K8F]X(B ]/B B,"(L#0H)"0DB
M9&5F875L="(@(#T^("(P(@T*"0DI#0H)*2P-"B @(" @(" @(G1X7W=M8V]N
M=&5N='1E87-E<E]T96%S97)I;6%G92(@/3X at 07)R87D@*" @(" @(" @#0H@
M(" @(" @(" @(" B97AC;'5D92(@/3X@,2P@(" @(" @( T*(" @(" @(" @
M(" @(FQA8F5L(B ]/B B3$Q,.D585#IW;5]C;VYT96YT=&5A<V5R+VQO8V%L
M;&%N9U]D8BYX;6PZ='1?8V]N=&5N="YT>%]W;6-O;G1E;G1T96%S97)?=&5A
M<V5R:6UA9V4B+" @(" @(" @#0H@(" @(" @(" @(" B8V]N9FEG(B ]/B!!
M<G)A>2 H#0H@(" @(" @(" @(" @(" @(G1Y<&4B(#T^(")G<F]U<"(L#0H@
M(" @(" @(" @(" @(" @(FEN=&5R;F%L7W1Y<&4B(#T^(")F:6QE(BP-"B @
M(" @(" @(" @(" @(" B86QL;W=E9"(@/3X@(F=I9BQP;F<L:G!E9RQJ<&<B
M+" @(" -"B @(" @(" @(" @(" @(" B;6%X7W-I>F4B(#T^(#(U,"P@(" @
M#0H@(" @(" @(" @(" @(" @(G5P;&]A9&9O;&1E<B(@/3X@(G5P;&]A9',O
M='A?=VUC;VYT96YT=&5A<V5R(BP-"B @(" @(" @(" @(" @(" B<VAO=U]T
M:'5M8G,B(#T^(#$L(" @( T*(" @(" @(" @(" @(" @(")S:7IE(B ]/B R
M+" @(" -"B @(" @(" @(" @(" @(" B;6EN:71E;7,B(#T^(# L#0H@(" @
M(" @(" @(" @(" @(FUA>&ET96US(B ]/B Q+ T*(" @(" @(" @(" @*0T*
M(" @(" @(" I+ T*(" @(" @(" B='A?=VUC;VYT96YT=&5A<V5R7W1E87-E
M<F-O;G1E;G0B(#T^($%R<F%Y("@@(" @(" @( T*(" @(" @(" @(" @(F5X
M8VQU9&4B(#T^(#$L(" @(" @(" -"B @(" @(" @(" @(")L86)E;"(@/3X@
M(DQ,3#I%6%0Z=VU?8V]N=&5N='1E87-E<B]L;V-A;&QA;F=?9&(N>&UL.G1T
M7V-O;G1E;G0N='A?=VUC;VYT96YT=&5A<V5R7W1E87-E<F-O;G1E;G0B+" @
M(" @(" @#0H@(" @(" @(" @(" B8V]N9FEG(B ]/B!!<G)A>2 H#0H@(" @
M(" @(" @(" @(" @(G1Y<&4B(#T^(")T97AT(BP-"B @(" @(" @(" @(" @
M(" B8V]L<R(@/3X@(C,P(BP-"B @(" @(" @(" @(" @(" B<F]W<R(@/3X@
M(C4B+ T*(" @(" @(" @(" @(" @(")W:7IA<F1S(B ]/B!!<G)A>2 at -"B @
M(" @(" @(" @(" @(" @(" @(E]0041$24Y'(B ]/B R+ T*(" @(" @(" @
M(" @(" @(" @(" B4E1%(B ]/B!A<G)A>2 at -"B @(" @(" @(" @(" @(" @
M(" @(" @(")N;W1.97=296-O<F1S(B ]/B Q+ T*(" @(" @(" @(" @(" @
M(" @(" @(" @(E)416]N;'DB(#T^(# L#0H@(" @(" @(" @(" @(" @(" @
M(" @(" B='EP92(@/3X@(G-C<FEP="(L#0H@(" @(" @(" @(" @(" @(" @
M(" @(" B=&ET;&4B(#T^(")&=6QL('-C<F5E;B!2:6-H(%1E>'0 at 161I=&EN
M9WQ&;W)M871T97)E="!R961I9V5R:6YG(&D@:&5L92!V:6YD=65T(BP-"B @
M(" @(" @(" @(" @(" @(" @(" @(")I8V]N(B ]/B B=VEZ87)D7W)T93(N
M9VEF(BP-"B @(" @(" @(" @(" @(" @(" @(" @(")S8W)I<'0B(#T^(")W
M:7IA<F1?<G1E+G!H<"(L#0H@(" @(" @(" @(" @(" @(" @("DL#0H@(" @
M(" @(" @(" @(" @*2P-"B @(" @(" @(" @("D-"B @(" @(" @*2P-"BD[
M#0H-"@T*=#-L:6)?9&EV.CIL;V%D5$-!*")T=%]C;VYT96YT(BD[#0IT,VQI
M8E]E>'1-9VTZ.F%D9%1#06-O;'5M;G,H(G1T7V-O;G1E;G0B+"1T96UP0V]L
M=6UN<RPQ*3L-"G0S;&EB7V5X=$UG;3HZ861D5&]!;&Q40T%T>7!E<R H(G1T
M7V-O;G1E;G0B#0H@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" L(G1X
M7W=M8V]N=&5N='1E87-E<E]T96%S96UE+'1X7W=M8V]N=&5N='1E87-E<E]T
M96%S97)S=&%R="P@='A?=VUC;VYT96YT=&5A<V5R7W1E87-E<G-T;W L='A?
M=VUC;VYT96YT=&5A<V5R7W1E87-E<G1E>'0L('1X7W=M8V]N=&5N='1E87-E
M<E]T96%S97)I;6%G92P@='A?=VUC;VYT96YT=&5A<V5R7W1E87-E<F-O;G1E
M;G0[.SMR:6-H=&5X=%MP87-T97QB;VQD?&ET86QI8WQU;F1E<FQI;F5\9F]R
M;6%T8FQO8VM\8VQA<W-\;&5F='QC96YT97)\<FEG:'1\;W)D97)E9&QI<W1\
M=6YO<F1E<F5D;&ES='QO=71D96YT?&EN9&5N='QL:6YK?&EM86=E73IR=&5?
M=')A;G-F;W)M6VUO9&4]='-=(@T*(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @+"(B#0H@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" L(B(I
M.PT*#0H-"@T*=#-L:6)?9&EV.CIL;V%D5$-!*"=T=%]C;VYT96YT)RD[#0HD
M5$-!6R=T=%]C;VYT96YT)UU;)W1Y<&5S)UU;)VQI<W0G75LG<W5B='EP97-?
M97AC;'5D96QI<W0G75LD7T585$M%62XG7W!I,2==/2=L87EO=70L<V5L96-T
M7VME>2<[#0HD5$-!6R=T=%]C;VYT96YT)UU;)W1Y<&5S)UU;)VQI<W0G75LG
M<W5B='EP97-?861D;&ES="==6R1?15A42T59+B=?<&DQ)UT])W1X7W=M8V]N
M=&5N='1E87-E<E]T96%S96UE.SL[.S$M,2TQ+"!T>%]W;6-O;G1E;G1T96%S
M97)?=&5A<V5R=&5X="P@='A?=VUC;VYT96YT=&5A<V5R7W1E87-E<G-T87)T
M+"!T>%]W;6-O;G1E;G1T96%S97)?=&5A<V5R<W1O<"P@='A?=VUC;VYT96YT
M=&5A<V5R7W1E87-E<FEM86=E+"!T>%]W;6-O;G1E;G1T96%S97)?=&5A<V5R
M8V]N=&5N=#L[.W)I8VAT97AT6W!A<W1E?&)O;&1\:71A;&EC?'5N9&5R;&EN
M97QF;W)M871B;&]C:WQC;&%S<WQL969T?&-E;G1E<GQR:6=H='QO<F1E<F5D
M;&ES='QU;F]R9&5R961L:7-T?&]U=&1E;G1\:6YD96YT?&QI;FM\:6UA9V5=
M.G)T95]T<F%N<V9O<FU;;6]D93UT<UTG.PT*#0H-"G0S;&EB7V5X=$UG;3HZ
M861D4&QU9VEN*&%R<F%Y*"=,3$PZ15A4.G=M7V-O;G1E;G1T96%S97(O;&]C
M86QL86YG7V1B+GAM;#IT=%]C;VYT96YT+FQI<W1?='EP95]P:3$G+" D7T58
M5$M%62XG7W!I,2<I+"=L:7-T7W1Y<&4G*3L-"@T*#0IT,VQI8E]E>'1-9VTZ
M.F%D9%-T871I8T9I;&4H)%]%6%1+15DL(G!I,2]S=&%T:6,O(BPB0V]N=&5N
/="!496%S97(B*3L-"C\^
`
end



More information about the TYPO3-german mailing list