[TYPO3-core] RFC: Hook request in t3lib_tceforms

Bernhard Kraft kraftb at kraftb.at
Sun Feb 11 16:46:42 CET 2007


Hallo everybody,


I make myself visible again after some time with this hook request :).
I did not stop work with TYPO3 - rather i have some projects. And those together
with studying (first semester is very exhausting) take most of my time :(


Type: Hook request

Description:
There are hooks in t3lib_tceforms which get called before (pre) and after (post) the
"mainFields" get rendered ... But when only single fields of a table get rendered using
the list-module and the field-edit buttons (allowing to edit the same field of more than
one record at once) then the "getMainFields" method does not get called and you can't
hook into rendering single fields.

Solution:
The supplied patch moves the initialization of the current hooks into the constructor of
the class and adds another class-array for hooks to the "getSingleField" method.

The patch also adds one line in alt_doc.php which allows the hook methods to add more button
rows (or other information) to the header of the record-editing-screen (alt_doc.php)
(Below the save buttons)


Remark:
The reason for this patch is a nifty extension I wrote during the last days because
I got annoyed of a common task which every of you knows probably very well:
You want to set a set of (5-20 or even more) pages to "hidden" - Or change the pagetype
of all of them to "sysfolder".

You most probably do this currently by going to the list module and either edit all fields
of all records at once - or you do a more fine grained selection and edit only the required
field of all records - or you even do select some single records, of which you want to
edit a field, using the clipboard.

But then you go through all the records and set the same value in all listed records --
a quite annoying task.

I made this little extension:
http://think-open.org/kraftb/index/kb_agent/

Which allows you to change the value of one field - then press the newly added buttton
and the value of all other same fields of the same table get changed to the same value.

So you mark one hidden-checkbox - press the button - and all are hidden and you can press
save and exit.


Files:
kbagent_2006-02-11.diff


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbagent_2006-02-11.diff
Type: text/x-patch
Size: 4800 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070211/9d04951c/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070211/9d04951c/attachment.pgp 


More information about the TYPO3-team-core mailing list