امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
I've been trying to figure this out but can't seem to make any progress.
In XF1, if I wanted to add an active variable to the $visitor group, I added a Listener and then the following code:
PHP:
And that worked great. But obviously in XF2, things are quite different and I...
Class Extension Issue - extending $xf.visitor
In XF1, if I wanted to add an active variable to the $visitor group, I added a Listener and then the following code:
PHP:
کد:
if (!class_exists('Demo_Listener')){
class Demo_Listener {
public static function visitor_setup(XenForo_Visitor &$visitor)
{
$visitor["my_variable"] = $data_for_my_variable;
}
}
}
Class Extension Issue - extending $xf.visitor
