SpecialK
Well-known member
I am developing an addon that, under certain circumstances, needs to change the text in the "Post New Thread" button. Only in certain cases will the label be changed, and it won't always be changed to the same text. This is part of a larger addon that I'm developing. The rest of my addon development is going fine, but I just can't figure out how to go about this. I have a class created and the listener added to the load_class_controller event and my listener is firing and working well. I just can't figure out what to actually do in my listener to update that text. At first I thought about updating the phrase cache with the new text, but that didn't even seem to do anything and probably isn't the best way to go about it anyway.
Any help here would be appreciated. Here is the method as it currently stands:
Any help here would be appreciated. Here is the method as it currently stands:
PHP:
class Special_ControllerPublic_Forum extends XFCP_Special_ControllerPublic_Forum
{
public function actionIndex()
{
$special_redirect_map = $this->get_special_redirect_map();
$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);
if(array_key_exists($forumId, $special_redirect_map))
{
//Here is where I need to update the label
}
$return = parent::actionIndex();
return $return;
}