- 30, Mar 2023
- #1
Открыть engine/ajax/upload.php
найти
Код:$allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv" );заменить на
Код:$allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv", "pdf", "pptx", "pptm", "ppt", "tiff" );Найти 2 раза
Код:if( $file_type == "mp3" ) { $file_link = $config['http_home_url'] . "engine/skins/images/mp3_file.png";$data_url = $config['http_home_url'] . "uploads/files/" . $row['onserver'];$file_play = "audio";}Ниже добавить
Код: elseif ($file_type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff"){$file_link = $config['http_home_url'] . "engine/skins/images/video_file.png";$data_url = $config['http_home_url'] . "uploads/files/" . $row['onserver'];$file_play = "docs"; }Найти
Код:if ( mode == "video" || mode == "audio" || mode == "flash") {Заменить на
Код:if ( mode == "video" || mode == "audio" || mode == "flash" || mode == "docs") {Найти
Код:if ( mode == "video" ) $('#imgparam3').html('');Ниже вставить
Код: if ( mode == "docs" ) $('#imgparam3').html('');
Открыть файл engine/classes/parse.class.php, найти
Код:$source = preg_replace_callback( "#\[flash=([^\]]+)\](.+?)\[/flash\]#i", array( & $this, 'build_flash'), $source );Ниже
Код:$source = preg_replace( "#\[docs=([^\]]+)\]#ies", "\$this->build_docs('\\1')", $source );Найти
Код:$txt = preg_replace_callback( "#(.+?)#is", array( & $this, 'decode_flash'), $txt );Ниже
Код:$txt = preg_replace( "#(.+?)#is", '[docs=\\1]', $txt );Найти
Код: function build_email( $matches=array() ) { $matches[1] = $this->clear_url( $matches[1] ); return "{$matches[2]}"; }Ниже
Код:function build_docs($url) {$url = $this->clear_url( urldecode( $url ) );if ($url == "" ) return;if ( $file_type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff" ) return "[docs=". $url."]";return ""; }открываем engine/classes/uploads/upload.class.php ищем
Кодrivate $allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv", );Меняем на Кодrivate $allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv","pdf", "pptx", "pptm", "ppt", "tiff" );Далее ищем два раза
Код: if( $type == "mp3" ) { $file_link = $config['http_home_url'] . "engine/skins/images/mp3_file.png"; $data_url = $config['http_home_url'] . "uploads/files/" . FOLDER_PREFIX . $uploaded_filename; $file_play = "audio"; } И ниже вставляем оба раза
Кодlseif ($type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff") { $file_link = $config['http_home_url'] . "engine/skins/images/video_file.png"; $data_url = $config['http_home_url'] . "uploads/files/" . FOLDER_PREFIX . $uploaded_filename; $file_play = "docs"; } в файле /upload/files/.htaccess добавить эти расширения ну и в настройках групп разрешить загрузку.
найти
Код:$allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv" );заменить на
Код:$allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv", "pdf", "pptx", "pptm", "ppt", "tiff" );Найти 2 раза
Код:if( $file_type == "mp3" ) { $file_link = $config['http_home_url'] . "engine/skins/images/mp3_file.png";$data_url = $config['http_home_url'] . "uploads/files/" . $row['onserver'];$file_play = "audio";}Ниже добавить
Код: elseif ($file_type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff"){$file_link = $config['http_home_url'] . "engine/skins/images/video_file.png";$data_url = $config['http_home_url'] . "uploads/files/" . $row['onserver'];$file_play = "docs"; }Найти
Код:if ( mode == "video" || mode == "audio" || mode == "flash") {Заменить на
Код:if ( mode == "video" || mode == "audio" || mode == "flash" || mode == "docs") {Найти
Код:if ( mode == "video" ) $('#imgparam3').html('');Ниже вставить
Код: if ( mode == "docs" ) $('#imgparam3').html('');
Открыть файл engine/classes/parse.class.php, найти
Код:$source = preg_replace_callback( "#\[flash=([^\]]+)\](.+?)\[/flash\]#i", array( & $this, 'build_flash'), $source );Ниже
Код:$source = preg_replace( "#\[docs=([^\]]+)\]#ies", "\$this->build_docs('\\1')", $source );Найти
Код:$txt = preg_replace_callback( "#(.+?)#is", array( & $this, 'decode_flash'), $txt );Ниже
Код:$txt = preg_replace( "#(.+?)#is", '[docs=\\1]', $txt );Найти
Код: function build_email( $matches=array() ) { $matches[1] = $this->clear_url( $matches[1] ); return "{$matches[2]}"; }Ниже
Код:function build_docs($url) {$url = $this->clear_url( urldecode( $url ) );if ($url == "" ) return;if ( $file_type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff" ) return "[docs=". $url."]";return ""; }открываем engine/classes/uploads/upload.class.php ищем
Кодrivate $allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv", );Меняем на Кодrivate $allowed_video = array ("avi", "mp4", "wmv", "mpg", "flv", "mp3", "swf", "m4v", "m4a", "mov", "3gp", "f4v", "mkv","pdf", "pptx", "pptm", "ppt", "tiff" );Далее ищем два раза
Код: if( $type == "mp3" ) { $file_link = $config['http_home_url'] . "engine/skins/images/mp3_file.png"; $data_url = $config['http_home_url'] . "uploads/files/" . FOLDER_PREFIX . $uploaded_filename; $file_play = "audio"; } И ниже вставляем оба раза
Кодlseif ($type == "pdf" or $file_type == "pptx" or $file_type == "pptm" or $file_type == "ppt" or $file_type == "tiff") { $file_link = $config['http_home_url'] . "engine/skins/images/video_file.png"; $data_url = $config['http_home_url'] . "uploads/files/" . FOLDER_PREFIX . $uploaded_filename; $file_play = "docs"; } в файле /upload/files/.htaccess добавить эти расширения ну и в настройках групп разрешить загрузку.