[TYPO3-dev] Filebrowser in BE module

Steffen Kamper steffen at dislabs.de
Mon Oct 16 18:38:43 CEST 2006


"Markus Lange" <markus.lange at bgm-gmbh.de> schrieb im Newsbeitrag 
news:mailman.21020.1160994105.20124.typo3-dev at lists.netfielders.de...
> Hi,
>
> Steffen Kamper wrote:
>> This is an interesting question for me too. In the TCE-Forms there are
>> these browselinks with the different types, but i couldn't found the
>> creation in code (using class SC_Browser). Is there an official
>> functioncall for these ones ?
> i dont know
>
> you have to examine the class t3lib_TCEforms
> here is an example you have to adjust:
>
> .......
> $config['itemFormElName'] = 'data[' . $cfg['uid'] . '][values][' .
> $languid . '][0]';
> $config['fieldConf']['config']['internal_type'] = 'file';
> $config['fieldConf']['config']['allowed'] = $cfg['allowed'];
> $config['fieldConf']['config']['disallowed'] = $cfg['disallowed'];
> $config['fieldConf']['config']['size'] = $cfg['files'];
> $config['fieldConf']['config']['show_thumbs'] = 0;
> $config['fieldConf']['config']['uploadfolder'] = 'uploads/prodb/' .
> $cfg['uploadpath'];
> $config['itemFormElValue'] = $data[0] ? $data[0] : ' ';
>
> $form = t3lib_div::makeInstance('t3lib_TCEforms');
> $form->initDefaultBEMode();
>
>
> $form = $form->getSingleField_typeGroup( 'tx_bgmprodb_record', 'upload',
> array(), $config );
>
> $out =  $form->JStop();
> $out .= $form;
> $out .= $form->JSbottom();
> ........
>
>
>
> NOTICE:
> itemFormElName -> this is the name of the formfield
> itemFormElValue -> this is the data
> the method getSingelField_xx just returns a input field set
> by config.
> for needed js for filling and deleting items you have to call
> jstop/bottom
>
> you probably have to store the values for yourself
> the config array can be loaded by loadTCA() also !!!!!!!
>
>
> The best way is to debug the config in the method getSingleField_typeXXXX
> in class t3lib_TCEforms to see a proper defined config array
>
> Happy digging!!
> hth
>
>
> -- 
> Markus Lange
>
>
thanx Markus for this hint - i will check it out and when I get it running i 
will post my solution.

vg  Steffen 






More information about the TYPO3-dev mailing list