15728640, 'download_types' => '.pdf,.gif,.jpg,.png,.zip,.rar,.tar,.bz2,.7z', 'download_screen_max_b' => 153600, 'download_screen_max_w' => 1024, 'download_screen_max_h' => 768, 'download_thumb_max_w' => 100, 'download_thumb_max_h' => 100, 'download_screenshot' => 1, 'download_stats' => 1, 'download_pagination' => 15, 'download_allow_submission' => 1, 'download_screenshot_required' => 1, 'download_extended_required' => 1 ]; foreach ($settings as $name => $value) { $inf_insertdbrow[] = DB_SETTINGS_INF." (settings_name, settings_value, settings_inf) VALUES ('".$name."', '".$value."', '".$inf_folder."')"; } // Multilanguage table $inf_mlt[] = [ "title" => $locale['downloads']['title'], "rights" => "DL" ]; // Multilanguage links $enabled_languages = makefilelist(LOCALE, ".|..", TRUE, "folders"); if (!empty($enabled_languages)) { foreach ($enabled_languages as $language) { include LOCALE.$language."/setup.php"; $mlt_adminpanel[$language][] = [ "rights" => "D", "image" => $inf_image, "title" => $locale['setup_3010'], "panel" => "downloads_admin.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_3302']."', 'infusions/downloads/downloads.php', '0', '2', '0', '2', '1', '".$language."')"; $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_3314']."', 'submit.php?stype=d', ".USER_LEVEL_MEMBER.", '1', '0', '22', '1', '".$language."')"; // Delete $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='infusions/downloads/downloads.php' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_SITE_LINKS." WHERE link_url='submit.php?stype=d' AND link_language='".$language."'"; $mlt_deldbrow[$language][] = DB_DOWNLOAD_CATS." WHERE download_cat_language='".$language."'"; $mlt_deldbrow[$language][] = DB_ADMIN." WHERE admin_rights='D' AND admin_language='".$language."'"; } } else { $inf_adminpanel[] = [ "rights" => "D", "image" => $inf_image, "title" => $locale['setup_3010'], "panel" => "downloads_admin.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_3302']."', 'infusions/downloads/downloads.php', '0', '2', '0', '2', '1', '".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_3314']."', 'submit.php?stype=d', ".USER_LEVEL_MEMBER.", '1', '0', '22', '1', '".LANGUAGE."')"; } // Uninstallation $inf_droptable[] = DB_DOWNLOADS; $inf_droptable[] = DB_DOWNLOAD_CATS; $inf_deldbrow[] = DB_COMMENTS." WHERE comment_type='D'"; $inf_deldbrow[] = DB_RATINGS." WHERE rating_type='D'"; $inf_deldbrow[] = DB_SUBMISSIONS." WHERE submit_type='d'"; $inf_deldbrow[] = DB_SETTINGS_INF." WHERE settings_inf='".$inf_folder."'"; $inf_deldbrow[] = DB_PANELS." WHERE panel_filename='latest_downloads_panel'"; $inf_deldbrow[] = DB_ADMIN." WHERE admin_rights='D'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url='infusions/downloads/downloads.php'"; $inf_deldbrow[] = DB_SITE_LINKS." WHERE link_url='submit.php?stype=d'"; $inf_deldbrow[] = DB_LANGUAGE_TABLES." WHERE mlt_rights='DL'"; $inf_delfiles[] = IMAGES_D; $inf_delfiles[] = INFUSIONS."downloads/files/";