Author |
Message |
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | 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'. |
|
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | 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 |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | I'm not sure what you mean. |
|
Registered: March 13, 2007 | Posts: 646 |
| Posted: | | | | 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. |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | 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 |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | Cheers guys, that worked a treat. |
|
Registered: March 15, 2007 | Posts: 41 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Reputation: | Posts: 3,436 |
| Posted: | | | | 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 |
|
Registered: March 15, 2007 | Posts: 41 |
| Posted: | | | | I am getting a DP_Tags error. It says its not recognized. |
|
Registered: March 13, 2007 | Reputation: | Posts: 3,436 |
| Posted: | | | | 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) |
|