Files
Testing/AVChat3/admin/install_avchat3.php

149 lines
12 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php
$plugin_name = "AVChat 3 Plugin";
$plugin_version = "1.0";
$plugin_type = "avchat3";
$plugin_desc = "This is a AVChat 3 integration with social engine";
$plugin_icon = "avchat3_logo.gif";
$plugin_menu_title = "Flash Video Chat";
$plugin_pages_main = "9990001<!>avchat3_logo.gif<!>admin_avchat3.php<~!~>";
$plugin_pages_level = "9990002<!>admin_levels_avchat3.php<~!~>";
$plugin_url_htaccess = "";
if($install == "avchat3") {
//######### INSERT ROW INTO se_plugins
if($database->database_num_rows($database->database_query("SELECT plugin_id FROM se_plugins WHERE plugin_type='$plugin_type'")) == 0) {
$database->database_query("INSERT INTO se_plugins (plugin_name,
plugin_version,
plugin_type,
plugin_desc,
plugin_icon,
plugin_menu_title,
plugin_pages_main,
plugin_pages_level,
plugin_url_htaccess
) VALUES (
'$plugin_name',
'$plugin_version',
'$plugin_type',
'".str_replace("'", "\'", $plugin_desc)."',
'$plugin_icon',
'$plugin_menu_title',
'$plugin_pages_main',
'$plugin_pages_level',
'$plugin_url_htaccess')");
//######### UPDATE PLUGIN VERSION IN se_plugins
} else {
$database->database_query("UPDATE se_plugins SET plugin_name='$plugin_name',
plugin_version='$plugin_version',
plugin_desc='".str_replace("'", "\'", $plugin_desc)."',
plugin_icon='$plugin_icon',
plugin_menu_title='$plugin_menu_title',
plugin_pages_main='$plugin_pages_main',
plugin_pages_level='$plugin_pages_level',
plugin_url_htaccess='$plugin_url_htaccess' WHERE plugin_type='$plugin_type'");
}
//######### INSERT LANGUAGE VARS (v3 COMPATIBLE HAS BEEN INSTALLED)
if($database->database_num_rows($database->database_query("SELECT languagevar_id FROM se_languagevars WHERE languagevar_id=9900000 LIMIT 1")) == 0) {
$database->database_query("INSERT INTO `se_languagevars` (`languagevar_id`, `languagevar_language_id`, `languagevar_value`, `languagevar_default`) VALUES
('9990000', '1', 'AVChat3 User Permissions', 'admin_viewusers_edit, admin_viewusers, admin_viewreports, admin_viewplugins, admin_viewadmins, admin_url, admin_templates, admin_subnetworks, admin_stats, admin_signup, admin_profile, admin_lostpass_reset, admin_lostpass, admin_login, admin_log, admin_levels_usersettings, admin_levels_messagesettings, admin_levels_edit, admin_levels_examplesettings, admin_levels, admin_language_edit, admin_language, admin_invite, admin_home, admin_general, admin_fields, admin_faq, admin_emails, admin_connections, admin_banning, admin_announcements, admin_ads_modify, admin_ads, admin_activity, '),
('9990001', '1', 'Global AVChat3 Settings', 'admin_viewusers_edit, admin_viewusers, admin_viewreports, admin_viewplugins, admin_viewadmins, admin_url, admin_templates, admin_subnetworks, admin_stats, admin_signup, admin_profile, admin_lostpass_reset, admin_lostpass, admin_login, admin_log, admin_levels_usersettings, admin_levels_messagesettings, admin_levels_edit, admin_levels_examplesettings, admin_levels, admin_language_edit, admin_language, admin_invite, admin_home, admin_general, admin_fields, admin_faq, admin_emails, admin_connections, admin_banning, admin_announcements, admin_ads_modify, admin_ads, admin_activity, '),
('9990002', '1', 'AVChat3 Settings', 'admin_viewusers_edit, admin_viewusers, admin_viewreports, admin_viewplugins, admin_viewadmins, admin_url, admin_templates, admin_subnetworks, admin_stats, admin_signup, admin_profile, admin_lostpass_reset, admin_lostpass, admin_login, admin_log, admin_levels_usersettings, admin_levels_messagesettings, admin_levels_edit, admin_levels_examplesettings, admin_levels, admin_language_edit, admin_language, admin_invite, admin_home, admin_general, admin_fields, admin_faq, admin_emails, admin_connections, admin_banning, admin_announcements, admin_ads_modify, admin_ads, admin_activity, '),
('9990003', '1', 'Flash Video Chat', 'browse_avchat3, header_avchat3'),
('9990004', '1', 'Allow user to broadcast video', 'admin_levels_avchat3'),
('9990005', '1', 'Yes - allow user to broadcast his camera if he has one', 'admin_levels_avchat3'),
('9990006', '1', 'No - do not allow user to broadcast his camera if he has one', 'admin_levels_avchat3'),
('9990007', '1', 'Allow user to broadcast audio', 'admin_levels_avchat3'),
('9990008', '1', 'Yes - allow user to broadcast his microphone if he has one', 'admin_levels_avchat3'),
('9990009', '1', 'No - do not allow user to broadcast his microphone if he has one', 'admin_levels_avchat3'),
('9990010', '1', 'Allow private streaming', 'admin_levels_avchat3'),
('9990011', '1', 'If set to NO, the user will not be able to set his audio/video stream to private so his audio/video stream will be always public ', 'admin_levels_avchat3'),
('9990012', '1', 'Yes - allow user to stream private', 'admin_levels_avchat3'),
('9990013', '1', 'No - do not allow user to stream private ', 'admin_levels_avchat3'),
('9990014', '1', 'Allow Emails &amp; URLs in text chat', 'admin_levels_avchat3'),
('9990015', '1', 'Sets if emails written in the text chat will become blue mailto: links &amp; urls will become blue links. If not, they will be censored with ******', 'admin_levels_avchat3'),
('9990016', '1', 'Yes - Emails &amp; URLs can be used in text chat', 'admin_levels_avchat3'),
('9990017', '1', 'No - Emails &amp; URLs cannot be used in text chat', 'admin_levels_avchat3'),
('9990018', '1', 'Youtube video button', 'admin_levels_avchat3'),
('9990019', '1', 'Controls the status -enabled, disabled, hidden- of the YouTube button in the text chat area', 'admin_levels_avchat3'),
('9990020', '1', 'Disable Youtube button', 'admin_levels_avchat3'),
('9990021', '1', 'Enable Youtube button', 'admin_levels_avchat3'),
('9990022', '1', 'Hide Youtube button', 'admin_levels_avchat3'),
('9990023', '1', 'Send file button', 'admin_levels_avchat3'),
('9990024', '1', 'Controls the status -enabled, disabled, hidden- of the SEND FILE TO ROOM button in the text chat area', 'admin_levels_avchat3'),
('9990025', '1', 'Disable send file button', 'admin_levels_avchat3'),
('9990026', '1', 'Enable send file button', 'admin_levels_avchat3'),
('9990027', '1', 'Hide send file button', 'admin_levels_avchat3'),
('9990028', '1', 'PM -Private Message- button', 'admin_levels_avchat3'),
('9990029', '1', 'Configures the status -enabled, diabled, hidden- of the PM button in the side menu for individual users. User can also start a PM discussion by double clicking a user, setting pmEnabled to 0 or 2 will prevent double clicking on users opening a pm discussion!', 'admin_levels_avchat3'),
('9990030', '1', 'Disable PM button and prevent double clicking on username', 'admin_levels_avchat3'),
('9990031', '1', 'Enable PM button and allow double clicking on username', 'admin_levels_avchat3'),
('9990032', '1', 'Hide PM button and prevent double clicking on username', 'admin_levels_avchat3'),
('9990033', '1', 'Send file to user button', 'admin_levels_avchat3'),
('9990034', '1', 'Configures the status -enabled, diabled, hidden- of the SEND FILE button in the side menu for individual users', 'admin_levels_avchat3'),
('9990035', '1', 'Disable send file to user button', 'admin_levels_avchat3'),
('9990036', '1', 'Enable send file to user button', 'admin_levels_avchat3'),
('9990037', '1', 'Hide send file to user button', 'admin_levels_avchat3'),
('9990038', '1', 'Join rooms button', 'admin_levels_avchat3'),
('9990039', '1', 'Configures the status -enabled, diabled, hidden- of the JOIN ROOM button in the ROOMS LIST window', 'admin_levels_avchat3'),
('9990040', '1', 'Disable join rooms button', 'admin_levels_avchat3'),
('9990041', '1', 'Enable join rooms button', 'admin_levels_avchat3'),
('9990042', '1', 'Hide join rooms button', 'admin_levels_avchat3'),
('9990043', '1', 'Create rooms button', 'admin_levels_avchat3'),
('9990044', '1', 'Configures the status -enabled, diabled, hidden- of the CREATE ROOM button in the ROOMS window', 'admin_levels_avchat3'),
('9990045', '1', 'Disable create rooms button', 'admin_levels_avhcat3'),
('9990046', '1', 'Enable create rooms button', 'admin_levels_avchat3'),
('9990047', '1', 'Hide create rooms button', 'admin_levels_avchat3'),
('9990048', '1', 'Maximum streams a user can watch', 'admin_avchat3'),
('9990049', '1', 'The maximum number of audio,video or audio+video streams a user can view at once, lower this number to reduce bandwidth usage on your media server', 'admin_avchat3'),
('9990050', '1', 'Flood control', 'admin_levels_avchat3'),
('9990051', '1', 'If enabled, after the user sends a message he will have to wait how many milliseconds you set in GLOBAL AVCHAT3 SETTINGS before he can send another message', 'admin_avchat3'),
('9990052', '1', 'Disable flood control', 'admin_levels_avchat3'),
('9990053', '1', 'Enable flood control', 'admin_levels_avchat3'),
('9990054', '1', 'Flood control delay', 'admin_avchat3'),
('9990055', '1', 'If flood control is enabled from AVChat3 user level settings, after the user sends a message he will have to wait how many milliseconds you enter in this field before he can send another message', 'admin_avchat3'),
('9990056', '1', 'Text char limit', 'admin_avchat3'),
('9990057', '1', 'A text message can not be longer than this value -protection against long spam messages and flooding-', 'admin_avchat3'),
('9990058', '1', 'Max rooms one can be in', 'admin_avchat3'),
('9990059', '1', 'The maximum number of rooms a person can be in at any time', 'admin_avchat3'),
('9990060', '1', 'Limit free video time', 'admin_levels_avchat3'),
('9990061', '1', 'The ammount of time -in seconds- that a user can watch other streams in 1 day. Each day starts at midnight -00:00:00- and ends at 23:59:59 the same day, based on the clock of the users computer. Set to -1 to disable. If changed, the countdown on the users computer will reset to the new value when refreshing the chat!', 'admin_levels_avchat3'),
('9990062', '1', 'Max rooms one can be in', 'admin_avchat3'),
('9990063', '1', 'The maximum number of rooms a person can be in at any time', 'admin_avchat3'),
('9990064', '1', 'Username maximum characters', 'admin_avchat3'),
('9990065', '1', 'The maximum numbers of characters a username can have', 'admin_avchat3'),
('9990066', '1', 'Language filter', 'admin_levels_avchat3'),
('9990067', '1', 'If enabled, all words present in the <strong>badwords.xml</strong> will be filtered out from the text chat before they are displayed', 'admin_levels_avchat3'),
('9990068', '1', 'Enable language filter', 'admin_levels_avchat3'),
('9990069', '1', 'Disable language filter', 'admin_levels_avchat3')") ;
}
//######### INSERT AVCHAT3 SPECIFIC LEVELS
$database->database_query("ALTER TABLE `se_levels`
ADD `level_avchat3_freeVideoTime` INT( 6 ) NOT NULL DEFAULT '3200',
ADD `level_avchat3_allowvideobroadcast` INT( 1 ) NOT NULL ,
ADD `level_avchat3_allowaudiobroadcast` INT( 1 ) NOT NULL,
ADD `level_avchat3_allowprivatestreaming` INT( 1 ) NOT NULL,
ADD `level_avchat3_allowEmailsAndUrlsInChat` INT( 1 ) NOT NULL,
ADD `level_avchat3_youTubeVideosEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_sendFileToRoomsEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_sendFileToUserEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_pmEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_joinRoomsEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_createRoomsEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_floodControlEnabled` INT( 1 ) NOT NULL,
ADD `level_avchat3_applyLanguageFilter` INT( 1 ) NOT NULL ");
}
//######### INSERT AVCHAT3 SPECIFIC SETTINGS
$database->database_query("ALTER TABLE `se_settings`
ADD `setting_avchat3_maxStreams` INT( 2 ) NOT NULL DEFAULT '4',
ADD `setting_avchat3_floodControlDelay` INT( 5 ) NOT NULL DEFAULT '300',
ADD `setting_avchat3_textChatCharLimit` INT( 5 ) NOT NULL DEFAULT '200',
ADD `setting_avchat3_maxRoomsOneCanBeIn` INT( 2 ) NOT NULL DEFAULT '4',
ADD `setting_avchat3_usnmaxchars` INT( 3 ) NOT NULL DEFAULT '20' ");
?>