I have some music on my site and i have a flash player to play music. So I want to remove the embeded media player. I hvae a picture attached with the highlighted player that I want to remove. If you guys can point in the right direction liek where I could edit the code for it that would be great. Because I I edit a plugin to go show the flash player if the file being viewed is MP3 so I still want the embbed media player to show up for other files like wma.
Thank You
(http://player.png)
Okay I was able to find a way to do it now.
I copy the function theme_html_picture() from sample theme.php to my current's template's theme.php and just do not set the player.
This is what I did:
if (stristr($picture_url,".WMA") ){ //It will run the code before if the file is not MP3
if ($mime_content['content']=='movie' || $mime_content['content']=='audio') {
if ($CURRENT_PIC_DATA['pwidth']==0 || $CURRENT_PIC_DATA['pheight']==0) {
$CURRENT_PIC_DATA['pwidth'] = 320; // Default width
// Set default height; if file is a movie
if ($mime_content['content']=='movie') {
$CURRENT_PIC_DATA['pheight'] = 240; // Default height
}
}
$ctrl_offset['mov']=15;
$ctrl_offset['wmv']=45;
$ctrl_offset['swf']=0;
$ctrl_offset['rm']=0;
$ctrl_offset_default=45;
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
}
}
Is there a better way to do it?
maybe it's better to change the if statment to :
if (!stristr($picture_url,".mp3") ){ //It will run the code before if the file is not MP3
this way it run on all other type (not just WMA) instead of mp3
thank you
Can we mark this thread as a solved?
Quote from: Sami on October 21, 2006, 07:23:58 AMif (!stristr($picture_url,".mp3") ){ //It will run the code before if the file is not MP3
this way it run on all other type (not just WMA) instead of mp3
This is great!.. Tnx (& for the topic) :)
yeah, it is solved :-) Thank you