<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>PM form custom actions</title>
        <description> What would be the recommended hook(s) to use within PMs for handling custom form post actions?  I am looking for something similar to the hook posting_custom_action provided for topic posting, but for PM&amp;#039;s action processing.

The module I am working on is looking for a place to intercept its own action processing somewhere between initialization tasks and before the PM script&amp;#039;s own action processing.  I see that Phorum 5.2.15 will add a new hook pm_send_init that appears to be in the right place, however it is tied to core actions initial request, rpct_add, preview, posting.  I am not sure how I introduce my own custom action...  

-phil.</description>
        <link>https://www.phorum.org/phorum5/read.php?14,143114,143114#msg-143114</link>
        <lastBuildDate>Sun, 19 Apr 2026 14:04:45 -0400</lastBuildDate>
        <generator>Phorum 5.2.22</generator>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?14,143114,143149#msg-143149</guid>
            <title>Re: PM form custom actions</title>
            <link>https://www.phorum.org/phorum5/read.php?14,143114,143149#msg-143149</link>
            <description><![CDATA[ Yeah I hear you (about hacking away).  I got no problem with layering my own hacks on top of the system to make it do what I want, even if it goes against the system&#039;s design (i.e., small example here: [<a href="http://www.phorum.org/phorum5/read.php?14,143116" target="_blank" >www.phorum.org</a>]).   Then again, maybe what I want sometimes isn&#039;t necessarily a good idea...<br />
<br />
I like having the power for my code to jump into the pipeline anywhere I want, but I try to have the right perspective about it.  If I have a specific need met by a specific hook, I would first consider using that and keep my code very specific and written to that hook signature. I figure that is my best chance for having code that survives with future core versions.  I am lazy... I don&#039;t want to re-write my modules for future Phorum releases.<br />
<br />
At any rate, my current case is to just provide a supplemental code action to the PM form, one that doesn&#039;t touch core PM data.  I can hack into any hook that is called by that page&#039;s script. But if I did want to do something to the PM data, something like a pm_custom_action hook would actually be very helpful.<br />
<br />
-phil.<br />
<br />
Later Edit:  <br />
The more I think about this, the more I give myself permission to hack away.  Maybe a bazillion hooks isn&#039;t necessarily that good of a thing....  I am looking at my flickr module and can see that a few cases where I can hook into an early function or a common function, like start_output, which allows me to use less hooks.  I end up with some conditional code structures in my hook functions, but it is more readable code.]]></description>
            <dc:creator>Phil Connolly</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Fri, 12 Feb 2010 13:33:51 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?14,143114,143148#msg-143148</guid>
            <title>Re: PM form custom actions</title>
            <link>https://www.phorum.org/phorum5/read.php?14,143114,143148#msg-143148</link>
            <description><![CDATA[ That depends heavily on what you want to do. Me? I am a complete hacker. I often just write a common hook to act on the $_POST data if I want to play with it, redirect it, etc.  Now, if you need to act on data that the PM system itself is creating or modifying, that is a different matter.]]></description>
            <dc:creator>Brian Moon</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Fri, 12 Feb 2010 10:03:37 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?14,143114,143114#msg-143114</guid>
            <title>PM form custom actions</title>
            <link>https://www.phorum.org/phorum5/read.php?14,143114,143114#msg-143114</link>
            <description><![CDATA[ What would be the recommended hook(s) to use within PMs for handling custom form post actions?  I am looking for something similar to the hook posting_custom_action provided for topic posting, but for PM&#039;s action processing.<br />
<br />
The module I am working on is looking for a place to intercept its own action processing somewhere between initialization tasks and before the PM script&#039;s own action processing.  I see that Phorum 5.2.15 will add a new hook <b>pm_send_init</b> that appears to be in the right place, however it is tied to core actions <i>initial request, rpct_add, preview, posting</i>.  I am not sure how I introduce my own custom action...  <br />
<br />
-phil.]]></description>
            <dc:creator>Phil Connolly</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Wed, 10 Feb 2010 14:25:29 -0500</pubDate>
        </item>
    </channel>
</rss>
