Hey I have following code and need some help
As you can see, I have no idea at some points + I would like to know how I use the output of $calcNumber on the template node_forum_level_2
Thanks!
PHP:
<?php
class Charlie_CalcNumber_ControllerPublic_CalcNumber extends XenForo_ControllerPublic_Forum /*IS THIS RIGHT*/{
public function calcNumber()
{
$db = XenForo_Application::get('db');
$calcNumber = $db->fetchAll("SELECT COUNT(discussion_open) FROM `xf_thread` WHERE node_id = 2 AND discussion_open =0");
$calcNumberAll = $db->fetchAll("SELECT COUNT(discussion_open) FROM `xf_thread` WHERE node_id = 2");
$viewParams = array("calcNumber" => $calcNumber,
"calcNumberAll" => $calcNumberAll);
return $this->responseView('WHAT TO PUT HERE', 'node_forum_level_2', $viewParams);
}
}
As you can see, I have no idea at some points + I would like to know how I use the output of $calcNumber on the template node_forum_level_2
Thanks!
Last edited: