Extending the Account/Privacy screen

CrispinP

Well-known member
Hi folks,

I'm cleaning up some of the fields in one of my add-ons and want to move the various options to Privacy as their better suited there.

Using a template hook I added my new template underneath and it all looks ok. My problem is the saving of the data.

I have a hook into data writer which I use for doing other stuff when the user saves but this does not present me with the values passed from the page.

How / What / Where do I hook into something so that I can save the values my template has passed in when someone saves privacy settings?

Privacy:
upload_2017-4-3_23-29-29.webp



Thanks
Crispin
 
Thanks Chris,


I ended up with what I think is a less hacky option.

I stuck to what I was doing and in the post-save method I in my data writer I did the following

Code:
        if (array_key_exists('crispin_usermap_privacy', $_POST)){
            $_input = new XenForo_Input($_POST);
   
            $settings = $_input->filter(array(
                'param1' => XenForo_Input::UINT,
                'param1' => XenForo_Input::STRING,
                etc
            ));

From there I can use the data writer option as normal.

C
 
Back
Top Bottom