|
From: Florin C B. <ory...@us...> - 2013-04-09 12:12:45
|
Update of /cvsroot/mxbb/mx_music/music_box/modules In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3601 Modified Files: music_cat.php music_list.php music_media_cat.php music_page.php music_rate.php Log Message: fixed mp3 play in categories using jw flash player and media player in music page Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_media_cat.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** music_media_cat.php 17 Mar 2013 02:20:23 -0000 1.14 --- music_media_cat.php 9 Apr 2013 12:12:43 -0000 1.15 *************** *** 810,816 **** $url_player = ''; ! // ! // Media Center ! // if(!empty($song_filetype)) { --- 810,834 ---- $url_player = ''; ! // ! // Media Center ! // ! $url_video = $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=" . $song_id)); ! ! //We return the media url via "Music Song" Addon ! if(!empty($thissong['song_url']) && !file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); ! } ! //We return the media url via "Music Song" Addon ! if(!empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); ! } ! //We return the media direct from upload folder ! if(empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; ! } ! if(!empty($song_filetype)) { *************** *** 975,1000 **** $videoid['song_url'] = explode("vimeo.com/", $thissong['song_url']); //clip_id={IDENTIFIER} if (empty($videoid['song_url'][1]) ) ! { ! $videoid['song_url'] = explode("/video/", $thissong['song_url']); } ! if (empty($videoid['song_url'][1]) ) ! { $template->assign_block_vars('songrow.flashvideo', array()); ! $row_type = 'flashvideo'; } else { $template->assign_block_vars('songrow.vimeo', array()); ! $row_type = 'vimeo'; } if ($sitename == 'www.vimeo') { ! $domain = 'vimeo.' . $sitesufix; } $url_download = mx_append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : mx_video_image($thissong['song_url']); ! //$url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/video/' . $videoid['song_url'][1] : $url_download; ! $url_video = $url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/moogaloop.swf?clip_id=' . $videoid['song_url'][1] : $url_download; } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) --- 993,1023 ---- $videoid['song_url'] = explode("vimeo.com/", $thissong['song_url']); //clip_id={IDENTIFIER} if (empty($videoid['song_url'][1]) ) ! { ! $videoid['song_url'] = explode("/video/", $thissong['song_url']); } ! if (empty($videoid['song_url'][1])) ! { $template->assign_block_vars('songrow.flashvideo', array()); ! $row_type = 'flashvideo'; } else { $template->assign_block_vars('songrow.vimeo', array()); ! $row_type = 'vimeo'; } if ($sitename == 'www.vimeo') { ! $domain = 'vimeo.com'; } $url_download = mx_append_sid($thissong['song_url']); + $video_title = mx_video_get_content($thissong['song_url'], 'title'); + $video_desc = mx_video_get_content($thissong['song_url'], 'description'); + $video_views = mx_video_get_content($thissong['song_url'], 'views'); + $video_date = mx_video_get_content($thissong['song_url'], 'upload_date'); + $video_user = mx_video_get_content($thissong['song_url'], 'user_name'); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : mx_video_get_content($thissong['song_url'], 'thumburl'); ! $url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/video/' . $videoid['song_url'][1] : $url_download; ! $url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/moogaloop.swf?clip_id=' . $videoid['song_url'][1] : $url_download; } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) *************** *** 1075,1092 **** } - switch ($song_filetype) - { - case 'flv': - case 'mod': - case 's3m': - case 'ult': - case '.xm': - $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; - break; - - default: - $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); - } - $song_user_ip = (@function_exists( 'decode_ip' )) ? music_decode_ip($songrow[$j]['song_user_ip']) : phpBB2::decode_ip($songrow[$j]['song_user_ip']); --- 1098,1101 ---- Index: music_list.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_list.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** music_list.php 13 Nov 2008 15:55:41 -0000 1.6 --- music_list.php 9 Apr 2013 12:12:43 -0000 1.7 *************** *** 15,18 **** --- 15,32 ---- } + $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); + } + /* +---------------------------------------------------------- Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_page.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** music_page.php 17 Mar 2013 02:20:23 -0000 1.21 --- music_page.php 9 Apr 2013 12:12:43 -0000 1.22 *************** *** 300,303 **** --- 300,319 ---- $url_video = $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=" . $song_id)); + //We return the media url via "Music Song" Addon + if(!empty($thissong['song_url']) && !file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) + { + $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); + } + //We return the media url via "Music Song" Addon + if(!empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) + { + $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); + } + //We return the media direct from upload folder + if(empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) + { + $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; + } + if(!empty($song_filetype)) { *************** *** 410,413 **** --- 426,430 ---- } } + else if(!empty($thissong['song_url'])) { *************** *** 618,636 **** $url_video = $url_download; } - switch ($song_filetype) - { - case 'flv': - case 'mp3': - $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; - break; - case 'mod': - case 's3m': - case 'ult': - case '.xm': - $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; - break; - default: - $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); - } $video_src = ($url_player) ? $url_player : $url_video; --- 635,638 ---- Index: music_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_rate.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** music_rate.php 9 Sep 2008 07:04:33 -0000 1.5 --- music_rate.php 9 Apr 2013 12:12:43 -0000 1.6 *************** *** 258,264 **** } ! $rate_user_id = $userdata['user_id']; ! $rate_user_ip = $userdata['session_ip']; ! // -------------------------------- --- 258,274 ---- } ! switch (PORTAL_BACKEND) ! { ! default; ! case 'internal': ! case 'phpbb2': ! $rate_user_id = $userdata['user_id']; ! $rate_user_ip = $userdata['session_ip']; ! break; ! case 'phpbb3': ! $rate_user_id = $mx_user->data['user_id']; ! $rate_user_ip = music_encode_ip($mx_user->data['session_ip']); ! break; ! } // -------------------------------- Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_cat.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** music_cat.php 17 Mar 2013 02:20:23 -0000 1.20 --- music_cat.php 9 Apr 2013 12:12:42 -0000 1.21 *************** *** 877,883 **** } ! // ! // Media Center ! // if(!empty($thissong['song_url'])) { --- 877,901 ---- } ! // ! // Media Center ! // ! $url_video = $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=" . $song_id)); ! ! //We return the media url via "Music Song" Addon ! if(!empty($thissong['song_url']) && !file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); ! } ! //We return the media url via "Music Song" Addon ! if(!empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $thissong['song_id'], true)); ! } ! //We return the media direct from upload folder ! if(empty($thissong['song_url']) && @file_exists(MUSIC_UPLOAD_PATH . $thissong['song_filename']) ) ! { ! $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; ! } ! if(!empty($thissong['song_url'])) { *************** *** 1103,1108 **** } } ! elseif(!empty($song_filetype)) ! { if ( $song_filetype == 'swf' ) { --- 1121,1127 ---- } } ! ! if(!empty($song_filetype)) ! { if ( $song_filetype == 'swf' ) { *************** *** 1112,1115 **** --- 1131,1142 ---- $row_type = 'flash'; } + else if ($song_filetype == 'mp3') + { + $template->assign_block_vars('songrow.flv', array()); + $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'mediaplayer.swf'; + $mime_type= 'audio/x-mpeg'; //application/x-mplayer2 + $row_type = 'flv'; + } else if ( $song_filetype == 'ram' ) { *************** *** 1173,1184 **** //$row_type = 'mod'; $row_type = 'xmod'; - } - else if ( ( $song_filetype == '.mp3' ) ) - { - $template->assign_block_vars('songrow.flv', array()); - $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); - $url_video = $music_root_path . 'mediaplayer.swf'; - $mime_type= 'audio/x-mpeg'; //application/x-mplayer2 - $row_type = 'flv'; } else if ( ( $song_filetype == '.jpg' ) || ( $song_filetype == '.gif' ) || ( $song_filetype == '.png' ) ) --- 1200,1203 ---- *************** *** 1222,1227 **** $row_type = 'media'; } ! } ! else { $template->assign_block_vars('songrow.media', array()); --- 1241,1246 ---- $row_type = 'media'; } ! } ! elseif(empty($thissong['song_url'])) { $template->assign_block_vars('songrow.media', array()); *************** *** 1240,1296 **** $switch_row_type = 'media'; } - - switch ($song_filetype) - { - case 'flv': - case 'mod': - case 's3m': - case 'ult': - case '.xm': - $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; - break; - case 'mp3': - $url_song = PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . $thissong['song_filename']; - break; - default: - $url_song = mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'], true)); - } $song_user_ip = (@function_exists( 'decode_ip' )) ? music_decode_ip($songrow[$j]['song_user_ip']) : phpBB2::decode_ip($songrow[$j]['song_user_ip']); $template->assign_block_vars('songrow.song_detail', array( 'TITLE' => '<a href="'. mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $songrow[$j]['song_id'])) . '">' . $songrow[$j]['song_title'] . '</a>', - - 'U_SONG' => $url_song, - - 'U_SONG_PAGE' => mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $songrow[$j]['song_id'])), - 'SONG_TITLE' => $thissong['song_title'], - 'DESC' => $thissong['station_desc'], - 'APPROVAL' => $approval_link, ! 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), - 'SONG_FULL_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=800", true)), - 'VIDEO_URL' => !empty($url_player) ? $url_player : $url_video, ! 'MIME_TYPE' => $mime_type, ! 'U_IMG' => mx_append_sid($img_id), ! 'FLASH_PLAYER' => $music_root_path . 'mediaplayer.swf', - 'DUMMY_FLV' => PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . 'no_image.flv', ! 'SINGER' => $songrow[$j]['song_singer'], 'POSTER' => $song_poster, ! 'WIDTH' => ( !empty($media_width) ? $media_width : '425' ), - 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), --- 1259,1289 ---- $switch_row_type = 'media'; } $song_user_ip = (@function_exists( 'decode_ip' )) ? music_decode_ip($songrow[$j]['song_user_ip']) : phpBB2::decode_ip($songrow[$j]['song_user_ip']); $template->assign_block_vars('songrow.song_detail', array( 'TITLE' => '<a href="'. mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $songrow[$j]['song_id'])) . '">' . $songrow[$j]['song_title'] . '</a>', 'SONG_TITLE' => $thissong['song_title'], 'DESC' => $thissong['station_desc'], 'APPROVAL' => $approval_link, ! 'U_SONG' => $url_song, ! 'U_SONG_PAGE' => mx_append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $songrow[$j]['song_id'])), + 'SONG_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : $url_song, 'SONG_THUMB_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=425", true)), 'SONG_FULL_URL' => !empty($thissong['song_url']) ? $thissong['song_url'] : mx_append_sid(this_mo_mxurl("music_mode=music_song&song_id=" . $songrow[$j]['song_id'] . "&item_size=800", true)), 'VIDEO_URL' => !empty($url_player) ? $url_player : $url_video, ! 'MIME_TYPE' => $mime_type, ! 'U_IMG' => $img_id, 'FLASH_PLAYER' => $music_root_path . 'mediaplayer.swf', 'DUMMY_FLV' => PORTAL_URL. str_replace('./', '/', MUSIC_UPLOAD_PATH) . 'no_image.flv', ! 'SINGER' => $songrow[$j]['song_singer'], 'POSTER' => $song_poster, ! 'WIDTH' => ( !empty($media_width) ? $media_width : '425' ), 'HEIGHT' => ( !empty($media_height) ? $media_height : '350' ), *************** *** 1314,1318 **** 'S_ROW_TYPE' => $row_type, - 'SWITCH_ROW_TYPE' => $switch_row_type) ); --- 1307,1310 ---- |