Jump to content

Hooks in the middle of posting process?


WildRAID

Recommended Posts

Is there any way to overload functions in classPostclassPostForms without direct code editing? Only with hooks.

For example, I want to add an additional field like "Topic Description". It's expected to be processed with common fields and saved to database by extending the common "insertupdate topics". No additional queries.

Is that possible to reload compilePostData? Or interfere between constructions like



Seems "no", but i probably miss something important..

+++

Added later:

Also, it seems that i cant process the additional field even with extra query. Because function saveForm in 'post' section doesnt return anything. It ends with silentRedirect or with error. So, u cannot add an 'action overload' hook after this. >_<

$topic = array( 'title'            => $this->_topicTitle,

and

$this->DB->insert( 'topics', $topic )
Link to comment
Share on other sites

Yeah, you can only override source action files. So when class files take over and do the work (and especially when they redirect, etc. afterwards) it makes things a little challenging.

Some class files have built in hook functionality (like publicSessions.php) but not all.

I think you'll have to modify this for now, but we will look into building in specific hook functionality for the posting library in the next update, as that's very useful functionality.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...