• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to manipulate a _input->filterSingle variable?

Marcus

Well-known member
#1
In ControllerPublic_Forum::actionIndex I want to manipulate _input->filterSingle('node_id') to show threads of a different forum.

The idea is to call my extended class first, manipulate _input->... and then call XenForo_ControllerPublic_Forum::actionIndex.

$this->_input->filterSingle('node_id', XenForo_Input::UINT) = $myVariable does not work. Do you know how I could do it?
 

Jeremy

Well-known member
#2
You need to modify the appropriate $_POST or $_GET variables See xf_phantom's solution below before calling parent::actionIndex(); It'll pick up accordingly.
 
Last edited:

Marcus

Well-known member
#7
I just see, XenForo 1.2 has a much cleaner code, ControllerPublic_Forum:actionIndex (1.2 version) is just a fraction of its 1.1 code. Thumbs up !