[TYPO3-english] programming BE: module with fileupload and RTE

Richard Davies richard at ocular.co.nz
Tue Nov 6 22:21:30 CET 2012


Hi Christian,

Are you simply talking about editing records in the backend, or
specifically editing records within your own backend module?
In the past I've needed to link to records from a custom BE module. You use
the function editOnClick from t3lib_befunc and include the returned value
in the a tag you want to link. If you are unsure you can create or edit a
record yourself and open it in a new window to see what the url is to get
to that type of record. When the user exits the record (either by pressing
the x exit, or save and exit) they are returned to the BE module they were
linked from. Heres some code:

> func editfeusers($uid){
>
$table = 'fe_users';
>
$params = '&edit['.$table.']['.$uid.']=edit';
>
return 'onclick="'.t3lib_befunc::editOnClick($params).'"';
>
}
>


func createfeusers(){
>
$storage_pid = 5;
>
$table = 'fe_users';
>
$params = '&edit['.$table.']['.$storage_pid.']=new';
>
...
>
}
>

There isn't any documentation past that that I could find, so if you want
to do anything complex heres a couple of examples:
Changing the values of some of the fields/setting default values for the
fields

> $fieldname = 'first_name';
>
$field_value = 'Jerry';
>
$params =
> '&edit['.$table.']['.$storage_pid.']=new&overrideVals['.$table.']['.$fieldname.']='.$fieldvalue;
>
When the new record is open for editing, the field 'first_name' would
default to Jerry. You can chain these to override any number of fields e.g.
&overrideVals[table][field1]&overrideVals[table][field2]. It will
automatically hide the fields so the user can't edit them.

Only showing certain fields:

>  $fieldname = 'first_name';
> $field_value = 'Jerry';
>
$params =
> '&edit['.$table.']['.$storage_pid.']=new&overrideVals['.$table.']['.$fieldname.']='.$fieldvalue.'&columnsOnly=first_name,hidden,last_name';

This would open a new record and only show the fields 'hidden' and
'last_name' to the user.

Richard

On 7 November 2012 09:36, Christian Tauscher <
christian.tauscher at media-distillery.de> wrote:

> Dear developers,
>
> I'd like to programm a BE module whre I can edit my records (working so
> far).
>
> I fail doing this:
>
> * upload a file and stor it in record/uploads/...
> * use RTE
>
>
> What API calls may I use, can't find a simple example.
>
>
> Thank you for your inspiring help,
>
> Christian.
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list