How to turn off media player? How to turn off media player?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How to turn off media player?

Started by dreams83, October 20, 2006, 03:50:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dreams83

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)

dreams83

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?

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

dreams83


Sami

Can we mark this thread as a solved?
‍I don't answer to PM with support question
Please post your issue to related board

bïöµï¢

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) :)

dreams83