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 3  Previous   Next
How Do I....??
Author Message
DVD Profiler Desktop and Mobile RegistrantStar ContributorPantheon
Registered: March 14, 2007
Reputation: High Rating
United Kingdom Posts: 1,819
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Hello all

First, let me say that I have very little html knowledge.

I would like to create an HTML window where I can display the Tagline of a movie.

It doesn't have to be flashy; but I would like to be able to choose the font.

If someone could give me some pointers I'd be very grateful.

Pantheon
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Is this what you want?



If so, here's the code.
Quote:

<HTML>
<HEAD>
<STYLE>
BODY {
  padding: 0px;
  margin: 0px;
  background-color: #000053;
}
H1 {
  padding: 0px;
  margin: 0px;
  color: white;
  font: bold 26pt "Monotype Corsiva";
}
</STYLE>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/
var tagStart = "";
var tagEnd = "";
var tagline = "";

// Get the tagline text from the notes
function GetTagline() {
tagStart = DP_Notes.toLowerCase().indexOf("\<tagline") + 9;

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

document.getElementsByTagName('h1')[0].innerHTML = tagline;
} else {
document.getElementsByTagName('h1')[0].innerHTML = "&nbsp;";
}
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="GetTagline();">
<center><h1></h1></center>
</BODY>
</HTML>


Just put:
<tagline=[your tagline here] />
in the notes of the profile, without the []. And the beauty of it, is if you activate the "Use HTML for Notes" in the options, it won't show in your Notes window.

To change the colors, font, etc., in the <Style> section, you can change the background color in the BODY section, and the font in the H1 section.
 Last edited: by RossRoy
DVD Profiler Desktop and Mobile RegistrantStar ContributorPantheon
Registered: March 14, 2007
Reputation: High Rating
United Kingdom Posts: 1,819
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Wow!!

Thanks Ross...

I didn't actually expect you to write it for me....so I am eternally grateful!!

Neil
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,334
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
I actually wouldn't mind using this myself... but is there something I could add to make it so multiple tag lines are separated? As it works bow if I separate it with a ; it still just writes it as a continuous line.

So for something like... for 13 Ghosts we get..

13 Times the Thrills! 13 Times the Chills! 13 Times the Fun!;A ghost for each member of your family! Pick your favorite spook!

instead of...

13 Times the Thrills! 13 Times the Chills! 13 Times the Fun!

A ghost for each member of your family! Pick your favorite spook!

so is there anything I could add to make it work like the above?
Pete
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
No problem Neil, it took all of 10 minutes to do. Pretty easy when you can just reuse code from other HTML windows to put this together

Pete, it's possible, but I have no idea how. Like I said above, I just mixed 2 HTML page together to create that, so I have no idea how I would separate each different tagline. I could check Xyrano's code to see how he does it for the Video window, or go the gallery route with a <nbtagline=3>, then a <tagline1=, <tagline2=, <tagline3=... But even then, I don't really know how I'd do that. I have no real knowledge of javascript, just basic programming training so I can see what does what in the code, but writing new one... Although it might be as good a time as any to actually tackle it

Neil, to answer your PM, if I understand correctly, you want the window the retain the body color instead of going white if nothing is found, right?

If so, find the line that says
Quote:

document.write("You need to add &LT;tagline=[your tagline here] /&GT; to your notes for this to work");


and change it to
Quote:

document.getElementsByTagName('h1')[0].innerHTML = "&nbsp;";


I've also corrected it in the above script.
 Last edited: by RossRoy
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,334
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Thanks Ross... will see what I can see on the videos one... if not maybe someone else can give us an answer
Pete
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Well I'm fairly certain Xyrano will pop in, if time permits. And for him, adding multiple tag handling should be a walk in the park

I'm still impressed every time I see his gallery window. It's just awesome! 
 Last edited: by RossRoy
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
For those who may already use <tagline></tagline> (like for Mithirandir's Skin), the code above seems to work with that as well, without further modification necessary.

Thanks Ross!

I tried, but have not found a way so far, to align the tagline vertically in the middle of the window. Anyone have an idea?
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Quoting ya_shin:
Quote:
I tried, but have not found a way so far, to align the tagline vertically in the middle of the window. Anyone have an idea?


It should already be centered, since the <center></center> is in the HTML code (they are center aligned here anyway).

You could remove the <center></center> tags, and add
Quote:

text-align: center;


to the H1 style section.
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Oh and you can make the window look a little nicer by changing the line
Quote:

<BODY onload="GetTagline();">


to
Quote:

<BODY onload="GetTagline();" scroll="auto">


gets rid of the scroll bars if they're not needed.
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
I already added the text-align: center; and removed the center tags (cleaner html). But those are horizontal alignment, I want vertical too
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Quoting ya_shin:
Quote:
I already added the text-align: center; and removed the center tags (cleaner html). But those are horizontal alignment, I want vertical too


   

Should've read more carefully..

Maybe this can help you
DVD Profiler Unlimited RegistrantStar ContributorLopek
Lovely day for a...
Registered: March 13, 2007
United Kingdom Posts: 813
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I was just looking at that too. Change the h1 style to:
Quote:
h1 {
position:absolute;
width: 100%;
top: 50%;
text-align: center;
color: white;
font: bold 26pt "Monotype Corsiva";
}

The padding, margin are not needed as inherited from the body ones.
Andy

"Credited as" Names Database
DVD Profiler Desktop and Mobile RegistrantStar ContributorPantheon
Registered: March 14, 2007
Reputation: High Rating
United Kingdom Posts: 1,819
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting RossRoy:
Quote:
Neil, to answer your PM, if I understand correctly, you want the window the retain the body color instead of going white if nothing is found, right?

If so, find the line that says
Quote:

document.write("You need to add &LT;tagline=[your tagline here] /&GT; to your notes for this to work");


and change it to
Quote:

document.getElementsByTagName('h1')[0].innerHTML = "&nbsp;";


I've also corrected it in the above script.


Exactly what I wanted!!
DVD Profiler Unlimited RegistrantStar ContributorLopek
Lovely day for a...
Registered: March 13, 2007
United Kingdom Posts: 813
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
As followup to the top: 50%, it needs a little tweaking depending on the size of the window and font size too.

As it is putting the text top at 50%, rather than the middle of the letters at the 50% point, so more likely you want something around 40-45% to get the text in the correct place.
Andy

"Credited as" Names Database
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
Thanks for the help, Ross and Andy.

Andy, you're code is much easier than most stuff I found so far. Will play around with those values a bit to see what suits me best. Thanks.
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2 3  Previous   Next