Are there new things to know for developing in 1.2?

Marcus

Well-known member
For my reference I include quotes of your posts from there here:

new code events
load_class
notices_prepare
template_file_change
init_router_public
new code event editor_setup
If you have any add-ons that display content on the main page, the forum listings home page , and they are no longer working with 1.2 then the solution may be as simple as what controller name is being looked at. In particular, XenForo_ControllerPublic_Index should now be XenForo_ControllerPublic_Forum.

So if your code has this....
Code:
$controllerName = $params['controllerName'];
$controllerAction = $params['controllerAction'];
if ($controllerName == 'XenForo_ControllerPublic_Index' and $controllerAction == 'Index')
{
     $content .= $template->create('my_template', $params);
}
.... and it used to show up on the forum listing home page but it no longer does under 1.2, then change it to:
Code:
$controllerName = $params['controllerName'];
$controllerAction = $params['controllerAction'];
if ($controllerName == 'XenForo_ControllerPublic_Forum' and $controllerAction == 'Index')
{
     $content .= $template->create('my_template', $params);
}
There's at least 1 other great improvement => Controller->jsonParams
There's no need to create a new viewclass to return some json data anymore.
(maybe there was another way in the pre xf 1.2 Beta4 but i wasn't aware of any)
 
Top