[TYPO3-english] Add a field to existing backend extension

Mathias Schreiber [wmdb] mathias.schreiber at wmdb.de
Tue Jul 19 11:51:45 CEST 2011


Am 19.07.11 10:26, schrieb Andre:
> Hello,
>
> I'm trying to modify existing extension, but cannot find any manuals how it
> should be done. Extension itself add a tab for some of the content elements.
> All I need to do is to add a field where it would be possible to select an
> image. And then in the frontend I would need to use that image. Can you let
> me know what steps I need to take to make it work or direct me towards a
> manual or an example of how it's done.

First off, you should define how you want to modify that extension.
a) just hack the code directly
b) use an extendable way to achieve your goal

b) is cleaner, but requires more in-depth knowledge of TYPO3.
Search for XCLASS and you will get results.

For the easy part, I will stick to a)

The field definitions are located in either tca.php or ext_tables.php of 
the extension.
You can simply copy the definition of an image field from somewhere else 
in TYPO3.
A good place to start  is to go to "Tools -> Configuration" in the BE 
and select "Tables.php" from the select box on top.
This will bring up a tree-view of TYPO3's table configuration array (TCA).

Don't forget to add the field to the database table.

Then dig into the extensions sourcecode and render the image.

cheers
Mathias

-- 
Ernesto, Nov. 9th 2010:
"In the graphics generation routines of TYPO3 *anything* could cause a
side effect."


More information about the TYPO3-english mailing list