[TYPO3-core] t3lib_BEfunc::getProcessedValue hook fixes

Bernhard Kraft kraftb at kraftb.at
Sun Nov 12 00:28:28 CET 2006


Hello,

This is a SVN patch request.

Problem:
There exists a hook in t3lib_BEfunc::getProcessedValue - a pre and postprocessing
hook.
But sadly those hooks get not even passed the table of the field they should render.

Values of additional column in the list module get ALWAYS passed through htmlspecialchars.
there is currently no way to inhibit this.



Solution:
Those two problems are a real problem if you combine them. I created a hook which renders
the list-module output of a special field. The field just contains a number 1-5 which
reports the current step/status a record is in - in the list module I display a bar graph:

http://think-open.org/kraftb/status.png

I made some additions to the passed $params array - a very interesting feature is
the $instantReturn variable in the params array. If this variable get's set in the
hook it will cause the calling method to directly return the value generated by
the hook method.

The other change in class.db_list_extra.inc is required because else the value the hook
generates always will result in html code as the returned value is passed through htmlspecialchars.
I made a TCA option which allows to inhibit this hsc'ing of TCA fields when shown in
the list module.

Of course we have to add this option to T3-Core-Api doc ... i will write a text if the
patch get's accepted.


Files:
befunc_hook__dblist_hsc__2006-11-12.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: befunc_hook__dblist_hsc__2006-11-12.diff
Type: text/x-patch
Size: 3080 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061112/cf91eee7/attachment.bin 


More information about the TYPO3-team-core mailing list