PDA

View Full Version : How to modify $data before saving?


anrol
03-05-2018, 10:33 AM
vBulletin 5.3.4 Patch Level 1
After user create new post or edit existing, i need check and modify some text in it. How can I do it? Is there hook in class vB_Api_Page to do this? What can I do to resolve my problem?

--------------- Added 1520272291 at 1520272291 ---------------

Anothe way, i can edit rawtext when page is fetching to client.
This my code

class myclass_Api_Page extends vB_Api_Extensions {
//....

public function fetchPageById($page, $pageid, $routeData = array())
{
$nodeid = $routeData['nodeid'];
$node = vB_Library::instance('node')->getNodeBare($nodeid);
//...
// but what can i do when post wil be edit?
return $page;
}