Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
GameCenter Posted October 14, 2010 Posted October 14, 2010 Hello. It would be alot more usefull if you would add an additional hook here: classPost.php /* Data Hook Location */ IPSLib::doDataHooks( &$post, 'editPostData' ); $this->DB->force_data_type = array( 'post_edit_reason' => 'string' ); $this->DB->update( 'posts', $post, 'pid='.$this->_originalPost['pid'] ); //ADDITIONAL HOOK HERE IPSLib::doDataHooks( &$post, 'editPostDataAfterUpdate' ); Its usefull if you add any dynamic parsed custom bbcode like for example [ping]IP[/ping]. It can't be saved as HTML because its has to be dynamicly reparsed each time someone refresh the page. I could add it myself but its not the point. Regards.
teraßyte Posted October 16, 2010 Posted October 16, 2010 Well.. even adding an hook point there the content is immediately saved in the cache table if you have it enabled so it won't solve your issue. You need to overload the function public_forums_forums_topics::parsePostRow instead, check if your tag is available (strpos?) and perform a replace on-the-fly before display the post.
GameCenter Posted October 17, 2010 Author Posted October 17, 2010 Ok it seems ok but it would work only for displayed topic posts and full editor... not for ajax one. I would also have to overload public_forums_ajax_topics::editBoxSave which is kind of impossible because of ::returnJsonArray which outputs the result to client and does exit(). I cant modify the $_POST['post'] there without rewriting the whole editBoxSave method (sic!). If i modify the $_POST['post'] before calling the parent::editBoxSave it would save my modifications to the DB (but i dont want that). Any ideas to do that using hooks ?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.