Hi, I've created a very basic addon and trying to includes a html file (it is a weather forecast data) to sidebar.
here is my addon;
Code Event Listener: container_public_params
XenForo_Umiweather_kusweather::container_public_params
I can add this to page_include template and it is working but breaking javascript of the website.
I dont know what i am doing wrong but first i want to get rid of the errors and second i want to add the output to any template (for example sidebar templates).
Please help...
here is my addon;
Code:
<?php
class XenForo_Umiweather_kusweather
{
public static function container_public_params(array &$params, XenForo_Dependencies_Abstract $dependencies)
{
ob_start();
include('/Applications/MAMP/htdocs/mydomaintest/weather/cache.html');
$kusweather = ob_get_contents();
ob_end_clean();
$params = array(
'kusweather' => $kusweather
);
/*$dependencies->params = array_merge(
$dependencies->params,
$params
);*/
}
}
XenForo_Umiweather_kusweather::container_public_params
I can add this to page_include template and it is working but breaking javascript of the website.
I dont know what i am doing wrong but first i want to get rid of the errors and second i want to add the output to any template (for example sidebar templates).
Please help...