Advanced search  

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

Pages: [1]   Go Down

Author Topic: How to turn off media player?  (Read 4306 times)

0 Members and 1 Guest are viewing this topic.

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
How to turn off media player?
« on: October 20, 2006, 03:50:15 am »

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)
« Last Edit: October 23, 2006, 09:26:28 am by Sami »
Logged

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
Re: How to turn off media player?
« Reply #1 on: October 20, 2006, 10:51:02 pm »

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:


Code: [Select]
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?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to turn off media player?
« Reply #2 on: October 21, 2006, 07:23:58 am »

maybe it's better to change the if statment to :
Code: [Select]
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
Logged
‍I don't answer to PM with support question
Please post your issue to related board

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
Re: How to turn off media player?
« Reply #3 on: October 22, 2006, 07:36:49 am »

thank you
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to turn off media player?
« Reply #4 on: October 22, 2006, 07:42:02 am »

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

bïöµï¢

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: How to turn off media player?
« Reply #5 on: October 23, 2006, 02:49:40 am »

Code: [Select]
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

This is great!.. Tnx (& for the topic) :)
Logged

dreams83

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 54
Re: How to turn off media player?
« Reply #6 on: October 23, 2006, 09:23:58 am »

yeah, it is solved :-) Thank you
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.