|
From: Florin C B. <ory...@us...> - 2011-07-17 02:33:33
|
Update of /cvsroot/mxbb/mx_music/music_box/modules
In directory vz-cvs-4.sog:/tmp/cvs-serv30161/music_box/modules
Modified Files:
music_cat.php music_edit.php music_media_cat.php
music_page.php music_pic_cat.php
Log Message:
image file or image url in imagename - plist using preg
Index: music_media_cat.php
===================================================================
RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_media_cat.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** music_media_cat.php 10 Sep 2008 06:54:22 -0000 1.10
--- music_media_cat.php 17 Jul 2011 02:33:30 -0000 1.11
***************
*** 9,13 ****
*/
! //mxBB
if ( !defined('IN_PORTAL') )
{
--- 9,13 ----
*/
! //MXP
if ( !defined('IN_PORTAL') )
{
***************
*** 16,19 ****
--- 16,20 ----
$music_root_path = $module_root_path . 'music_box/';
+ $song_image_default = $images['no_image']; // The default image
// ------------------------------------
***************
*** 470,474 ****
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
if ( $thissong['song_imagename'] == '' )
{
--- 471,478 ----
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
! //Image Edit Added by OryNider from Radio Cast
! $thispattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/';
!
if ( $thissong['song_imagename'] == '' )
{
***************
*** 493,499 ****
if ( ($thissong['song_filetype'] == '') || ($song_filetype) && ($thissong['song_filetype'] != $song_filetype) )
{
! //
! // Update the song filetype
! //
$sql = "UPDATE " . MUSIC_TABLE . "
SET song_filetype = '" . $song_filetype . "'
--- 497,503 ----
if ( ($thissong['song_filetype'] == '') || ($song_filetype) && ($thissong['song_filetype'] != $song_filetype) )
{
! //
! // Update the song filetype
! //
$sql = "UPDATE " . MUSIC_TABLE . "
SET song_filetype = '" . $song_filetype . "'
Index: music_edit.php
===================================================================
RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_edit.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** music_edit.php 29 Jan 2008 07:51:05 -0000 1.2
--- music_edit.php 17 Jul 2011 02:33:30 -0000 1.3
***************
*** 9,13 ****
*/
! // MX
if ( !defined('IN_PORTAL') )
{
--- 9,13 ----
*/
! // MXP
if ( !defined('IN_PORTAL') )
{
***************
*** 15,21 ****
}
- $music_root_path = $module_root_path . 'music_box/';
//Image Edit Added by OryNider
$song_image_path = MUSIC_IMAGE_PATH;
// ------------------------------------
--- 15,22 ----
}
//Image Edit Added by OryNider
$song_image_path = MUSIC_IMAGE_PATH;
+ $music_root_path = $module_root_path . 'music_box/';
+ $song_image_default = $images['no_image']; // The default image
// ------------------------------------
***************
*** 61,65 ****
}
- //Image Edit Added by OryNider
if( !empty($thissong['song_imagename']) )
{
--- 62,65 ----
Index: music_page.php
===================================================================
RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_page.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** music_page.php 5 Jan 2011 00:00:03 -0000 1.16
--- music_page.php 17 Jul 2011 02:33:30 -0000 1.17
***************
*** 25,29 ****
! // MX
if ( !defined('IN_PORTAL') )
{
--- 25,29 ----
! // MXP
if ( !defined('IN_PORTAL') )
{
***************
*** 32,37 ****
$music_root_path = $module_root_path . 'music_box/';
- $song_image_path = MUSIC_IMAGE_PATH;
$song_image_default = $images['no_image']; // The default image
// ------------------------------------
--- 32,37 ----
$music_root_path = $module_root_path . 'music_box/';
$song_image_default = $images['no_image']; // The default image
+ $song_image_path = MUSIC_IMAGE_PATH;
// ------------------------------------
***************
*** 131,142 ****
}
! if ( !$thissong['song_imagename'] )
{
! $img_id = $song_image_default;
}
! else
{
$img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . $thissong['song_imagename']);
}
if ( !$thissong['song_url'] )
--- 131,149 ----
}
! //Image Edit Added by OryNider from Radio Cast
! $thispattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/';
!
! if ($result = preg_match($thispattern, $thissong['song_imagename']))
{
! $img_id = $thissong['song_imagename'];
}
! else if (!empty($thissong['song_imagename']))
{
$img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . $thissong['song_imagename']);
}
+ else
+ {
+ $img_id = $song_image_default;
+ }
if ( !$thissong['song_url'] )
***************
*** 286,290 ****
$template->assign_block_vars('ogg', array());
! if ( $thisstation['song_url'] == '' )
{
$url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id"));
--- 293,297 ----
$template->assign_block_vars('ogg', array());
! if ( $thissong['song_url'] == '' )
{
$url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id"));
Index: music_pic_cat.php
===================================================================
RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_pic_cat.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** music_pic_cat.php 10 Sep 2008 06:54:22 -0000 1.9
--- music_pic_cat.php 17 Jul 2011 02:33:30 -0000 1.10
***************
*** 9,13 ****
*/
! //mxBB
if ( !defined('IN_PORTAL') )
{
--- 9,13 ----
*/
! //MXP
if ( !defined('IN_PORTAL') )
{
***************
*** 15,18 ****
--- 15,21 ----
}
+ $music_root_path = $module_root_path . 'music_box/';
+ $song_image_default = $images['no_image']; // The default image
+
// ------------------------------------
// Check the request
***************
*** 442,456 ****
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
! if ( $thissong['song_imagename'] == '' )
{
! $img_id = $images['no_image'];
}
! else
{
$img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . $thissong['song_imagename']);
}
! if ( $thissong['song_url'] == '' )
{
$song_filetype = substr($thissong['song_filename'], strlen($thissong['song_filename']) - 3, 3);
--- 445,466 ----
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
! //Image Edit Added by OryNider from Radio Cast
! $thispattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/';
!
! if ($result = preg_match($thispattern, $thissong['song_imagename']))
{
! $img_id = $thissong['song_imagename'];
}
! else if (!empty($thissong['song_imagename']))
{
$img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . $thissong['song_imagename']);
}
+ else
+ {
+ $img_id = $song_image_default;
+ }
! if ($thissong['song_url'] == '')
{
$song_filetype = substr($thissong['song_filename'], strlen($thissong['song_filename']) - 3, 3);
Index: music_cat.php
===================================================================
RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_cat.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** music_cat.php 5 Jan 2011 00:00:03 -0000 1.15
--- music_cat.php 17 Jul 2011 02:33:30 -0000 1.16
***************
*** 9,13 ****
*/
! //mxBB
if ( !defined('IN_PORTAL') )
{
--- 9,13 ----
*/
! //MXP
if ( !defined('IN_PORTAL') )
{
***************
*** 16,19 ****
--- 16,20 ----
$music_root_path = $module_root_path . 'music_box/';
+ $song_image_default = $images['no_image']; // The default image
// ------------------------------------
***************
*** 789,800 ****
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
! if ( $thissong['song_imagename'] == '' )
{
! $img_id = $images['no_image'];
}
else
{
! $img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . $thissong['song_imagename']);
}
--- 790,808 ----
$cat_id = $thissong['song_cat_id'];
$user_id = $thissong['song_user_id'];
!
! //Image Edit Added by OryNider from Radio Cast
! $thispattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/';
!
! if ($result = preg_match($thispattern, $thissong['station_imagename']))
{
! $img_id = $thissong['station_imagename'];
! }
! else if (!empty($thissong['station_imagename']))
! {
! $img_id = (PORTAL_URL . str_replace('./', '/', MUSIC_IMAGE_PATH) . . $thissong['station_imagename']);
}
else
{
! $img_id = $song_image_default;
}
|