Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2  Previous   Next
Trailers: New discussion
Author Message
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Hi,
Thanks to all who helped previously!
New idea: 
Can you have multiple clips for one movie? (Multiple links to clips) And any file extension? 
Code as currently configured:

<HTML>
<HEAD>

<style type="text/css">
<!--
* { color: black; font-family: verdana; font-size: 9pt; }
html, body { margin: 0; padding: 0; background-color: rgb(255, 204, 102); }
body { background-repeat: repeat-x; background-image:url($DPIMAGES.bgimage.jpg); }
.title { font-size: 12pt; font-weight: bold; margin-top: 15pt; margin-bottom: 15pt; width: 100%; text-align: center; }
.images { padding: 5; }
span { margin: 5; background-color: black; border-width: 5px; border-style: double; }
span.off { border-color: gray; }
span.on { border-color: white; }
img { cursor: hand; }
-->
</style>




<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</SCRIPT>

<SCRIPT language=javascript>
window.onload = window_onload;
function window_onload() {
  var i;
  myloop: for (i = 0; i < DP_Tags.length; i++) {
    switch (DP_Tags[i]) {
      case "Trailer/wmv":
        idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".wmv";
        break myloop;
      case "Trailer/mov":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".mov";
        break myloop;
      case "Trailer/flv":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".flv";
        break myloop;
      case "Trailer/vob":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".vob";
        break myloop;
    }
  }
  if (i >= DP_Tags.length) {
    idPlay.removeNode(true);
  }
}
</SCRIPT>

</HEAD>

<BODY>
<title>Play Trailer</title>


<B><DP NAME="TITLE"></B>
<BR>
Released- <DP NAME="RELDATE" YearDigits="" > , <DP NAME="PURCHDATE" Prefix="Added- ">
<BR><BR>
Collection Number: <DP NAME="COLLNUM">  ,  <B> <A id=idPlay href="#">Play Trailer</A> </b>
<BR><BR>
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES">
<BR><BR>

<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  "  >
<BR><BR>

</BODY>
</HTML>


  I tried a couple modifications of the above with no success.

Trailers/clips would be 228.mov.  228-1.wmv or 2281.wmv, 228-2.mpg or 2282.mpg.

Any insight appreciated
DVD Profiler Desktop and Mobile RegistrantMarEll
Registered: June 9, 2007
United Kingdom Posts: 1,208
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
I remember trying this a while back with no luck.  Just had another go and still had no joy.  Hopefully someone with more skills will figure it out.

Until someone does suss it you could use multiple HTML windows to achieve your goal...but hopefully someone will post soon as that's not ideal.
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting MarEll:
Quote:
I remember trying this a while back with no luck.  Just had another go and still had no joy.  Hopefully someone with more skills will figure it out.

Until someone does suss it you could use multiple HTML windows to achieve your goal...but hopefully someone will post soon as that's not ideal.


I just thought of this:

Could you have one with the Collection Number and one with the UPC?

Granted, that limits to two..... 
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
the -# would probably be workable. My first thought before reading the all the posts was to suggest using the collection number and then appending A, B, C, etc (though I think -1, -2, -3, etc would probably be easier to code into the html window).

what you will need is some way to 'store' how many trailers for each profile. Or you could just have it always have X number. Of course if your X is 5 and a profile only has 3 then the links for 4 and 5 won't work. could possibly store that value in notes, or maybe set up a tag system but that would probably end up a bit more complicated and require a bunch of tags.

you would need to put a loop then around your trailer link code and increment a counter as to which trailer it is and then append the -# (where # is your counter value) to the end of the collection number.

in the simple form you would need to have all your trailers for a profile with the same extension but you could probably work out a tag system that would allow multiple trailers and specify the extension for each. something like

trailers\1\wmv
trailers\2\mpg

so the first trailer is wmv, second is mpg but I don't know how complicated that would be to read in the loop as I really haven't done any html windows that read tag\profile info.

hopefully that gives you (or someone else) some ideas to help you get what you want though.

-Agrare
DVD Profiler Desktop and Mobile RegistrantMarEll
Registered: June 9, 2007
United Kingdom Posts: 1,208
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Dave (and myself) already has a loop that looks for a tag to determine the file extension.  The problem we're having is trying to get multiple links to show up (and actually work).

I tried duplicating the whole script for the other trailer[s] and using 'idPlay2' for that one.  This displays another link (which works) but then the original link stops working.  Also tried adding another 'case' with 'idPlay2' but then the second link doesn't work.
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Fingerlakes Dave:
Quote:

Code as currently configured:

<HTML>
<HEAD>

<style type="text/css">
<!--
* { color: black; font-family: verdana; font-size: 9pt; }
html, body { margin: 0; padding: 0; background-color: rgb(255, 204, 102); }
body { background-repeat: repeat-x; background-image:url($DPIMAGES.bgimage.jpg); }
.title { font-size: 12pt; font-weight: bold; margin-top: 15pt; margin-bottom: 15pt; width: 100%; text-align: center; }
.images { padding: 5; }
span { margin: 5; background-color: black; border-width: 5px; border-style: double; }
span.off { border-color: gray; }
span.on { border-color: white; }
img { cursor: hand; }
-->
</style>




<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</SCRIPT>

<SCRIPT language=javascript>
window.onload = window_onload;
function window_onload() {
  var i;
  myloop: for (i = 0; i < DP_Tags.length; i++) {
    switch (DP_Tags[i]) {
      case "Trailer/wmv":
        idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".wmv";
        break myloop;
      case "Trailer/mov":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".mov";
        break myloop;
      case "Trailer/flv":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".flv";
        break myloop;
      case "Trailer/vob":
      idPlay.href ="F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber + ".vob";
        break myloop;
    }
  }
  if (i >= DP_Tags.length) {
    idPlay.removeNode(true);
  }
}
</SCRIPT>

</HEAD>

<BODY>
<title>Play Trailer</title>


<B><DP NAME="TITLE"></B>
<BR>
Released- <DP NAME="RELDATE" YearDigits="" > , <DP NAME="PURCHDATE" Prefix="Added- ">
<BR><BR>
Collection Number: <DP NAME="COLLNUM">  ,  <B> <A id=idPlay href="#">Play Trailer</A> </b>
<BR><BR>
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES">
<BR><BR>

<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  "  >
<BR><BR>

</BODY>
</HTML>


  I tried a couple modifications of the above with no success.

Trailers/clips would be 228.mov.  228-1.wmv or 2281.wmv, 228-2.mpg or 2282.mpg.

Any insight appreciated


Two "issues":
1) Is there a limit as to how many lines can be in the script?  It appears if you go past four (4), the script stops working.??.  No clue.  I have enough trouble with html.  Java is way out of my league.

2) If you add a line, say for a *.avi  DIVX file (that plays in Windows Media Player, no issues), this is the "page":
program cannot display the webpage
 
  Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.

  What you can try:
    Check your Internet connection. Try visiting another website to make sure you are connected. 

    Retype the address. 

    Go back to the previous page.

    More information

This problem can be caused by a variety of issues, including:

Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's domain.

*.avi extension associated with Windows Media Player.  Why not loading as it was with a wmv file?

  As always any insight appreciated
DVD Profiler Unlimited Registrantxyrano
41215.reg 70320.urk
Registered: March 13, 2007
Sweden Posts: 646
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
2. IE doesn't support DIVX out of the box. You need to download a DIVX codec for IE. Use google.
DVD Profiler Desktop and Mobile RegistrantMarEll
Registered: June 9, 2007
United Kingdom Posts: 1,208
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Fingerlakes Dave:
Quote:
[...]
1) Is there a limit as to how many lines can be in the script?  It appears if you go past four (4), the script stops working.??.  No clue.  I have enough trouble with html.  Java is way out of my league.
[...]


Do you mean the 'cases' in the loop?  I just added another 2 to mine (bringing the total up to 5) and the script kept working.
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting xyrano:
Quote:
2. IE doesn't support DIVX out of the box. You need to download a DIVX codec for IE. Use google.


OK.  I installed divx and the active x plug-in. Still not working when link clicked.
Also, *.flv files found, not played.  I am prompted to download the file (!)
I installed the flash plugin also, *sigh*
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting MarEll:
Quote:
Quoting Fingerlakes Dave:
Quote:
[...]
1) Is there a limit as to how many lines can be in the script?  It appears if you go past four (4), the script stops working.??.  No clue.  I have enough trouble with html.  Java is way out of my league.
[...]


Do you mean the 'cases' in the loop?  I just added another 2 to mine (bringing the total up to 5) and the script kept working.


Yes. Cases in the loop. I cut and paste a line, change the extension to the appropriate suffix, add a tag, check that, try the link.

Nothing.

  Also, when I cut and paste, the text goes from "highlighted" to plain black.

Is there some sort of issue with cut and past in java script?
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,404
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting Fingerlakes Dave:
Quote:
  Also, when I cut and paste, the text goes from "highlighted" to plain black.

That often means that there is a syntax error - broken quoted string or mis-matched parens or block structure ("{}"). If you are not the programming type, best thing is just to post your script. Somebody will probably spot the glitch.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
DVD Profiler Unlimited Registrantxyrano
41215.reg 70320.urk
Registered: March 13, 2007
Sweden Posts: 646
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quote:
<html>
<head>
<script type="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</script>
<script type="text/javascript">
function getTrailerLink() {
  var i;
  var path_CollectionNumber = "F:\\Documents and Settings\\Dad.HOME\\My Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber;
  for (i = 0; i < DP_Tags.length; i++) {
    switch (DP_Tags[i]) {
      case "Trailer/wmv":
        idPlay.href = path_CollectionNumber + ".wmv";
        break;
      case "Trailer/mov":
        idPlay.href = path_CollectionNumber + ".mov";
        break;
      case "Trailer/flv":
        idPlay.href = path_CollectionNumber + ".flv";
        break;
      case "Trailer/vob":
        idPlay.href = path_CollectionNumber + ".vob";
        break;
    }
  }
  if (i >= DP_Tags.length) {
    idPlay.removeNode(true);
  }
}
</script>
</head>
<body onload="getTrailerLink();">
<title>Play Trailer</title>
<b><DP NAME="TITLE"></b>
<br />
Released- <DP NAME="RELDATE" YearDigits="">, <DP NAME="PURCHDATE" Prefix="Added- ">
<br /><br />
Collection Number: <DP NAME="COLLNUM">, <b><a id="idPlay" href="#" target="_new">Play Trailer</a></b>
<br /><br />
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES">
<br /><br />
<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  ">
<br /><br />
</body>
</html>
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,404
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Ok, here are two ways that work on my system, except that WMV doesn't work if associated with Windows Media Player. VLC player and QuickTime both work. I don't have .flv, so I used .avi as an example. Also make sure you pay strict attention to CASE (including tags). In the second script, I used a "toLowerCase()" function to show you how to protect from that. Of course you will have to adjust your path to the trailer folder. Both scripts allow for multiple trailers, one per filetype, but you can probably think of ways to adjust to make it do whatever else you want.

(It will probably be easier to follow the thread if people refrain from quoting the whole post. Thanks.)

Script 1: Dynamically build the href: (bug fixed)The link will appear only if the tag is set:


<html>
<head>
<script type="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</script>
<script type="text/javascript">
function getTrailerLink() {
  var i;
  idPlayMOV.href=""; idPlayWMV.href =""; idPlayAVI.href =""; idPlayVOB.href="";
  var path_CollectionNumber = "C:\\Users\\MediaDogg\\Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber;
  for (i = 0; i < DP_Tags.length; i++)
  {
      if (DP_Tags[i] == "Trailer/WMV") { idPlayWMV.href = path_CollectionNumber + ".wmv";}
      else if (DP_Tags[i] == "Trailer/MOV"){ idPlayMOV.href = path_CollectionNumber + ".mov";}
      else if (DP_Tags[i] == "Trailer/AVI"){  idPlayAVI.href = path_CollectionNumber + ".avi";}
      else  if (DP_Tags[i] == "Trailer/VOB"){ idPlayVOB.href = path_CollectionNumber + ".vob";}
  }
  if (idPlayMOV == "") idPlayMOV.removeNode(true);
  if (idPlayAVI == "") idPlayAVI.removeNode(true);
  if (idPlayWMV == "") idPlayWMV.removeNode(true);
  if (idPlayVOB == "") idPlayVOB.removeNode(true);
}
</script>
</head>
<body onload="getTrailerLink();">
<title>Play Trailer</title>
<b><DP NAME="TITLE"></b>
<br />
Released- <DP NAME="RELDATE" YearDigits="">, <DP NAME="PURCHDATE" Prefix="Added- ">
<br /><br />
Collection Number: <DP NAME="COLLNUM">
<br/>
<br/> <b><a id="idPlayWMV" href="#" target="_new">Play WMV Trailer</a></b>
<br/> <b><a id="idPlayMOV" href="#" target="_new">Play MOV Trailer</a></b>
<br/> <b><a id="idPlayAVI" href="#"  target="_new">Play AVI Trailer</a></b>
<br/> <b><a id="idPlayVOB" href="#" target="_new">Play VOB Trailer</a></b>
<br /><br />
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES"><br /><br />
<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  ">
<br /><br />
</body>
</html>


Script 2: Dynamically build the entire hotlink. The link will appear only if the tag is set:


<html>
<head>
<script type="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</script>
</head>
<body>
<title>Play Trailer</title>
<b><DP NAME="TITLE"></b>
<br />
Released- <DP NAME="RELDATE" YearDigits="">, <DP NAME="PURCHDATE" Prefix="Added- ">
<br /><br />
Collection Number: <DP NAME="COLLNUM">
<br />
<script type="text/javascript">
  var i;
  var path_CollectionNumber = "C:\\Users\\MediaDogg\\Documents\\DVD Profiler\\Trailers\\" + DP_CollectionNumber;
  for (i = 0; i < DP_Tags.length; i++)
    {
        if  (DP_Tags[i].toLowerCase()  == "trailer/mov"){ document.write("<br/><a href=\""+path_CollectionNumber + ".mov\">Play MOV Trailer</a>");}
      if  (DP_Tags[i].toLowerCase() == "trailer/avi"){ document.write("<br/><a href=\""+path_CollectionNumber + ".avi\">Play AVI Trailer</a>");}
      if  (DP_Tags[i].toLowerCase()  == "trailer/vob"){document.write("<br/><a href=\""+path_CollectionNumber + ".vob\">Play VOB Trailer</a>");}
      if  (DP_Tags[i].toLowerCase() == "trailer/wmv"){document.write("<br/><a href=\""+path_CollectionNumber + ".wmv\">Play WMV Trailer</a>");}
  }
</script>
<br />
<br />
<DP NAME="FEATURES"><DP NAME="OTHERFEATURES">
<br /><br />
<DP NAME="CAST"  MaxList="12"  ShowRoles="YES"  Divider=" ,<BR>  ">
<br /><br />
</body>
</html>
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,404
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Anybody try this yet?
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
DVD Profiler Desktop and Mobile RegistrantFingerlakes Dave
Registered: April 6, 2007
United States Posts: 443
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:
Anybody try this yet?

Hi

Script 1:

Links. No luck otherwise. IE is called, goes to blank page and no further.

Script 2:
Appears to work fine.  Mov file opens in Quicktime plug-in, wmv and avi in Windows Media player.
I haven't tried adding any other extensions (yet  )

Nice work
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,404
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting Fingerlakes Dave:
Quote:
Quoting mediadogg:
Quote:
Anybody try this yet?

Hi

Script 1:

Links. No luck otherwise. IE is called, goes to blank page and no further.

Script 2:
Appears to work fine.  Mov file opens in Quicktime plug-in, wmv and avi in Windows Media player.
I haven't tried adding any other extensions (yet  )

Nice work

Thanks. Strange results. The scripts should produce exactly the same HTML, and should work identically. Maybe delete the ...  target="_new"  ... phrase from the commands. Just blank one out and try it. But actually, I prefer script2 anyway. Shorter.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2  Previous   Next