Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Adding a new route to the 'Who's online?' page

Jones edited this page Mar 7, 2015 · 1 revision

Note: The WIO works only with named routes atm. As all routes should be named this shouldn't be a problem. If you need to use a not named route please contact Jones ;)

General Usage

Basically the WIO uses the route name prefixed with online. So for a route vw.xy the language string online.vw.xy is loaded.

Sub routes

There are some cases where we have two routes named vw.xy and vw.xy.sub. As vw.xy.sub requires that vw.xy is an array we can't load vw.xy and therefore we load vw.xy.index instead.

Language parameters

Of course the WIO strings aren't static. The link to the correct route (including all url parameters) is always passed as parameter (:url) to the language string. Additional language parameters are generated by the getWioData function (MyBB\Core\Presenters\User). That function get's two parameters:

  • $route: The route name
  • $parameters: All parameters passed to this url

The function should return an array which is automatically passed to the language string. Note: All data should be escaped as it's inserted as raw data.