[英]PHP variables inside Xenforo template
I'm trying to include a PHP file in XenForo template , I think my params are wrong but anyway , it just doesn't output if I put {$varhere}. 我正在尝试在XenForo模板中包含一个PHP文件,我认为我的参数是错误的,但是无论如何,如果我输入{$ varhere},它不会输出。 Can anyone help?
有人可以帮忙吗? My code: Class: http://codepad.org/BaImQd1O Listener: http://codepad.org/KrNxaN4z My question is , what params I need to make it work in the template I need?
我的代码:类: http : //codepad.org/BaImQd1O侦听器: http : //codepad.org/KrNxaN4z我的问题是,需要哪些参数才能使其在所需的模板中起作用?
Try after you set the new params variable to set it to the template. 设置新的params变量后,尝试将其设置为模板。 So...
所以...
$params = $template->getParams();
$params += $hookParams;
// Set in the template
$template->setParams($params);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.