Gossamer Forum
Quote Reply
do_post_reply_post hook
I'm trying to hook into do_post_reply_post and do_post_post.

do_post_post works fine and using GT::Dumper lists all the keys as expected.

However, do_post_reply_post never passes anything to the hook. I've confirmed that the hook is actually called, it's just that nothing is passed to it.

Is there anything special about this hook? These are both POST hooks.

Last edited by:

paulj: Dec 14, 2004, 11:44 AM
Quote Reply
Re: [paulj] do_post_reply_post hook In reply to
The problem is that when a user has selected to go directly to the forum view or post display after posting (instead of a confirmation page), post_reply_post prints the redirect and returns nothing, since there is no possible template to use the return value.

What you might try instead is looking at the insert_post hook, called in GForum/Table/Post.pm - this hook gets called for every post insertion, regardless of where it comes from.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] do_post_reply_post hook In reply to
Aha... so that's what the little comment about printing headers is all about in GForum::Post::Write :)

Using insert_post as a single hook will be much better anyway. Thanks.