Use variables in Notices

Andy.N

Well-known member
I have a few variables from custom addons that can be used in any templates. Is it possible to use them in Notices, just as you are able to include the username currently?

How would I be able to achieve it? My plan is to create a non-dismissible notice and display all the variables from our custom addons as a status bar/panel.
 
Notices don't have access to the normal container params. The token replacements are defined in this function:

XenForo_ViewRenderer_HtmlPublic::_getNoticesContainerParams

Code:
				$noticeTokens = array(
					'{name}' => $user['username'] !== '' ? $user['username'] : new XenForo_Phrase('guest')
				);

An addon is required to insert custom data.
 
Notices don't have access to the normal container params. The token replacements are defined in this function:

XenForo_ViewRenderer_HtmlPublic::_getNoticesContainerParams

Code:
$noticeTokens = array(
'{name}' => $user['username'] !== '' ? $user['username'] : new XenForo_Phrase('guest')
);

An addon is required to insert custom data.
Would it be hard to make that addon? Once it is done, we would have access to all custom variables?
 
Top Bottom