diff --git a/main/document/document.inc.php b/main/document/document.inc.php index 0a9b819523..3758ee9d62 100755 --- a/main/document/document.inc.php +++ b/main/document/document.inc.php @@ -231,17 +231,33 @@ function create_document_link($document_data, $show_as_icon = false) { } //target="'.$target.'" if ($filetype == 'file') { - return ''.$title.''.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon; + if(preg_match('/swf$/', urldecode($url)) || (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')){ + $url = 'showinframesmin.php?'.api_get_cidreq().'&id='.$document_data['id'].$req_gid; + return ''.$title.''.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon; + }else{ + return ''.$title.''.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon; + } } else { return ''.$title.''.$force_download_html.$copy_to_myfiles.$open_in_new_window_link.$pdf_icon; } //end copy files to users myfiles } else { + //icons colum if(preg_match('/shared_folder/', urldecode($url)) && preg_match('/shared_folder$/', urldecode($url))==false && preg_match('/shared_folder_session_'.$current_session_id.'$/', urldecode($url))==false){ return ''.build_document_icon_tag($filetype, $path).Display::return_icon('shared.png', get_lang('ResourceShared'), array('hspace' => '5', 'align' => 'middle', 'height' => 22, 'width' => 22)).''; } else { - return ''.build_document_icon_tag($filetype, $path).''; - } + if($filetype == 'file') { + if(preg_match('/swf$/', urldecode($url)) || (preg_match('/wav$/', urldecode($url)) && api_get_setting('enable_nanogong') == 'true')){ + $url = 'showinframesmin.php?'.api_get_cidreq().'&id='.$document_data['id'].$req_gid; + return ''.build_document_icon_tag($filetype, $path).''; + }else{ + return ''.build_document_icon_tag($filetype, $path).''; + } + } + else { + return ''.build_document_icon_tag($filetype, $path).''; + } + } } } diff --git a/main/document/document.php b/main/document/document.php index f267e092a1..8c63c3d3e2 100755 --- a/main/document/document.php +++ b/main/document/document.php @@ -72,7 +72,7 @@ $(document).ready( function() { $(".yoxview").yoxview({ lang: "'.$lang_yoxview.'", flashVideoPlayerPath: "'.$mediaplayer_path.'", - skin: "top_menu", + renderMenu: "false", titleAttribute:"alt" }); for (i=0;i<$(".actions").length;i++) { @@ -1100,9 +1100,9 @@ if (count($docs_and_folders) > 1) { $table->set_form_actions($form_action, 'path'); } } -echo '