Update of /cvsroot/mxbb/mx_music/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12566/includes Modified Files: music_cat.php music_download.php music_media_cat.php music_page.php music_pic_cat.php music_song.php music_upload.php Log Message: Added flv player ... Index: music_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_upload.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** music_upload.php 8 Sep 2007 13:28:29 -0000 1.6 --- music_upload.php 10 Sep 2007 22:27:40 -0000 1.7 *************** *** 252,255 **** --- 252,257 ---- 'S_SWF' => ($music_config['swf_allowed'] == 1) ? 'SWF,' : '', 'S_QT' => ($music_config['qt_allowed'] == 1) ? 'QT,' : '', + 'S_FLV' => ($music_config['flv_allowed'] == 1) ? 'FLV,' : '', + 'S_IMG' => ($music_config['img_allowed'] == 1) ? 'IMG,' : '', 'S_RM' => ($music_config['rm_allowed'] == 1) ? 'RM,' : '', // Media Center *************** *** 482,485 **** --- 484,497 ---- break; + case 'video/x-flv': + case 'video/flv': + case 'application/octet-stream': + if ($music_config['flv_allowed'] == 0) + { + mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type']); + } + $song_filetype = '.flv'; + break; + case 'audio/x-midi': case 'audio/mid': *************** *** 549,553 **** default: ! mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type']); } } --- 561,565 ---- default: ! mx_message_die(GENERAL_ERROR, $lang['Not_allowed_file_type'] . ': ' . $filetype); } } Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_pic_cat.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_pic_cat.php 8 Sep 2007 13:28:29 -0000 1.2 --- music_pic_cat.php 10 Sep 2007 22:27:40 -0000 1.3 *************** *** 440,443 **** --- 440,452 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 496,509 **** $row_type = 'qt'; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $url_download; ! $row_type = 'img'; ! $template->assign_block_vars('songrow.img', array( ! 'VIDEO_URL' => $url_video, ! 'SONG_URL' => $url_video ! )); } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 505,522 ---- $row_type = 'qt'; } ! else if ( $song_filetype == 'flv' ) { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); ! */ ! $template->assign_block_vars('songrow.flv', array()); ! $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $music_root_path . 'music_player.swf'; ! $row_type = 'flv'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 749,753 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 762,773 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 758,762 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=114", true)), --- 778,782 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=114", true)), *************** *** 766,769 **** --- 786,791 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 948,951 **** --- 970,982 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '85' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'S_AUTH_LIST' => $auth_list) ); Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_cat.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** music_cat.php 8 Sep 2007 13:28:29 -0000 1.8 --- music_cat.php 10 Sep 2007 22:27:39 -0000 1.9 *************** *** 437,440 **** --- 437,449 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 494,497 **** --- 503,521 ---- $row_type = 'qt'; } + else if ( $song_filetype == 'flv' ) + { + /* + if ( !is_object($mx_page) ) + { + $mx_page = new mx_page(); + } + $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); + */ + + $template->assign_block_vars('songrow.flv', array()); + $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'music_player.swf'; + $row_type = 'flv'; + } else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { *************** *** 747,751 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 771,782 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 756,760 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), --- 787,791 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), *************** *** 764,767 **** --- 795,800 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 942,945 **** --- 975,987 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'S_AUTH_LIST' => $auth_list) ); Index: music_song.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_song.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** music_song.php 8 Sep 2007 13:28:29 -0000 1.5 --- music_song.php 10 Sep 2007 22:27:40 -0000 1.6 *************** *** 203,206 **** --- 203,209 ---- $read_function = 'readfile'; break; + case '.flv': + $read_function = 'readfile'; + break; case 'ram': $read_function = 'readfile'; *************** *** 260,263 **** --- 263,269 ---- header('Content-type: video/quicktime'); break; + case 'flv': + header('Content-type: video/x-flv'); + break; case 'ram': header('Content-type: audio/x-pn-realaudio'); Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_media_cat.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_media_cat.php 8 Sep 2007 13:28:29 -0000 1.2 --- music_media_cat.php 10 Sep 2007 22:27:39 -0000 1.3 *************** *** 467,470 **** --- 467,479 ---- $user_id = $thissong['song_user_id']; + if ( $thissong['song_imagename'] == '' ) + { + $img_id = $mx_images['no_image']; + } + else + { + $img_id = ($module_root_path . 'upload/song_image/' . $thissong['song_imagename']); + } + if ( $thissong['song_url'] == '' ) { *************** *** 511,517 **** $row_type = 'qt'; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $row_type = 'img'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 520,526 ---- $row_type = 'qt'; } ! else if ( $song_filetype == 'flv' ) { ! $row_type = 'flv'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 694,697 **** --- 703,710 ---- break; + case 'flv': + $switch_row_type = 'media'; + break; + case 'media': $switch_row_type = 'media'; *************** *** 780,783 **** --- 793,811 ---- $url_video = $url_download; } + else if ( $song_filetype == 'flv' ) + { + + /* + if ( !is_object($mx_page) ) + { + $mx_page = new mx_page(); + } + $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); + */ + + $template->assign_block_vars('songrow.flv', array()); + $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'music_player.swf'; + } else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { *************** *** 1006,1010 **** } ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_block_vars('songrow.song_detail', array( --- 1034,1045 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); ! } $template->assign_block_vars('songrow.song_detail', array( *************** *** 1015,1019 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), --- 1050,1054 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), *************** *** 1023,1026 **** --- 1058,1063 ---- 'VIDEO_URL' => $url_video, + 'U_IMG' => append_sid("$img_id"), + 'SINGER' => $songrow[$j]['song_singer'], *************** *** 1203,1206 **** --- 1240,1252 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'S_AUTH_LIST' => $auth_list) ); Index: music_download.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_download.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** music_download.php 8 Sep 2007 13:28:29 -0000 1.4 --- music_download.php 10 Sep 2007 22:27:39 -0000 1.5 *************** *** 15,51 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } - /* +---------------------------------------------------------- --- 15,21 ---- *************** *** 157,160 **** --- 127,133 ---- header('Content-type: video/quicktime'); break; + case 'flv': + header('Content-type: video/x-flv'); + break; case 'ram': header('Content-type: audio/x-pn-realaudio'); Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_page.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** music_page.php 8 Sep 2007 13:28:29 -0000 1.7 --- music_page.php 10 Sep 2007 22:27:40 -0000 1.8 *************** *** 137,141 **** else { ! $img_id = ( $song_image_path . $thissong['song_imagename'] ); } --- 137,141 ---- else { ! $img_id = $song_image_path . $thissong['song_imagename']; } *************** *** 288,301 **** $url_video = $url_download; } ! else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) { ! $url_download = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $url_download; ! $row_type = 'img'; ! $template->assign_block_vars('img', array( ! 'VIDEO_URL' => $url_video, ! 'SONG_URL' => $url_video ! )); } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) --- 288,304 ---- $url_video = $url_download; } ! else if ( $song_filetype == 'flv' ) { ! /* ! if ( !is_object($mx_page) ) ! { ! $mx_page = new mx_page(); ! } ! $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); ! */ ! $template->assign_block_vars('flv', array()); ! $url_download = append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); ! $url_video = $music_root_path . 'music_player.swf'; } else if ( ( $song_filetype == 'jpg' ) || ( $song_filetype == 'gif' ) || ( $song_filetype == 'png' ) ) *************** *** 510,515 **** } ! //$url_song = append_sid($module_root_path . 'galerie_media.' . $phpEx . '?music_mode=music_song&song_id=' . $song_id); ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); $template->assign_vars(array( --- 513,524 ---- } ! if ( $song_filetype == 'flv' ) ! { ! $url_song = PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; ! } ! else ! { ! $url_song = append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)); ! } $template->assign_vars(array( *************** *** 517,521 **** 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_cat&cat_id=$cat_id")), - //'U_SONG' => append_sid($module_root_path . 'galerie_media.' . $phpEx . '?music_mode=music_song&song_id=' . $song_id), 'U_SONG' => $url_song, --- 526,529 ---- *************** *** 524,528 **** 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id, true)), 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id . "&item_size=425", true)), --- 532,536 ---- 'SONG_TITLE' => $thissong['song_title'], ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $song_id . "&item_size=425", true)), *************** *** 572,575 **** --- 580,592 ---- 'HEIGHT' => ( !empty($media_height) ? $media_height : '300' ), + 'FLASH' => 'flash', + 'RAM' => 'ram', + 'FLASHVIDEO' => 'flashvideo', + 'YOUTUBE' => 'youtube', + 'QT' => 'qt', + 'FLV' => 'flv', + 'IMG' => 'img', + 'MEDIA' => 'media', + 'L_RATING' => $lang['Rating'], 'L_SONG_TITLE' => $lang['Song_Title'], |