[TYPO3-dev] Filebrowser in BE module

moadin martin.hautsch at spieglhof-media.de
Wed Oct 25 15:59:31 CEST 2006


Hi,

I was also looking for a possibility to include this field. Now it works
nice in my BE module.
You can take all config options from the TYPO3 core api: 
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/4/2/#id2817038
Configuration of TYPE="group" 

The next step is more complicated and I don't know what to do.
After I selected one item from the pop-up and saved the form,
how can I proceed?

In my case I select images from my fileadmin-directory. Now I have to copy
them to the specified upload folder.
There must be some functions to make these movings.

At the moment I am using t3lib_div::upload_copy_move, but this is not a good
solution I think..


Who has an idea?


Greetings,

moadin



Steffen Kamper wrote:
> 
> 
> "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 
> 
> 
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 
> 

-- 
View this message in context: http://www.nabble.com/Filebrowser-in-BE-module-tf2442244.html#a6992567
Sent from the TYPO3 Dev mailing list archive at Nabble.com.





More information about the TYPO3-dev mailing list