|
From: <ara...@us...> - 2007-04-27 12:18:46
|
Revision: 128
http://svn.sourceforge.net/easybox-mod/?rev=128&view=rev
Author: aragornis
Date: 2007-04-27 05:18:41 -0700 (Fri, 27 Apr 2007)
Log Message:
-----------
Ajout du module Dailymotion
Modified Paths:
--------------
trunk/_utilisateur/modules.db
Added Paths:
-----------
trunk/module/dailymotion/
trunk/module/dailymotion/dailymotion.tpl
trunk/module/dailymotion/icone.gif
trunk/module/dailymotion/index1.php
trunk/module/dailymotion/play_dailymotion.php
trunk/ressources/icones/Dailymotion.gif
Modified: trunk/_utilisateur/modules.db
===================================================================
(Binary files differ)
Added: trunk/module/dailymotion/dailymotion.tpl
===================================================================
--- trunk/module/dailymotion/dailymotion.tpl (rev 0)
+++ trunk/module/dailymotion/dailymotion.tpl 2007-04-27 12:18:41 UTC (rev 128)
@@ -0,0 +1,38 @@
+{assign var=NUM_ROW_AFFICH value=10}
+{section name=clip loop=$CLIP max=$NUM_ROW_AFFICH start=0}
+{cycle name=place assign=place print=false values="4,3,2,1,0"}
+ {if $smarty.section.clip.first}
+ <table border="0" cellpadding="0" cellspacing="0" width="500" align="center"><tr>
+ {if $MIN!=0}
+ <td colspan="5" align=center>{precedent}</td></tr><tr>
+ {/if}
+ {/if}
+
+ <td width="100" height="150"><a href="play_dailymotion.php?url={$CLIP[clip].url|urlencode}&show={$SHOW}&min={$MIN}&string={$string}"><table border="0" cellpadding="0" cellspacing="0" width="100" height="120" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="80"><td width="100" height="80" valign="middle" align="center"><img width="80" height="60" border="0" src="{$IMG2FBX}{$CLIP[clip].img|urlencode}&new_width=80&new_height=60&cache=1"></td></tr><tr height="70"><td width="100" height="70" valign="middle" align=center><font size="1">{$CLIP[clip].titre|truncate:30:"":true|wordwrap:15:"<br>":true} ({$CLIP[clip].temps})</font></td></tr></table></a></td>
+
+ {if $smarty.section.clip.iteration is div by 5 AND NOT $smarty.section.files.last}
+ </tr><tr>
+ {/if}
+
+ {if $smarty.section.clip.last}
+ {if $place >= 4}<td> </td>{/if}
+ {if $place >= 3}<td> </td>{/if}
+ {if $place >= 2}<td> </td>{/if}
+ {if $place >= 1}<td> </td>{/if}
+ </tr>
+ <tr><td colspan="5" align="center" height="25" valign="bottom">{if $MIN+$NUM_ROW_AFFICH < $TOTAL}{suivant} - {/if}{$DEB} \xE0 {$FIN}</td></tr>
+ </table>
+ {/if}
+{sectionelse}
+ {if $SHOW=='rec'}
+ {if $string!=''}Aucune vid\xE9o trouv\xE9e pour la requ\xEAte : "{$string}".{else}Veuillez entrer votre recherche ci-dessous.{/if}
+ {/if}
+{/section}
+
+{if $SHOW=='rec'}
+<br>Recherche<br> <br><form name="form1" method="get" action="index1.php">
+<input name="show" type="hidden" value="rec">
+<input name="string" bgcolor="{#COULEUR_TEXTBOX#}" type="text" charset="digit|alpha|caps" value="" size="20">
+</form><br>
+La touche {literal}#{/literal} permet de changer entre les minuscules/majuscules et les chiffres.
+{/if}
Added: trunk/module/dailymotion/icone.gif
===================================================================
(Binary files differ)
Property changes on: trunk/module/dailymotion/icone.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/module/dailymotion/index1.php
===================================================================
--- trunk/module/dailymotion/index1.php (rev 0)
+++ trunk/module/dailymotion/index1.php 2007-04-27 12:18:41 UTC (rev 128)
@@ -0,0 +1,78 @@
+<?
+$RACINE_REP = "../../";
+require($RACINE_REP.'_framework/framework.php');
+
+ini_set('user_agent', "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)");
+$LINK['red']= page_retour_menu();
+(isset($_GET['show'])?$show=$_GET['show']:$show='vus');
+
+$MENU_ALT=array(array('lien'=>'index1.php?show=recent', 'nom'=>'R\xE9cents', 'selected'=>$show=='recent'),
+ array('lien'=>'index1.php?show=vus', 'nom'=>'Plus vus', 'selected'=>$show=='vus'),
+ array('lien'=>'index1.php?show=note', 'nom'=>'Mieux not\xE9s', 'selected'=>$show=='note'),
+ array('lien'=>'index1.php?show=rec', 'nom'=>'Recherche', 'selected'=>$show=='rec'));
+
+
+function get_videos_id($page){
+ $xml = simplexml_load_file($page);
+
+ foreach($xml->channel->item as $item){
+ $img = '';
+ foreach($item->xpath('media:thumbnail') as $k){
+ $img = $k['url'];
+ }
+ foreach($item->xpath('enclosure') as $k){
+ $url = $k['url'];
+ $length = intval($k['length']);
+ }
+ $retour[] = array('temps'=>date('i:s',$length), 'titre'=>utf8_decode($item->title), 'url'=>$url, 'img'=>$img);
+ }
+ return($retour);
+}
+
+if($show=='recent'){
+ $url = 'http://www.dailymotion.com/rss/';
+ $nb_p = 15;
+}elseif($show=='vus'){
+ $url = 'http://www.dailymotion.com/rss/visited-week/';
+ $nb_p = 5;
+}elseif($show=='note'){
+ $url = 'http://www.dailymotion.com/rss/rated-week/';
+ $nb_p = 5;
+}elseif($show=='rec'){
+ (isset($_GET['string'])?$string=$_GET['string']:$string='');
+ $url = 'http://www.dailymotion.com/rss/relevance/search/'.$string.'/';
+ $sup = '&string='.$string;
+}
+
+// Lancement de la gestion multipage
+start_multi('index1.php?show='.$show.$sup,10);
+
+// D\xE9termination de la page
+$page = floor($min/10)+1;
+
+$url = $url.$page;
+
+if(!($show=='rec' and $string=='')){
+ $res = get_videos_id($url);
+ if(count($res)==10){
+ $total = ($page+5)*10;
+ }else{
+ $total = ($page-1)*10+count($res);
+ }
+ $deb = ($page-1)*10+1;
+ $fin = $page*10;
+}
+
+$smarty->assign('string',$string);
+$smarty->assign('lettres',$lettres);
+$smarty->assign('SHOW',$show);
+$smarty->assign('TOTAL',$total);
+$smarty->assign('DEB',$deb);
+$smarty->assign('FIN',$fin);
+$smarty->assign('CLIP',$res);
+$smarty->assign('MIN',$min);
+$smarty->assign('START',$start);
+
+$smarty->assign('CONTENT',$smarty->fetch('dailymotion.tpl'));
+$smarty->display('interface.tpl');
+?>
Added: trunk/module/dailymotion/play_dailymotion.php
===================================================================
--- trunk/module/dailymotion/play_dailymotion.php (rev 0)
+++ trunk/module/dailymotion/play_dailymotion.php 2007-04-27 12:18:41 UTC (rev 128)
@@ -0,0 +1,38 @@
+<?php
+$RACINE_REP = "../../";
+require($RACINE_REP.'_framework/framework.php');
+$BACKGROUND='none';
+
+ $url = urldecode($_REQUEST['url']);
+
+
+ save_variable('backToURL', dirname($_SERVER['SCRIPT_NAME']).'/index1.php?show='.$_GET['show'].'&start='.$_GET['min'].'&string='.$_GET['string']);
+ play_fichier('type=40',$url,0,'backToURL');
+
+ $LINK['stop']=$MODULE.'films/lecture.php?control=stop';
+ $LINK['play']=$MODULE.'films/lecture.php?control=play';
+ $LINK['pause']=$MODULE.'films/lecture.php?control=pause';
+ $LINK['info']=$MODULE.'films/info.php';
+ $LINK['options']=$MODULE.'films/info.php';
+ $LINK['blue']=$MODULE.'films/lecture.php?savesignet=1';
+ $LINK['red']=$MODULE.'films/lecture.php?next_ss=1';
+ $LINK['yellow']=$MODULE.'films/info.php?module=infos';
+ $LINK['up']=$MODULE.'films/lecture.php?seek_value=plus';
+ $LINK['down']=$MODULE.'films/lecture.php?seek_value=moins';
+
+ // BDE - RequestID 1588902
+ $LINK['next']=$MODULE.'films/lecture.php?control=next';
+ $LINK['prev']=$MODULE.'films/lecture.php?control=previous';
+ $LINK['rev']=$MODULE.'films/lecture.php?seek_value=moins';
+ $LINK['fwd']=$MODULE.'films/lecture.php?seek_value=plus';
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<meta name="refresh" content="0;url=../films/lecture.php">
+<script language="javascript" src="/fb2ie.js">
+</script>
+</head>
+<body></body></html>
+
Added: trunk/ressources/icones/Dailymotion.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ressources/icones/Dailymotion.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|