mon willspo-like pour les french :)

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
Post Reply
milyon

mon willspo-like pour les french :)

Post by milyon »

voila moi aussi jai fait ma version du template de willspo (grace lui soit rendu)
je l'ai francisé et ajoute la possiblite de lancer un deuxieme player (a configure dans user variables)
pour le haut de la page jai rajoute un petit moteur de recherche qui permet de lancer la page individuelle.
le listing full :

Code: Select all

<html>
<head>
<style>
   body {
      background: #ADBBFF;
      color: black;
      font-family: Tahoma, Arial, Verdana;
   }
   
   h1 {         /* Title */
      font-size: 18px;
   }
   
   p {
      font-size: 13px;
      line-height: 125%;
   }
   
   td {
      font-size: 14px;
   }
   
   #picture {
       width: 240px;
       height: 320px;
       overflow: hidden;
       border: 2px solid #666666;
   }
   
   .button {      /* Next / Prev and category buttons */
       height: 15px;
      padding-left: 18px;
      padding-right: 18px;
      border: 2px solid #666666;
      font-weight: bold;
      cursor: hand;
   }
   
   #exit {
         color: #FF6666;
   }
   
   #play {
      color: #99FF00;
   }
   
   #counter {      /* Movie number between next and prev */
         width: 100px;
         height: 15px;
         font-weight: bold;
         text-align: center;
   }

   #contentDiv {   /* The area that contains the movies */
       height: 500px;
       overflow: hidden;
       margin-top: 5px;
       margin-bottom: 5px;
     }
   
   #playDialog {
      position: absolute;
      visibility: hidden;
      background: black;
      padding: 10px;
      border: 2px solid #666666;
   }
</style>
<script language="javaScript">

var message="Zone de recherche"
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100  //in milliseconds
var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor

if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


   /* User variables */
   var playerPath = "C:\\Progra~1\\Window~1\\mplayer2.exe /fullscreen";
   var playerPath2 = "C:\\Player\\player.exe";
   var cdDriveLetter = "e";
   
   /* System variables */
var movies = new Array();
   var category  = "";         // Current category
   var movie = null;         // Current movie
   var categoryButton = null;   // Active category button
   var index = 0;            // Current movie number in this category
   var isReady = true;         // Is ready for input from user
   
   /*
    * Gets called by body onload.
    * Organizes all div elements with the attribute category in different arrays
    * depending on category.
    */
   function init() {
      var elements = document.body.getElementsByTagName("div");   
      var catArray = null;
      movies["Liste"] = new Array();
      createCategory("Liste");
      for (var i = 0; i < elements.length; i++) {
         category = elements[i].category;
         if (category != null && category != "") {
            catArray = movies[category];
            if (catArray == null) {
               catArray = new Array();
               movies[category] = catArray;
               catArray[0] = elements[i];
               createCategory(category);
            } else {
               catArray[catArray.length] = elements[i];
            }
            movies["Liste"][movies["Liste"].length] = elements[i];
         }
      }
      category = "Liste";
      showMovie(0);
   }
   
   /*
    * Called by init()
    * Writes the html code for a category button with given name
    */
   function createCategory(name) {
      html = "<span class='button' onclick='setCategory(\"" + name + "\")'>" + name + "</span>";
      document.all.categoryDiv.innerHTML += html;
   }
   
   /*
    * Called when the user presses a category button.
    * Sets the category to the given value.
    */
   function setCategory(name) {
      if (!isReady) return;
      category = name;
      index = 0;
      showMovie(index);
      
      // Changes apperance of the pressed category button
      if (categoryButton != null) {
        categoryButton.style.borderColor = "#666666";
        categoryButton.style.color = "white";
      }
      categoryButton = window.event.srcElement;
      categoryButton.style.borderColor = "99FF00";
      categoryButton.style.color = "99FF00";
   }
   
   /*
    * Gets called when user presses next button
    * Switches to the next movie in this category
    */
   function next() {
      if (!isReady) return;
      index++;
         if (index >= movies[category].length)
             index = 0;
         showMovie(index);
   }
   
   /*
    * Gets called when user presses prev button
    * Switches to the previous movie in this category
    */
   function prev() {
      if (!isReady) return;
         index--;
         if (index < 0)
           index = movies[category].length - 1;
         showMovie(index);
   }

   /*
    * Called by functions next and prev.
    * Shows the movie with specified number in this category.
    * Also responsible for loading and displaying the picture for this movie
    */
   function showMovie(i) {
      if (movie != null) {
          movie.style.display = "none";
         }
         movie = movies[category][i];
        movie.style.display = "inline";
      document.all.picture.src = movie.img;
        document.all.counter.innerHTML = (i + 1) + "/" + movies[category].length;
   }

   /*
    * Gets called when the user presses the exit button.
    * Closes the program.
    */
   function exit() {
      window.close();
   }

   /*
    * Gets called when the user presses the play button.
    * Initializes the play dialog: "Inserer CD_ROM avec le film #... label"
    */
   function play() {
      if (movie != null) {
         var playDialog = document.all.playDialog;
         var type = (movie.media == "") ? "CD-ROM" : movie.media;
         isReady = false;
         html = "<table cellpadding='10' cellspacing='0' border='0'><tr><td align='center'>";
         html += "Inserer " + type + " avec le film #" + movie.nr + " " + movie.media;
         html += "</td></tr><tr><td align='center'>";
         html += "<span id='ok' class='button' onclick='ok()'>Ok</span>";
         html += "<span id='cancel' class='button' onclick='cancel()'>Annuler</span>";
         html += "</td></tr></table>";
         playDialog.innerHTML = html;

         // Center th eplay dialog on screen
         var posX = screen.availWidth / 2 - playDialog.offsetWidth / 2;
         var posY = screen.availHeight / 2 - playDialog.offsetHeight / 2;
         playDialog.style.posTop = posY;
         playDialog.style.posLeft = posX;
         playDialog.style.visibility = "visible";
      }
   }
    /*
    * Gets called when the user presses the play2 button.
    * Initializes the play dialog: "Inserer CD_ROM avec le film #... label"
    */
   function play2() {
      if (movie != null) {
         var playDialog = document.all.playDialog;
         var type = (movie.media == "") ? "CD-ROM" : movie.media;
         isReady = false;
         html = "<table cellpadding='10' cellspacing='0' border='0'><tr><td align='center'>";
         html += "Inserer " + type + " avec le film #" + movie.nr + " " + movie.media;
         html += "</td></tr><tr><td align='center'>";
         html += "<span id='ok' class='button' onclick='ok2()'>Ok</span>";
         html += "<span id='cancel' class='button' onclick='cancel()'>Annuler</span>";
         html += "</td></tr></table>";
         playDialog.innerHTML = html;

         // Center th eplay dialog on screen
         var posX = screen.availWidth / 2 - playDialog.offsetWidth / 2;
         var posY = screen.availHeight / 2 - playDialog.offsetHeight / 2;
         playDialog.style.posTop = posY;
         playDialog.style.posLeft = posX;
         playDialog.style.visibility = "visible";
      }
   }
   
   /* Gets called when the user presses the ok button in the play dialog
    * Searches the specified cd drive for the first avi file.
    * Launches the specified player with the avi file as argument.
    * Hopefully the player will start the movie.
    */
   function ok() {
      document.all.playDialog.style.visibility = "hidden";
      var wScript = new ActiveXObject("Wscript.Shell");
      var fso = new ActiveXObject("Scripting.FileSystemObject");
        var folder = fso.GetFolder(cdDriveLetter + ":");
        var fc = new Enumerator(folder.files);
      var file = null;
        for (; !fc.atEnd(); fc.moveNext()){
         if ( fc.item().Name.indexOf(".avi") != -1 ) {
            file = fc.item().ShortPath;
            break;
         }
      }
      if (file != null) {
         wScript.run(playerPath + " " + file);
      } else {
         alert("Pas de Film sur  " + cdDriveLetter + "!");
      } 
      isReady = true;
   }
   function ok2() {
      document.all.playDialog.style.visibility = "hidden";
      var wScript = new ActiveXObject("Wscript.Shell");
      var fso = new ActiveXObject("Scripting.FileSystemObject");
        var folder = fso.GetFolder(cdDriveLetter + ":");
        var fc = new Enumerator(folder.files);
      var file = null;
        for (; !fc.atEnd(); fc.moveNext()){
         if ( fc.item().Name.indexOf(".avi") != -1 ) {
            file = fc.item().ShortPath;
            break;
         }
      }
      if (file != null) {
         wScript.run(playerPath2 + " " + file);
      } else {
         alert("Pas de Film sur  " + cdDriveLetter + "!");
      }
      isReady = true;
   }
   /* Gets called when the user presses the cancel button in the play dialog */
   function cancel() {
      document.all.playDialog.style.visibility = "hidden";
      isReady = true;
   }
function NomObjets(formname,selname,textname,str)
{
this.formname = formname;
this.selname = selname;
this.textname = textname;
this.select_str = str || '';
this.selectArr = new Array();
this.initialize = initialize;
this.bldInitial = bldInitial;
this.maj = maj;
}

function initialize()
{
if (this.select_str =='')
 {
 for(var i=0;i<document.forms[this.formname][this.selname].options.length;i++)
  {
  this.selectArr[i] = document.forms[this.formname][this.selname].options[i];
  this.select_str += document.forms[this.formname][this.selname].options[i].value+":"+document.forms[this.formname][this.selname].options[i].text+",";
   }
 }
else
 {
 var tempArr = this.select_str.split(',');
 for(var i=0;i<tempArr.length;i++)
  {
  var prop = tempArr[i].split(':');
  this.selectArr[i] = new Option(prop[1],prop[0]);
  }
 }
return;
}

function bldInitial()
{
this.initialize();
for(var i=0;i<this.selectArr.length;i++)
document.forms[this.formname][this.selname].options[i] = this.selectArr[i];
document.forms[this.formname][this.selname].options.length = this.selectArr.length;
return;
}

function maj()
{
var str = document.forms[this.formname][this.textname].value;
if(str == '') { this.bldInitial();return; }
this.initialize();
var j = 0;
pattern1 = new RegExp("^"+str,"i");
for(var i=0;i<this.selectArr.length;i++)
if(pattern1.test(this.selectArr[i].text)) 
document.forms[this.formname][this.selname].options[j++] = this.selectArr[i];
document.forms[this.formname][this.selname].options.length = j;
if(j==1)
 {
 document.forms[this.formname][this.selname].options[0].selected = true;
 }
}

function initialisation()
{
lettre = new NomObjets('formulaire','liste','entree');
lettre.bldInitial(); 
}

function Go2(liste) 
{ 
      var page = liste.options[liste.selectedIndex].value; 
      liste.selectedIndex = 0; 
      window.open(page, 'nomFenetre', 'directories=no, location=no, menubar=no, fullscreen=yes, resizable=no, scrollbars=yes, status=no, titlebar=no, resizable=yes, toolbar=no, width=800, height=600, left=200, top=100, screenX=200, screenY=100');
} 


</script>
</head>
</body>
<body onLoad="init();initialisation()" topmargin="5" leftmargin="5">

<form name="formulaire" action="#" method="get">
<input type="text" name="entree" size="20" onKeyUp="javascript:lettre.maj();">
</p>
<select name="liste" size="3" OnClick="if (this.options[this.selectedIndex].value) 
;Go2(this);">
$$ITEM_BEGIN
<option value="$$ITEM_FILEINDIV ">$$ITEM_FORMATTEDTITLE2</option>
$$ITEM_END
</select>
</form>	  <hr>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
   <tr>
      <td align="center">
         <table width="780" height="600" cellspacing="0" cellpadding="0" border="0">
            <tr>
               <td valign="top" align="center">
                  <div id="categoryDiv">
                  </div>
                  <div id="contentDiv">
                     <table class="$$ITEM_CATEGORY" cellspacing="0" cellpadding="0" border="0" width="100%"  >
                        <tr>
                           <td width="350" valign="top">
                              <img src="" id="picture">
                           </td>
                           <td valign="top">
                              $$ITEM_BEGIN

                              <div category="$$ITEM_CATEGORY" style="display: none" nr="$$ITEM_NUMBER" type="$$ITEM_TYPE" media="$$ITEM_MEDIA" img="$$ITEM_PICTUREFILENAME">
                              <h1>$$ITEM_FORMATTEDTITLE2</h1>
                                 <table cellspacing="0" cellpadding="0">
                                    <tr>
                                       <td><b>Categorie:  </b>
                                       </td>
                                       <td>$$ITEM_CATEGORY
                                       </td>
                                    </tr>
                                    <tr>
                                       <td><b>Année:</b>
                                       </td>
                                       <td>$$ITEM_YEAR
                                       </td>
                                    </tr>
                                    <tr>
                                       <td><b>Réalisateur:</b>
                                       </td>
                                       <td>$$ITEM_DIRECTOR
                                       </td>
                                    </tr>
                                    <tr>
                                       <td><b>Durée:</b>
                                       </td>
                                       <td>$$ITEM_LENGTH mns
                                       </td>
                                    </tr>
                                    </tr>
                                    <tr>
                                       <td><b>Pret à:</b>
                                       </td>
                                       <td>$$ITEM_BORROWER
                                       </td>
                                    </tr>
                                 </table>
                                 <br>
                                 <p>
                                    <b>Description:</b>
                                    <br>
                                    $$ITEM_DESCRIPTION
                                 </p>
                              </div>
                              $$ITEM_END
                           </td>
                        </tr>
                     </table>
                  </div>
                  <table cellspacing="0" cellpadding="0" border="0" width="100%">
                     <tr>
                        <td width="200"> 
                        </td>
                        <td align="center">
                           <span id="prev" class="button" onClick="prev()">
                              Prec.
                           </span>
                           <span id="counter">
                           </span>
                           <span id="next" class="button" onClick="next()">
                              Suiv.
                           </span>
                        </td>
                        <td width="200" align="right">
                           <span id="play" class="button" onClick="play()">
                             Windows Player 6
                           </span>
                           <span id="play" class="button" onClick="play2()">
                             DivX Player Alpha
                           </span>
                           <span id="exit" class="button" onClick="window.close()">
                              Quitter
                           </span>
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      </td>
   </tr>
</table>
<div id="playDialog">
</div>
</body>
</html>
le listing indiv :

Code: Select all

<html><head>
<LINK REL="stylesheet" href="movies.css" TYPE="text/css">
<script language="javaScript">
var message="$$ITEM_FORMATTEDTITLE2"
var neonbasecolor="gray"
var neontextcolor="yellow"
var flashspeed=100  //in milliseconds
var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor

if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
</head><body class="moviecard">
<style>
   body {
      background: #ADBBFF;
      color: black;
      font-family: Tahoma, Arial, Verdana;
   }
</style>
<table class="lgt" cellspacing="0" cellpadding="5">
<tr><td class="lgt">
<table class="i" border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
   </div></td></tr>
  
  
<tr>
<img src=$$ITEM_PICTUREFILENAME width="220" height="220"> </img>
<!--BEGIN FADING DYNAMIC CONTENT SCRIPT-->
<script language="javascript">

var qiksearch_js_text = new Array ("Réalisateur: $$ITEM_DIRECTOR", "Distribution: $$ITEM_ACTORS", "Année: $$ITEM_YEAR", "Genre: $$ITEM_CATEGORY");
   // The Fading Contents, HTML Tags supported
var qiksearch_space_width = 390; // The width of the content space
var qiksearch_space_height = 50; // The height of the content space
var qiksearch_space_borderw=3; // Border width
var qiksearch_space_borderc="#FF9900"; // Border Color
var timeOutVal=300; // Delay in milliseconds
var isLoop=true; // If you want to loop continuosly then true, else false
var isAutoStart=true; // If you want the Fading to start else you have to click to start
var qiksearch_js_text_static='<a href="javascript:resetAll();writeDiv();" style="text-decoration:none" accesskey="l"><font color="#808080" face="verdana,arial,helvetica" size="-1"><b>C<u>l</u>ick to Start</b></font></a>'; // The default content if AutoStart false
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1;
var ns6=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1;
var ns4=document.layers;
var qiksearch_DyObj;
var qiksearch_space_ns4_left=(screen.width/2-20)-Math.round(qiksearch_space_width/2);

function setDyObj()
{
 if(ie4)
 {
  qiksearch_DyObj=document.all.qiksearch_js_space;
 }
 if(ns6)
 {
  qiksearch_DyObj=document.getElementById("qiksearch_js_space");
 }
}

if(ie4||ns6)
{
 document.write('<table width="' + qiksearch_space_width + '" height="' + qiksearch_space_height + '" style="background:#FFFFFF; border:' + qiksearch_space_borderw + 'px solid ' + qiksearch_space_borderc + '"><tr><td align="middle">');
 document.write('<div id="qiksearch_js_space">');
 document.write('</div>');
 document.write('</td></tr></table>');
}

var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F';
var colorVal=15;
var div_count=0;

function qiksearch_fade_desat(getColorIntVal)
{
 var returnVal;
 if(getColorIntVal>=10)
 {
  for(var i=0; i<=15; i++)
  {
   if((getColorIntVal==i))
   {
    returnVal = eval('def_' + i);
   }
  }
 }
 else
 {
  returnVal=getColorIntVal;
 }
 return(returnVal);
}

function writeDiv()
{
 if(ns4)
 {
  qiksearch_DyObj=document.qiksearch_space_ns4;
 }
 if(ie4||ns6)
 {
  qiksearch_DyObj.innerHTML= '<font face="verdana,arial,helvetica" size="-1" color="#' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font>' ;
 }
 if(ns4)
 {
  qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center"><font face="verdana,arial,helvetica" size="-1" color="#' +  joinColor(qiksearch_fade_desat(colorVal)) + '"><b>' + qiksearch_js_text[div_count] + '</span></b></font></td></tr></table>');
  qiksearch_DyObj.document.close();
 }

 if((colorVal>0)  && (colorVal!=0))
 {
  colorVal--;
 }
 else
 {
  colorVal=15;
  if(div_count<qiksearch_js_text.length)
  {
   div_count++;
  }

  if(div_count==qiksearch_js_text.length)
  {
   if(isLoop)
   {
    setTimeout("resetAll()",timeOutVal);
    setTimeout("writeDiv()",timeOutVal);
   }
   else
   {
    if(ie4||ns6)
    {
     qiksearch_DyObj.innerHTML = qiksearch_js_text_static;
    }
    if(ns4)
    {
     qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center">' + qiksearch_js_text_static + '</td></tr></table>');
     qiksearch_DyObj.document.close();
    }
   }
  }

 }

 if(div_count<qiksearch_js_text.length)
 {
  setTimeout("writeDiv()",timeOutVal);
 }
}

function joinColor(getColor)
{
 return (getColor + '0' + getColor + '0' + getColor + '0');
}

function resetAll()
{
 div_count=0;
 colorVal=15;
}

setDyObj();

function start_fader()
{
 if(isAutoStart)
 {
  writeDiv();
 }
 else
 {
  if(ie4||ns6)
  {
   qiksearch_DyObj.innerHTML = qiksearch_js_text_static;
  }
  if(ns4)
  {
   qiksearch_DyObj=document.qiksearch_space_ns4;
   qiksearch_DyObj.document.write('<table width="100%" border="1" bordercolor="' + qiksearch_space_borderc + '"><tr><td align="center">' + qiksearch_js_text_static + '</td></tr></table>');
   qiksearch_DyObj.document.close();
  }
 } 
}

window.onload=start_fader;

if(ns4)
{
 document.write('<layer bgcolor="#FFFFFF" id="qiksearch_space_ns4" width="' + qiksearch_space_width + '" left="' + qiksearch_space_ns4_left + '"></layer>');
}

</script>
<!--END FADING DYNAMIC CONTENT SCRIPT-->

  </tr>
</table><hr class="blk">
<table class="i" border="0" cellspacing="0" cellpadding="1">
<tr>
  <td class="igr" width="120">Description:</td>
  <td class="iwh">$$ITEM_DESCRIPTION</td></tr>
  <td class="igr">Durée:</td>
  <td class="iwh">$$ITEM_LENGTH mns</td></tr>
  <td class="igr">Preté à:</td>
  <td class="iwh">$$ITEM_BORROWER </td></tr>
   </table>
</tr></td></table>
<FORM>
<INPUT TYPE="button" value= " Fermer " onClick="self.close()">
</FORM>

</body></html>
voila de plus jai mis ma liste en ligne a cette adresse

Mon Site
ceux qui veulent que je mette un de mes films a leur dispo (si ils ont l'original bien sur :)) n'ont qua me laisser un message sur le forum de mon site je leur enverrai le lien

babaille et bravo pour le travail accompli sur ce soft
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Merci, j'incluerai ce modèle-ci aussi avec le programme ;)
Oribas

???

Post by Oribas »

Bonjour
Me voila dans le topic francais
Comment utiliser ce script merci
Et a quoi cela ser til
Merci encore
milyon

Post by milyon »

bonjour et bienvenu
pret? c parti...
tout simplement tu copies le code dans nimporte quel editeur de texte (notepad fait tres bien l'affaire)
puis tu le sauvegarde sous le nom que tu veux par exemple full.html pour le premier et indiv.html pour le second
tu va dans le merveilleux programme qui nous interesse tous et tu fais fichier--->exporter
dans longlet complet tu charges le full.html et dans longlet individuel le indiv.html
tu verifies que cest bien exporter les deux qui est marqué. Dans options de tri avancé esaye de mettre titre traduit ca marche mieux.
puis tu fais exporter et tu sauves le resultat ou tu veux. I te reste plus qua lancer le resultat obtenu dans ton browser favori (vaux mieux un browser compatible java ;))
voila jespere avoir ete assez clair. hesite pas si jai oublie quelque chose

Milyon

ps: dans le scrip "full" repere la section user variables et indique les cheminss ou se trouvent tes lecteurs divx favoris
Oribas

MERCI

Post by Oribas »

Merci sa marche :grinking:
milyon

Post by milyon »

:)
Post Reply