Exemplo n.º 1
0
 function _install()
 {
     global $dbTiki;
     require_once 'lib/comments/commentslib.php';
     $comments = new Comments($dbTiki);
     $data = $this->getData();
     $this->replaceReferences($data);
     $attConverter = new Tiki_Profile_ValueMapConverter(array('none' => 'att_no', 'everyone' => 'att_all', 'allowed' => 'att_perm', 'admin' => 'att_admin'));
     $id = $comments->replace_forum(0, $data['name'], $data['description'], $data['enable_flood_control'], $data['flood_interval'], $data['moderator'], $data['mail'], $data['enable_inbound_mail'], $data['enable_prune_unreplied'], $data['prune_unreplied_max_age'], $data['enable_prune_old'], $data['prune_max_age'], $data['per_page'], $data['topic_order'], $data['thread_order'], $data['section'], $data['list_topic_reads'], $data['list_topic_replies'], $data['list_topic_points'], $data['list_topic_last_post'], $data['list_topic_author'], $data['enable_vote_threads'], $data['show_description'], $data['inbound_pop_server'], $data['inbound_pop_port'], $data['inbound_pop_user'], $data['inbound_pop_password'], $data['outbound_address'], $data['enable_outbound_for_inbound'], $data['enable_outbound_reply_link'], $data['outbound_from'], $data['enable_topic_smiley'], $data['enable_topic_summary'], $data['enable_ui_avatar'], $data['enable_ui_flag'], $data['enable_ui_posts'], $data['enable_ui_level'], $data['enable_ui_email'], $data['enable_ui_online'], $data['approval_type'], $data['moderator_group'], $data['forum_password'], $data['enable_password_protection'], $attConverter->convert($data['attachments']), $data['attachments_store'], $data['attachments_store_dir'], $data['attachments_max_size'], $data['forum_last_n'], $data['comments_per_page'], $data['thread_style'], $data['is_flat'], $data['list_att_nb'], $data['list_topic_last_post_title'], $data['list_topic_last_post_avatar'], $data['list_topic_author_avatar'], $data['forum_language']);
     return $id;
 }
Exemplo n.º 2
0
 function _install()
 {
     $artlib = TikiLib::lib('art');
     $data = $this->getData();
     $this->replaceReferences($data);
     $converter = new Tiki_Profile_ValueMapConverter(array('y' => 'on'));
     if (!$artlib->get_type($data['name'])) {
         $artlib->add_type($data['name']);
     }
     $artlib->edit_type($data['name'], $converter->convert($data['allow_ratings']), $converter->convert($data['show_pre_publication']), $converter->convert($data['show_post_expire']), $converter->convert($data['show_heading_only']), $converter->convert($data['allow_comments']), $converter->convert($data['allow_comments_rating_article']), $converter->convert($data['show_image']), $converter->convert($data['show_avatar']), $converter->convert($data['show_author']), $converter->convert($data['show_publication_date']), $converter->convert($data['show_expiration_date']), $converter->convert($data['show_reads']), $converter->convert($data['show_size']), $converter->convert($data['show_topline']), $converter->convert($data['show_subtitle']), $converter->convert($data['show_link_to']), $converter->convert($data['show_image_caption']), $converter->convert($data['allow_creator_edit']));
     return $data['name'];
 }