1.2 Beta Tips, Tricks, FAQ.

new code events


load_class
Called when instantiating a class. This event can be used to extend the class that will be instantiated dynamically. Note that not all classes that are to be instantiated will call this but many will.


notices_prepare
Called before the notices are prepared for display..


template_file_change
Called whenever a template that has been compiled to a file is updated or deleted.


init_router_public
Called before the public dependency manager routes the request. You can use this to manipulate the routing approach.
 
Last edited:
Just for the reference because i'm using only this thread for track of the important changes^^
What's now the best way to change the indexpage? Just call setIndexRoute('myNewRoutePrefix')?
Or use the routefilter?

You can set any route as the index via the options now (or via XenForo_Link::setIndexRoute).
Have you tried using the Index Page Route in Options -> Basic Board Information?
 
This is a general tips thread, not for support.
Please make a new thread in one of the support forums.
 
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);
}
 
All developers using an old version of jQuery UI would need to update this script.
The XenForo tooltip (provided by jQueryTools) doesn't seem to be compatible on page with jQueryUI.
 
Thanks,
Finally, I have successfully installed 1.2 beta 1 on my live site. I delete all custom styles, languages and disable all addons.
After upgrading I imported those styles and languages again and those still work.
Now I have 1.2 working.
 
Top Bottom