WildRAID Posted May 22, 2009 Posted May 22, 2009 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 )
bfarber Posted May 22, 2009 Posted May 22, 2009 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.