Mr. Goodie2Shoes
Well-known member
Hello,
I am trying to extend the Controller... but for some weird reason, its not working...
This is the listener:
and this is the 'extension':
and no, I don't get any error.
I am trying to extend the Controller... but for some weird reason, its not working...
This is the listener:
PHP:
public static function loadClassListener($class, array &$extend)
{
switch($class)
{
case 'XenForo_ControllerAdmin_Forum':
$extend[] = 'GFNCoders_XenSocialize_ControllerAdmin_ForumExtended';
break;
}
}
and this is the 'extension':
PHP:
class GFNCoders_XenSocialize_ControllerAdmin_ForumExtended extends XFCP_GFNCoders_XenSocialize_ControllerAdmin_ForumExtended
{
public function actionSave()
{
$return = parent::actionSave();
$nodeId = str_replace('#_', '', strstr($return->redirectTarget, '#_'));
$writerData = $this->_input->filter(array(
'enable_xensocialize' => XenForo_Input::UINT,
'enable_twitter' => XenForo_Input::UINT,
'twitter_preface' => XenForo_Input::STRING,
'twitter_postface' => XenForo_Input::STRING,
'enable_facebook' => XenForo_Input::UINT,
'facebook_preface' => XenForo_Input::STRING,
'facebook_postface' => XenForo_Input::STRING,
));
$writer = $this->_getNodeDataWriter();
$writer->setExistingData($nodeId);
$writer->bulkSet($writerData);
$writer->save();
return $return;
}
}
and no, I don't get any error.