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
Help me improve this HTML window for Special Features
Author Message
DVD Profiler Unlimited RegistrantStar Contributorsynnerman
Take me with you. Please.
Registered: March 13, 2007
United States Posts: 736
Posted:
PM this userDirect link to this postReply with quote
At the moment, we can only list the Features for our DVDs by using the checkbox options.  I know there have been several requests (myself included) for a more detailed version, but it may be a while before we see it.  Meanwhile, I've been keeping track of the special features in the Notes field.  It allows me to have those details and also be ready for the day that the option becomes available in a field native to the program. 

Yet, as more and more great options appear using HTML windows (like the Gallery), my Notes field is becoming more cluttered and less practical to keep the special features in a simple text format.  So I decided to try my hand at an HTML window for the special features.  Using the code offered up in the "Tagline" thread by RossRoy, I made a few alterations and came up with this:

Quote:
<HTML>
<HEAD>
<STYLE>
BODY {
  padding: 0px;
  margin: 0px;
  background-color: #000053;
}
H1 {
  padding: 1px;
  margin: 2px;
  color: white;
  font: 12pt "Tahoma";
}
H2 {
  padding: 0px;
  margin: -12px;
  color: white;
  font: 10pt "Arial";
}
</STYLE>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/
var tagStart = "";
var tagEnd = "";
var sf = "";

// Get the Special Features text from the notes
function Getsf() {
tagStart = DP_Notes.toLowerCase().indexOf("\<sf") + 4;

if (tagStart>3) {
tagEnd = DP_Notes.toLowerCase().indexOf("\/\>", tagStart);
sf= DP_Notes.slice(tagStart, tagEnd);

document.getElementsByTagName('h2')[0].innerHTML = sf;
} else {
document.getElementsByTagName('h2')[0].innerHTML = "&nbsp;";
}
}
//-->
</SCRIPT>
</HEAD>
<center><h1><u>Special Features</u></h1></center>
<BODY onload="Getsf();" scroll="auto">
<MENU><h2></h2></MENU>
</BODY>
</HTML>


To use the window, I simple write <sf=<li>(WhateverFeature1Is)<br><li>(WhateverFeature2Is)<br><li> (etc.) />

For example, the Special Features for 12 MONKEYS looks like this:

Quote:
<sf=<li>Audio Commentary by director Terry Gilliam and producer Charles Roven<br><li>
Documentary: "The Hamster Factor & Other Tales of '12 Monkeys'"<br><li>
Theatrical Trailer<br><li>
"12 Monkeys" Archives<br><li>
Production Notes/>


It would look sort of like this (with bullets instead of dashed):

- Audio Commentary by director Terry Gilliam and producer Charles Roven
- Documentary: "The Hamster Factor & Other Tales of '12 Monkeys'"
- Theatrical Trailer
- "12 Monkeys" Archives
- Production Notes

As you can see, it sort of gets the job done, but has a few issues in the HTML window: 1.) I had to reduce the margin in H2 to -12 so there would be such a huge gap under the words "Special Features"; 2.) the right side of the screen occasionally cuts of a few letters on a long line of text; 3.) it just doesn't look that great.

That's why I'm posting this.  I am not a programmer.  It's been years since I've done any HTML coding and even then it was only the most basic of tags.  I mainly use Microsoft Frontpage now, so I was impressed that I even remembered the <menu> command at all.  Seeing the fantastic work that many of you have created inspired me to create this, but I don't have the ability to take it much further.  Any advice on how to improve this code would be greatly appreciated.
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
Your "Special Features" line is outside the BODY. You may want to move it inside.
Chars are cut off because margin:-12px sets a negative margin on all four sides.
Also, the H2 tag has no real purpose. Why not use the surrounding MENU tag itself?

Anyway, for a quick fix, change the H2 margin to 2px and add
MENU {margin: 0px;} to your styles.
Matthias
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next