Hi coroebus,
$device = T3Common::mobile_device_detect();
if ($device == ‘iphone’ || $device == ‘handheld’)
I am not clear with your request.
If you want to detect the template then your code is correct.
For the the layout based on device, in JA T3v2 we use browser class to detect the browser.
http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
For T3 (T3v3) we use responsive css to handle website layout change.
For most modern template, we use responsive design to handle and does not need to detect layout.
About Kunena Template, please contact with Kunena’s creator for more information.
Regards