USER_LEVEL_SUPER_ADMIN, 'forum_attachmax' => 15728640, 'forum_attachmax_count' => 5, 'forum_attachtypes' => '.pdf,.gif,.jpg,.png,.zip,.rar,.tar,.bz2,.7z', 'thread_notify' => 1, 'forum_ranks' => 1, 'forum_edit_lock' => 0, 'forum_edit_timelimit' => 0, 'popular_threads_timeframe' => 604800, 'forum_last_posts_reply' => 1, 'forum_last_post_avatar' => 1, 'forum_editpost_to_lastpost' => 1, 'threads_per_page' => 20, 'posts_per_page' => 20, 'numofthreads' => 16, 'forum_rank_style' => 0, 'upvote_points' => 2, 'downvote_points' => 1, 'answering_points' => 15, 'points_to_upvote' => 100, 'points_to_downvote' => 100, 'forum_show_lastpost' => 1, 'forum_enabled_userfields' => 0, 'forum_show_reputation' => 1 ]; foreach ($settings as $name => $value) { $inf_insertdbrow[] = DB_SETTINGS_INF." (settings_name, settings_value, settings_inf) VALUES ('".$name."', '".$value."', '".$inf_folder."')"; } // Insert panels $inf_insertdbrow[] = DB_PANELS." (panel_name, panel_filename, panel_content, panel_side, panel_order, panel_type, panel_access, panel_display, panel_status, panel_url_list, panel_restriction, panel_languages) VALUES ('".$locale['setup_3402']."', 'forum_threads_panel', '', '1', '4', 'file', '0', '1', '1', '', '3', '".fusion_get_settings('enabled_languages')."')"; $inf_insertdbrow[] = DB_PANELS." (panel_name, panel_filename, panel_content, panel_side, panel_order, panel_type, panel_access, panel_display, panel_status, panel_url_list, panel_restriction, panel_languages) VALUES ('".$locale['setup_3405']."', 'forum_threads_list_panel', '', '2', '1', 'file', '0', '1', '1', '".fusion_get_settings('opening_page')."', '2', '".fusion_get_settings('enabled_languages')."')"; // Multilanguage table $inf_mlt[] = [ 'title' => $locale['forums']['title'], 'rights' => 'FO' ]; $inf_mlt[] = [ 'title' => $locale['setup_3038'], 'rights' => 'FR' ]; // Multilanguage links if (function_exists("fusion_get_enabled_languages")) { $enabled_languages = array_keys(fusion_get_enabled_languages()); } else { $enabled_languages = makefilelist(LOCALE, ".|..", TRUE, "folders"); } if (!empty($enabled_languages)) { foreach ($enabled_languages as $language) { include LOCALE.$language."/setup.php"; include FORUM.'locale/'.$language.'/forum_tags.php'; $mlt_adminpanel[$language][] = [ "rights" => "F", "image" => $inf_image, "title" => $locale['setup_3012'], "panel" => "admin/forums.php", "page" => 1, 'language' => $language ]; // Add $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('".$locale['setup_3304']."', 'infusions/forum/index.php', '0', '2', '0', '5', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3324']."', 'infusions/forum/newthread.php', ".USER_LEVEL_MEMBER.", '2', '0', '1', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3319']."', 'infusions/forum/index.php?section=latest', '0', '2', '0', '2', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3320']."', 'infusions/forum/index.php?section=participated', ".USER_LEVEL_MEMBER.", '2', '0', '3', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3321']."', 'infusions/forum/index.php?section=tracked', ".USER_LEVEL_MEMBER.", '2', '0', '4', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3322']."', 'infusions/forum/index.php?section=unanswered', '0', '2', '0', '5', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3323']."', 'infusions/forum/index.php?section=unsolved', '0', '2', '0', '6', '1', '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3600']."', 'rank_super_admin.png', 0, '1', ".USER_LEVEL_SUPER_ADMIN.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3601']."', 'rank_admin.png', 0, '1', ".USER_LEVEL_ADMIN.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3602']."', 'rank_mod.png', 0, '1', '-104', '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3603']."', 'rank0.png', 0, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3604']."', 'rank1.png', 10, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3605']."', 'rank2.png', 50, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3606']."', 'rank3.png', 200, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3607']."', 'rank4.png', 500, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_RANKS." (rank_title, rank_image, rank_posts, rank_type, rank_apply, rank_language) VALUES ('".$locale['setup_3608']."', 'rank5.png', 1000, '0', ".USER_LEVEL_MEMBER.", '".$language."')"; $mlt_insertdbrow[$language][] = DB_FORUM_TAGS." (tag_title, tag_description, tag_color, tag_status, tag_language) VALUES ('".$locale['setup_3660']."', '".$locale['setup_3661']."', '#2e8c65', '1', '".$language."')"; // Delete $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/newthread.php' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php?section=latest' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php?section=participated' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php?section=tracked' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php?section=unanswered' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/forum/index.php?section=unsolved' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_FORUMS." WHERE forum_language='".$language."'"; $mlt_deldbrow[$language][] = DB_FORUM_RANKS." WHERE rank_language='".$language."'"; $mlt_deldbrow[$language][] = DB_ADMIN." WHERE admin_rights='F' AND admin_language='".$language."'"; } } else { $inf_adminpanel[] = [ "rights" => "F", "image" => $inf_image, "title" => $locale['setup_3012'], "panel" => "admin/forums.php", "page" => 1, 'language' => LANGUAGE ]; $inf_insertdbrow[] = DB_SITE_LINKS." (link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('".$locale['setup_3304']."', 'infusions/forum/index.php', '0', '2', '0', '5', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3324']."', 'infusions/forum/newthread.php', ".USER_LEVEL_MEMBER.", '2', '0', '1', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3319']."', 'infusions/forum/index.php?section=latest', '0', '2', '0', '2', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3320']."', 'infusions/forum/index.php?section=participated', ".USER_LEVEL_MEMBER.", '2', '0', '3', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3321']."', 'infusions/forum/index.php?section=tracked', ".USER_LEVEL_MEMBER.", '2', '0', '4', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3322']."', 'infusions/forum/index.php?section=unanswered', '0', '2', '0', '5', '1', '".LANGUAGE."')"; $inf_insertdbrow[] = DB_SITE_LINKS." (link_cat, link_name, link_url, link_visibility, link_position, link_window, link_order, link_status, link_language) VALUES ('{last_id}', '".$locale['setup_3323']."', 'infusions/forum/index.php?section=unsolved', '0', '2', '0', '6', '1', '".LANGUAGE."')"; } // Uninstallation $inf_dropcol[] = ['table' => DB_USERS, 'column' => 'user_reputation']; $inf_droptable[] = DB_FORUMS; $inf_droptable[] = DB_FORUM_POSTS; $inf_droptable[] = DB_FORUM_THREADS; $inf_droptable[] = DB_FORUM_THREAD_NOTIFY; $inf_droptable[] = DB_FORUM_ATTACHMENTS; $inf_droptable[] = DB_FORUM_POLLS; $inf_droptable[] = DB_FORUM_POLL_OPTIONS; $inf_droptable[] = DB_FORUM_POLL_VOTERS; $inf_droptable[] = DB_FORUM_VOTES; $inf_droptable[] = DB_FORUM_RANKS; $inf_droptable[] = DB_FORUM_TAGS; $inf_droptable[] = DB_FORUM_MOODS; $inf_droptable[] = DB_POST_NOTIFY; $inf_droptable[] = DB_FORUM_USER_REP; $inf_deldbrow[] = DB_ADMIN." WHERE admin_rights='F'"; $inf_deldbrow[] = DB_ADMIN." WHERE admin_rights='FR'"; $inf_deldbrow[] = DB_PANELS." WHERE panel_filename='forum_threads_panel'"; $inf_deldbrow[] = DB_PANELS." WHERE panel_filename='forum_threads_list_panel'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/newthread.php'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php?section=latest'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php?section=participated'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php?section=tracked'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php?section=unanswered'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url = 'infusions/forum/index.php?section=unsolved'"; $inf_deldbrow[] = DB_SETTINGS_INF." WHERE settings_inf='".$inf_folder."'"; $inf_deldbrow[] = DB_LANGUAGE_TABLES." WHERE mlt_rights='FO'"; $inf_deldbrow[] = DB_LANGUAGE_TABLES." WHERE mlt_rights='FR'"; $inf_delfiles[] = INFUSIONS."forum/attachments/"; $inf_delfiles[] = INFUSIONS."forum/images/thumbnail/"; $inf_delfiles[] = INFUSIONS."forum/images/";