LPH
Well-known member
I have code that functions if styleId is set to 1. But if the user changes to a different style then the code fails.
This works if default is id 1.
If I try to pull the style_id based on the $visitor the print_r is returning 0. Only the default (style_id = 1) is installed.
This works if default is id 1.
PHP:
XenForo_Template_Public::setStyleId( 1 ) ;
If I try to pull the style_id based on the $visitor the print_r is returning 0. Only the default (style_id = 1) is installed.
PHP:
//Get visitor style ID
$visitor = XenForo_Visitor::getInstance();
$styleId = $visitor['style_id'];
echo '<pre>';
print_r($styleId);
echo '</pre>';
XenForo_Template_Public::setStyleId( $styleId ) ;