Ajout du module OUI FM Radio

This commit is contained in:
Chouchen 2010-09-21 16:07:23 +00:00
parent 8ece766934
commit 81bf7cb785
5 changed files with 52 additions and 2 deletions

View File

@ -24,6 +24,10 @@ class clock extends Module {
} }
public static function updateConfig($updated){ public static function updateConfig($updated){
foreach ($updated as $what=>$withWhat){
if(in_array($what, self::$paramsList)){
call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
}
}
} }
} }

33
class/Ouifm.php Normal file
View File

@ -0,0 +1,33 @@
<?php
class ouifm extends Module {
protected static $paramsList = array(
'visibility',
'x',
'y'
);
public $params = array();
public function __construct($params){
$this->setParams($params);
echo '<script type="text/javascript" src="js/jquery.ouifm.js"></script>';
echo '<div id="ouifm" style="left:'.$params['x'].'; top:'.$params['y'].';"></div>';
}
private function setParams($params){
$this->params = $params;
}
public static function start($params){
$ouifm = new ouifm($params);
}
public static function updateConfig($updated){
foreach ($updated as $what=>$withWhat){
if(in_array($what, self::$paramsList)){
call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
}
}
}
}

View File

@ -234,7 +234,8 @@
#recherche{margin-top:70px;} #recherche{margin-top:70px;}
#config {width:300px;} #config {width:300px;}
#config-menu, #blog-links-manager, #city-menu , #jclockAdvanced-menu, #links-menu{float:right; margin:12px 10px 0 0;} #config-menu, #blog-links-manager, #city-menu , #jclockAdvanced-menu, #links-menu, #ouifm-menu{float:right; margin:12px 10px 0 0;}
#ouifm{position:absolute;width:144px;height:28px;}
/* Green button class: */ /* Green button class: */
a.green-button,a.green-button:visited, span.green-button{ a.green-button,a.green-button:visited, span.green-button{

BIN
images/interface/music.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

12
js/jquery.ouifm.js Normal file
View File

@ -0,0 +1,12 @@
$(document).ready(function(){
$('body').append('<img src="images/interface/music.png" id="ouifm-menu"/>');
$('#menu-bar').prepend($('#ouifm-menu'));
$('#ouifm-menu').click(function(){
var radioUrl_adswizz="http://ouifm.ice.infomaniak.ch/ouifm-high.mp3";
// radioUrl_adswizz=com_adswizz_synchro_decorateUrl(radioUrl_adswizz);
var player_object_adswizz='<object data="http://www.ouifm.fr/scripts_player/miniPlayer.swf" name="name_player_radio_1829" id="id_player_radio_894_1829" type="application/x-shockwave-flash" height="28" width="144"><param value="false" name="menu"><param value="always" name="AllowScriptAccess"><param value="transparent" name="wmode"><param value="noscale" name="scale"><param value="lt" name="salign"><param value="#ffffff" name="bgcolor"><param value="high" name="quality"><param value="false" name="allowfullscreen"><param value="objId=id_player_radio_894_1829&amp;paramCurrentAudioMode=liveMP3&amp;paramServerUrl=&amp;paramStreamName=&amp;paramStreamUrl='+escape(radioUrl_adswizz)+'&amp;paramBackgroundColor=0x000000&amp;paramButtonsColor=0xcccccc&amp;paramErrorColor=0xff0000&amp;paramAutoplay=1&amp;paramSoundValue=100&amp;paramFlashCookie=0&amp;paramCallback=1" name="flashvars"></object>';
$('#ouifm').html(player_object_adswizz);
});
});