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  Previous   Next
Change dual layer label in HTML window?
Author Message
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
When you show the disc info in a HTML window you can choose to display what show many layers it has.  Is it possible to change what it says in each case?  ATM it says 'Double-Layered' & 'Single-Layered', would look a lot neater if it could be made to say 'DL' & 'SL'.
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
You can use javascripts replace method on the string in the <DP NAME="LAYERS"> tag.
Like so:
Quote:
<script language="javascript">
  var abbrevateLayerString = '<DP NAME="LAYERS">'.replace("Single-Layered", "SL").replace("Double-Layered", "DL");
  document.write(abbrevateLayerString);
</script>
 Last edited: by xyrano
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'm not sure what you mean.
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
My previous post is updated with corrected code, you should be able to test it in a new HTML Window.
If you need further help let us know exactly where you want the information to go in your script and we'll try to help.
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Well, with the DP LAYERS tag, you can just write:
Quote:
<DP NAME="LAYERS" Dual="DL" Single="SL">


For the DP DISCS tag, you'll need the replace, but it has to be global - otherwise it doesn't work for multi-discs, e.g.:
Quote:
<script language="javascript">
  var abbrevateLayerString = '<DP NAME="DISCS" Divider="<BR>" ShowDescriptions="True" ShowLayers="True">'.replace(/Single-Layered/g, "SL").replace(/Double-Layered/g, "DL");
  document.write(abbrevateLayerString);
</script>


As always, the unguarded use of DP tags may result in syntax errors in some (rare) cases.
Matthias
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
Cheers guys, that worked a treat.
DVD Profiler Unlimited RegistrantAndy D.
Registered: March 15, 2007
United States Posts: 41
Posted:
PM this userDirect link to this postReply with quote
I have an HTML window question.

I want to display certain images in an HTML window depending on whether a movie has a certain tag.  How do I go about doing that?

Thanks.
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
This should work:

Quote:
<script>
  var i;
  var bool = 0;

  for (i=0;  i < DP_Tags.length;  i++)  {
    if (DP_Tags[i] == "<TAGNAME>") {
      bool = 1;
    }
  }

  if (bool == 1) {
    document.write("<img src='file://<Path/to/image.jpg>' />");
  }
</script>


Only problem so far is, that I didn't fins a way to use the internal images from DVD Profiler layouts
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
 Last edited: by nuoyaxin
DVD Profiler Unlimited RegistrantAndy D.
Registered: March 15, 2007
United States Posts: 41
Posted:
PM this userDirect link to this postReply with quote
I am getting a DP_Tags error.  It says its not recognized.
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Add this somewhere between <HEAD> and </HEAD>:

Quote:
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</SCRIPT>
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next