[TYPO3-core] RFC: Hook request in t3lib_tceforms

Michael Stucki michael at typo3.org
Tue Feb 13 20:22:52 CET 2007


Hi Bernhard,

nice to have you back on this list, I hope you are doing well.

> Type: Hook request

I remember that we discussed whether or not we should introduce new hooks in
patch versions. The decision was that we don't!

However, I still think that a hook is not a feature, and therefore should be
ready for introduction as long as the final version *.0 is not ready.

So go ahead, but see my comments below:

> 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.

Checked, since this is only the initialization code, and since constructor
is called in every situation, this won't break anything. OK.

> 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)

First, could you initialize this as a string, please?

        var $extraFormHeaders = '';

Next, please check if the string is non-empty before you implode() it.

> 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.

I just tested it - works great :-) So go ahead!

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list