radiolive dans un modele + une fonction php (au cas où, un inclure
radiolive en SPIP)
This commit is contained in:
parent
5c799e24a5
commit
1ad28849e4
@ -226,4 +226,29 @@ function titre_chronique_court($titre) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function radiolive() {
|
||||||
|
$dateetheure= time();
|
||||||
|
|
||||||
|
$h1=strtotime("15:15:00");
|
||||||
|
$h2=strtotime(date ('H:i:s',$dateetheure));
|
||||||
|
|
||||||
|
$radio = '';
|
||||||
|
|
||||||
|
if((date("w", $dateetheure ) == 2) && ($h2 >= $h1) && (date("G", $dateetheure ) < 17)) {
|
||||||
|
// $radio = 'live';
|
||||||
|
|
||||||
|
$radio = '
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<div style="font-family: sans-serif; text-align: center;
|
||||||
|
background-color: white; padding: 2px; border: 4px solid #ee5921;
|
||||||
|
color: black; margin-top: 1em; width: 90%; min-width: 260px; max-width: 400px; margin: 1em auto; -webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 2px; border-radius: 4px;" >
|
||||||
|
<h4>Écoutez le direct (mardi 15h30 à 17h)</h4>
|
||||||
|
<audio controls> <source src="https://icecast.libre-a-toi.org:8444/voixdulat_mp3" type="audio/mpeg">.Votre navigateur ne supporte pas l\'élément <code>audio</code> : <a href="https://icecast.libre-a-toi.org:8444/voixdulat_mp3">écoutez l\'émission</a>.</audio>
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $radio;
|
||||||
|
|
||||||
|
}
|
||||||
|
20
squelettes/inclure/radiolive.html
Normal file
20
squelettes/inclure/radiolive.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#CACHE{0}
|
||||||
|
#SET{radio,off}
|
||||||
|
[(#ENV{date}|nom_jour|=={mardi}|oui)
|
||||||
|
[(#ENV{date}|heures|>={15}|oui)
|
||||||
|
[(#ENV{date}|minutes|>={15}|oui)
|
||||||
|
#SET{radio,live}
|
||||||
|
]
|
||||||
|
][(#ENV{date}|heures|>={17}|oui)
|
||||||
|
#SET{radio,off}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[(#GET{radio}|=={live}|oui)
|
||||||
|
<div class="radiolive" style="text-align:center;font-family: sans-serif; text-align: center;
|
||||||
|
background-color: white; padding: 2px; border: 4px solid #ee5921;
|
||||||
|
color: black; margin-top: 1em; width: 90%; min-width: 260px; max-width: 400px; margin: 1em auto; -webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 2px; border-radius: 4px;" >
|
||||||
|
<h4>Écoutez le direct (mardi 15h30 à 17h)</h4>
|
||||||
|
<audio controls> <source src="https://icecast.libre-a-toi.org:8444/voixdulat_mp3" type="audio/mpeg">.Votre navigateur ne supporte pas l\'élément <code>audio</code> : <a href="https://icecast.libre-a-toi.org:8444/voixdulat_mp3">écoutez l\'émission</a>.</audio>
|
||||||
|
</div>
|
||||||
|
]
|
2
squelettes/modeles/radiolive.html
Normal file
2
squelettes/modeles/radiolive.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[(#REM) modele radiolive ]
|
||||||
|
[(#VAL|radiolive)]
|
Loading…
Reference in New Issue
Block a user