Whmcs 在托管信息选项卡旁边的客户区添加新选项卡
Whmcs add new tab in client area just beside hosting informaion tab
我需要在 whmcs 的客户区添加新标签,就在主机信息标签旁边
该特定部分的模板位于
/templates/six/clientareaproductdetails.tpl 但我不想直接修改模板文件。
我尝试通过添加 mymodule_ClientArea 方法来创建临时模块,但这也不会输出任何内容。
可以使用ClientAreaProductDetailsOutput钩子输出javascript添加tab
add_hook('ClientAreaProductDetailsOutput', 1, function($service) {
$code = '';
if (!is_null($service)) {
$code .= '<script>';
$code .= 'console.log("Service ID: ' . $service['service']->id . '")';
$code .= '</script>';
}
return $code;
});
我需要在 whmcs 的客户区添加新标签,就在主机信息标签旁边 该特定部分的模板位于 /templates/six/clientareaproductdetails.tpl 但我不想直接修改模板文件。 我尝试通过添加 mymodule_ClientArea 方法来创建临时模块,但这也不会输出任何内容。
可以使用ClientAreaProductDetailsOutput钩子输出javascript添加tab
add_hook('ClientAreaProductDetailsOutput', 1, function($service) {
$code = '';
if (!is_null($service)) {
$code .= '<script>';
$code .= 'console.log("Service ID: ' . $service['service']->id . '")';
$code .= '</script>';
}
return $code;
});