18 require_once SQ_INCLUDE_PATH.
'/asset.inc';
64 $this->_ser_attrs = TRUE;
67 if (!$ipbid || empty($data)) {
71 $ipb_bridge =& $GLOBALS[
'SQ_SYSTEM']->am->getAsset($ipbid,
'ipb_bridge');
72 if (is_null($ipb_bridge))
return;
74 $this->_ipbid = $ipbid;
77 $tmp = explode(
'_', $data[
'id']);
78 $this->_prefix = $tmp[0];
79 $this->_suffix = $tmp[1];
80 $this->
id = $ipb_bridge->id.
':'.$data[
'id'];
81 $this->name = $data[
'name'];
82 $this->name = $data[
'name'];
84 $this->short_name = $this->name;
85 $this->status = $ipb_bridge->status;
86 $this->version =
'0.1';
87 if (!empty($ipb_bridge->created)) {
88 $this->created = date(
'Y-m-d H:m:i', $ipb_bridge->created);
90 if (!empty($ipb_bridge->updated)) {
91 $this->updated = date(
'Y-m-d H:m:i', $ipb_bridge->updated);
93 if (!empty($ipb_bridge->published)) {
94 $this->published = date(
'Y-m-d H:m:i', $ipb_bridge->published);
96 if (!empty($ipb_bridge->status_changed)) {
97 $this->status_changed = date(
'Y-m-d H:m:i', $ipb_bridge->status_changed);
104 if ($this->_prefix !=
'p') {
105 $this->vars[
'name'][
'type'] =
'text';
106 $this->vars[
'name'][
'value'] = $data[
'name'];
108 $this->vars[
'description'][
'type'] =
'text';
109 if (!empty($data[
'description'])) {
110 $this->vars[
'description'][
'value'] = $data[
'description'];
115 if ($this->_prefix ==
'f' && $this->_suffix ==
'0') {
117 $ipb_bridge =& $GLOBALS[
'SQ_SYSTEM']->am->getAsset($ipbid);
118 $ipb =& $ipb_bridge->getIpbConn();
119 $root_forums = $ipb->getListOfRootForums();
121 $this->vars[
'root_forums'][
'type'] =
'int';
122 $this->vars[
'root_forums'][
'value'] = count($root_forums);
126 if ($this->_prefix ==
'f' && $this->_suffix !=
'0') {
127 $this->vars[
'topics'][
'type'] =
'int';
128 $this->vars[
'topics'][
'value'] = $data[
'topics'];
159 return 'IPB All Forums';