Ajout du module OUI FM Radio
This commit is contained in:
parent
8ece766934
commit
81bf7cb785
@ -24,6 +24,10 @@ class clock extends Module {
|
||||
}
|
||||
|
||||
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
33
class/Ouifm.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -234,7 +234,8 @@
|
||||
#recherche{margin-top:70px;}
|
||||
|
||||
#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: */
|
||||
a.green-button,a.green-button:visited, span.green-button{
|
||||
|
BIN
images/interface/music.png
Normal file
BIN
images/interface/music.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 385 B |
12
js/jquery.ouifm.js
Normal file
12
js/jquery.ouifm.js
Normal 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&paramCurrentAudioMode=liveMP3&paramServerUrl=&paramStreamName=&paramStreamUrl='+escape(radioUrl_adswizz)+'&paramBackgroundColor=0x000000&paramButtonsColor=0xcccccc&paramErrorColor=0xff0000&paramAutoplay=1&paramSoundValue=100&paramFlashCookie=0&paramCallback=1" name="flashvars"></object>';
|
||||
$('#ouifm').html(player_object_adswizz);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user