Jump to content

Lux05

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Lux05

  1. Hi, Dose someone know how to change the output to "Days, Hours, Minutes, Seconds," instead of only Seconds? echo '<div style="float:right;width:60%;color:#666666">'. TeamSpeak3_Helper_Convert::version($ts3->virtualserver_uptime) .'</div>';
  2. HI With my limited PHP knowledges i tried to modify a PHP script to replace the simple MP3 player with the JW Player and luckily i managed to do this but the last task i wanted to do im stuck. The last task i wanted to do was if an Audio file was detected it would use the Audio script for the JW Player to play the file. But i had no luck on doing this so i hop someone with more PHP knowledges can help out here. Working Script Code for all files: // mp3 player if ($file->extern_file){ $extern_mp3 = true; $filetype = strtolower(substr(strrchr($file->extern_file, '.'), 1)); } else { $filetype = strtolower(substr(strrchr($file->url_download, '.'), 1)); $extern_mp3 = false; } if ($filetype == 'mp4' || $filetype == 'mov' || $filetype == 'flv' || $filetype == '3gp' || $filetype == '3g2' || $filetype == 'aac' || $filetype == 'm4a' || $filetype == 'mp3'){ if ($extern_mp3){ $mp3_path = $file->extern_file; } else { $mp3_path = JURI::base().$jlistConfig['files.uploaddir'].'/'.$cat->cat_dir.'/'.$file->url_download; } $mp3_player = '<script type="text/javascript" src="/components/com_jdownloads/jwplayer/jwplayer.js"></script> <div id="container">Loading the media player ...</div> <script type="text/javascript"> jwplayer("container").setup({ flashplayer: "/components/com_jdownloads/jwplayer/player.swf", backcolor: "333333", frontcolor: "FFFFFF", lightcolor: "FF0000", screencolor: "000000", controlbar: "bottom", file: "'.$mp3_path.'", volume: 50, height: 384, width: 480, plugins: "timeslidertooltipplugin-1" }); </script>'; if ($extern_mp3){ $mp3_path_abs = JPATH_BASE.DS.$jlistConfig['files.uploaddir'].DS.$cat->cat_dir.DS.$file->url_download; } $html_file = str_replace('{mp3_player}', $mp3_player, $html_file); } else { $html_file = str_replace('{mp3_player}', '', $html_file); } JW Player code that should be used for the Audio files: <script type="text/javascript" src="/components/com_jdownloads/jwplayer/jwplayer.js"></script> <div id="container">Loading the media player ...</div> <script type="text/javascript"> jwplayer("container").setup({ flashplayer: "/components/com_jdownloads/jwplayer/player.swf", backcolor: "333333", frontcolor: "FFFFFF", lightcolor: "FF0000", screencolor: "000000", controlbar: "bottom", file: "'.$mp3_path.'", volume: 50, height: 24, width: 480, plugins: "timeslidertooltipplugin-1" }); </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.