hide/unhide hook or similar

View: New views
5 Messages — Rating Filter:   Alert me  

hide/unhide hook or similar

by * k-do * :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I would like to know how could I call a function or piece of code everytime
a concrete type of content is unhided.

Thank you very much
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: hide/unhide hook or similar

by Steffen Müller-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

On 05.11.2009 11:12 * k-do * wrote:
> I would like to know how could I call a function or piece of code everytime
> a concrete type of content is unhided.

processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray,
&$this) in tcemain.
Check if $status is 'update' and if there's a key 'hidden' in $fieldArray.
$table und $uid allow you to check against any criteria of content type.

http://typo3.org/development/articles/how-to-use-existing-hooks/

--
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Blubber on Twitter: http://twitter.com/t3node
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: hide/unhide hook or similar

by * k-do * :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your help!

I have another question... how can I debug what I'm doing inside that
function? echo, var_dump, javascript alerts, nothing works

2009/11/5 Steffen Müller <typo3@...>

> Hi.
>
> On 05.11.2009 11:12 * k-do * wrote:
> > I would like to know how could I call a function or piece of code
> everytime
> > a concrete type of content is unhided.
>
> processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray,
> &$this) in tcemain.
> Check if $status is 'update' and if there's a key 'hidden' in $fieldArray.
> $table und $uid allow you to check against any criteria of content type.
>
> http://typo3.org/development/articles/how-to-use-existing-hooks/
>
> --
> cheers,
> Steffen
>
> TYPO3 Blog: http://www.t3node.com/
> Blubber on Twitter: http://twitter.com/t3node
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@...
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: hide/unhide hook or similar

by Steffen Müller-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

On 05.11.2009 14:54 * k-do * wrote:
>
> I have another question... how can I debug what I'm doing inside that
> function? echo, var_dump, javascript alerts, nothing works
>

use devlog extension and t3lib_div::devLog()

--
cheers,
Steffen

TYPO3 Blog: http://www.t3node.com/
Blubber on Twitter: http://twitter.com/t3node
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: hide/unhide hook or similar

by * k-do * :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Perfect!!

From your answer do I have to think that I cannot output anything from the
hook function? I need to give feedback to the users.
I'm checking a condition and if it is true, I don't let users unhide a
record, but I would like to tell them why, in order to give them the
possibility to solve it. Can I do do it someway?

Thank you for your help.


2009/11/5 Steffen Müller <typo3@...>

> Hi.
>
> On 05.11.2009 14:54 * k-do * wrote:
> >
> > I have another question... how can I debug what I'm doing inside that
> > function? echo, var_dump, javascript alerts, nothing works
> >
>
> use devlog extension and t3lib_div::devLog()
>
> --
> cheers,
> Steffen
>
> TYPO3 Blog: http://www.t3node.com/
> Blubber on Twitter: http://twitter.com/t3node
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english@...
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
_______________________________________________
TYPO3-english mailing list
TYPO3-english@...
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english