18 require_once SQ_CORE_PACKAGE_PATH.
'/users/user_group/user_group.inc';
67 $this->_ser_attrs = TRUE;
70 if (!$ipbid || empty($data)) {
73 $ipb_bridge =& $GLOBALS[
'SQ_SYSTEM']->am->getAsset($ipbid,
'ipb_bridge');
74 if (is_null($ipb_bridge))
return;
75 $this->_ipbid = $ipbid;
78 $tmp = explode(
'_', $data[
'id']);
79 $this->_prefix = $tmp[0];
80 $this->_suffix = $tmp[1];
81 $this->
id = $ipb_bridge->id.
':'.$data[
'id'];
82 if ($this->_suffix !=
'0') {
83 $this->name = $data[
'g_title'];
85 $this->name = $data[
'name'];
87 if (empty($this->name)) {
88 $this->name = translate(
'ipb_unknown_user');
91 $this->short_name = $this->name;
92 $this->status = $ipb_bridge->status;
93 $this->version =
'0.1';
98 $this->vars[
'name'][
'type'] =
'text';
99 $this->vars[
'name'][
'value'] = (empty($data[
'name'])) ?
'none' : $data[
'name'];
101 if ($this->_suffix !=
'0') {
103 foreach (array_keys($data) as $key) {
104 $this->vars[$key][
'type'] =
'text';
109 case 'g_photo_max_vars':
110 if (!empty($data[$key])) {
111 $tmp = explode(
':', $data[$key]);
112 $value = $tmp[0].
' KB';
113 if (!empty($tmp[1])) {
114 $value .=
', Max Width (px): '.$tmp[1];
116 if (!empty($tmp[2])) {
117 $value .=
', Max Height (px): '.$tmp[2];
119 $this->vars[$key][
'value'] = $value;
121 $this->vars[$key][
'value'] =
'0';
125 case 'g_email_friend' :
128 $tmp = explode(
':', $data[
'g_email_limit']);
129 if ($tmp[0] !=
'0') {
130 $value .=
'. Only allow '.$tmp[1].
' emails in a 24hr period';
132 if ($tmp[1] !=
'0') {
133 $value .=
' and only allow 1 email every '.$tmp[1].
' minutes';
135 $this->vars[$key][
'value'] = $value;
137 $this->vars[$key][
'value'] =
'No';
143 $tmp = explode(
'&', $data[$key]);
145 if ($tmp[0] !=
'-1') {
147 $ipb =& $ipb_bridge->getIpbConn();
148 $list_of_groups = $ipb->getMemberGroupInfo(
'groups');
149 $value =
'Promote members of this group to : '.$list_of_groups[
'g_'.$g_id][
'g_title'];
151 if ($tmp[1] !=
'-1') {
152 $value .=
' when they reach '.$tmp[1].
' posts';
154 $this->vars[
'g_promotion'][
'value'] = $value;
159 $this->vars[$key][
'value'] = $data[$key];