18 require_once SQ_PACKAGES_PATH.
'/ipb/ipb_topic/ipb_topic.inc';
44 $data[
'name'] =
'IPB Post';
47 if (array_key_exists(
'author_name', $data)) {
48 $this->vars[
'author_name'][
'type'] =
'text';
49 $this->vars[
'author_name'][
'value'] = $data[
'author_name'];
52 if (array_key_exists(
'post_date', $data)) {
53 $this->vars[
'post_date'][
'type'] =
'text';
54 $value = date(
'g:i:s D j M Y', intval($data[
'post_date']));
55 $this->vars[
'post_date'][
'value'] = $value;
58 if (array_key_exists(
'post_title', $data)) {
59 $this->vars[
'post_title'][
'type'] =
'text';
60 $this->vars[
'post_title'][
'value'] = (empty($data[
'post_title'])) ?
'none' : $data[
'post_title'];
63 if (array_key_exists(
'post_parent', $data)) {
64 $this->vars[
'post_parent'][
'type'] =
'text';
65 $this->vars[
'post_parent'][
'value'] = ($data[
'post_parent']) ?
'Yes' :
'No';
68 if (array_key_exists(
'post', $data)) {
69 $this->vars[
'post'][
'type'] =
'text';
70 $this->vars[
'post'][
'value'] = $data[
'post'];
73 if (array_key_exists(
'topic_name', $data)) {
74 $this->vars[
'topic_name'][
'type'] =
'text';
75 $this->vars[
'topic_name'][
'value'] = $data[
'topic_name'];
78 if (array_key_exists(
'forum_name', $data)) {
79 $this->vars[
'forum_name'][
'type'] =
'text';
80 $this->vars[
'forum_name'][
'value'] = $data[
'forum_name'];
83 if (array_key_exists(
'forum_name', $data)) {
84 $time = date(
'D jS M h:ia', intval($data[
'post_date']));
85 $this->name = $time.
' by '.$data[
'author_name'].
' in '.$data[
'forum_name'];
86 $this->short_name = $this->name;