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 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
You could always use "bottom: 50%;" instead - that way the bottom of the text will always sit on the centre line, which I think looks fine - whereas the top looks weird imo.
Andy

"Credited as" Names Database
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 am sure it can be done a much neater way then this... but I got it so that  each tag line starts on its own lins so instead of having...

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


I have...

Quote:
13 Times the Thrills! 13 Times the Chills! 13 Times the Fun!

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


Here is what I did in the notes section....

<tagline=13 Times the Thrills! 13 Times the Chills! 13 Times the Fun! <br><br> A ghost for each member of your family! Pick your favorite spook! />

EDIT:
I just tried another option... with...
<tagline=13 Times the Thrills! 13 Times the Chills! 13 Times the Fun!<hr> A ghost for each member of your family! Pick your favorite spook! />

You get them on their own lines... plus a horizontal line between them.
Pete
 Last edited: by Addicted2DVD
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
Quoting Lopek:
Quote:
You could always use "bottom: 50%;" instead - that way the bottom of the text will always sit on the centre line, which I think looks fine - whereas the top looks weird imo.

I think I found a solution online, which should work; will post later. (It uses a table of 100% height, admitted;y a little ugly, but it works.

It wasn't working at first, because I was slightly wrong here:
Quoting ya_shin:
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.

It needs one minor correction:
tagEnd = DP_Notes.toLowerCase().indexOf("\/\>", tagStart);
must be changed to:
tagEnd = DP_Notes.toLowerCase().indexOf("\<\/", tagStart);
It can otherwise lead to ugly result...

Now on to centering vertically...
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
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
Quoting Lopek:
Quote:
As followup to the top: 50%, it needs a little tweaking depending on the size of the window and font size too.

You can use a dynamic expression to center the text exactly, e.g.

top: expression((document.body.clientHeight - this.offsetHeight) / 2);
Matthias
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
Quoting goodguy:
Quote:
Quoting Lopek:
Quote:
As followup to the top: 50%, it needs a little tweaking depending on the size of the window and font size too.

You can use a dynamic expression to center the text exactly, e.g.

top: expression((document.body.clientHeight - this.offsetHeight) / 2);

Hmmm, good I kept checking in... That works great without the hassle I was going through! I''l use it...

So, the h1 section should be:
Quote:
h1 {
position:absolute;
width: 100%;
top: expression((document.body.clientHeight - this.offsetHeight) / 2);
text-align: center;
color: white;
font: bold 26pt "Monotype Corsiva";
}


Thanks Andy and Matthias!
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
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
Quoting RossRoy:
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! 

I saw that!

I think Addicted has a good solution for the <tagline /> approach (<br/>'s and <hr />'s).
The <tagline></tagline> approach need some work so it doesn't find other tags in Notes;
Change:
tagEnd = DP_Notes.toLowerCase().indexOf("\/\>", tagStart);
To:
tagEnd = DP_Notes.toLowerCase().indexOf("\<\/tagline>", tagStart);
this way you're sure to get the correct tag.
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
Quoting xyrano:
Quote:
The <tagline></tagline> approach need some work so it doesn't find other tags in Notes;
Change:
tagEnd = DP_Notes.toLowerCase().indexOf("\/\>", tagStart);
To:
tagEnd = DP_Notes.toLowerCase().indexOf("\<\/tagline>", tagStart);
this way you're sure to get the correct tag.


Yes, results can be weird without that change... I usually have a <br /> following the tagline, so it wasn't that bad... I would just get that addiitonal line break after the tagline, which obviously messed up my vertical centering... (which, on the other hand helped me find the problem and that I needed to change the code).

I use the <tagline></tagline> approach, because, while redundant now in the local software, it is still visible in my phpdvdprofiler.
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 xyrano:
Quote:
I think Addicted has a good solution for the <tagline /> approach (<br/>'s and <hr />'s).


Yes, it's a nice solution, if you don't mind having a large window for the taglines. What I was thinking, and I have no idea if it's even possible, is that it would be nice to have them rotate every few seconds.
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
How would you make this work if you had 2 or more taglines?
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Just add a <br> (or two) between each tagline. For example:

<tagline=This is tagline 1<br>This is tagline 2 />


But I'm trying to modify this script to separate multiple taglines into an array, and choose one at random, or, change the one that is showing every X seconds.

But it's taking forever because time doesn't really permit, and I have no idea what I'm doing, so I'm basically learning Javascript as I go.
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 personally use <hr> between the taglines all the time now... gives a horizontal line between each of the taglines.. which I like
Pete
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
No I meant 2 separate taglines.  So you'd have 2 tags in your notes and the html window would display what was in each.

Edit: Nevermind, think I've got it.

<script>
var sint = DP_Notes.indexOf('<dup>')
if (sint == -1){
var link = ''}
else {
link = DP_Notes.substring(sint, DP_Notes.indexOf('/', sint));
}
document.write(link)
</script>
<BR>


<script>
var sint = DP_Notes.indexOf('<other>')
if (sint == -1){
var link = ''}
else {
link = DP_Notes.substring(sint, DP_Notes.indexOf('/', sint));
}
document.write(link)
</script>
<BR>

??
 Last edited: by MarEll
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
I've done it! 

Never thought I'd actually get around to it, and make it work!

Ok, so I've modified this "a bit" more. You can now have multiple taglines entered in the notes, separated by a special character, and the script will change the shown tagline every X seconds.

If anybody is interested
Quote:

<html>
<head>
<STYLE>
BODY {
  padding: 10px;
  margin: 0px;
  background-color: #000053;
}
SPAN {
position:absolute;
width: 100%;
top: expression((document.body.clientHeight - this.offsetHeight) / 2);
text-align: center;
color: white;
font: bold italic 14pt "Book Antiqua";
}
</STYLE>
<title>Rotating Text</title>
<script type="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/

//------ Configuration block START ------
var Separator = "@" // <-- Set character used as tagline separator
var Interval = 3000; // <-- Set time between change, in milliseconds
//------ Configuration block END ------

var rotatingTextElement;
var rotatingText = new Array();
var ctr = 0;

function initRotateText() {
rotatingTextElement = document.getElementById("textToChange");

var tagStart = DP_Notes.toLowerCase().indexOf("\<tagline") + 9;

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

if (rotatingText.length > 1) {
rotatingTextElement.innerHTML = rotatingText[ctr];
ctr++;
setInterval(rotateText, Interval);
} else {
rotatingTextElement.innerHTML = rotatingText[0];
}
} else {
rotatingTextElement.innerHTML = "&nbsp;";
}
}

function rotateText() {
ctr++;
if(ctr >= rotatingText.length) {
ctr = 0;
}
rotatingTextElement.innerHTML = rotatingText[ctr];
}

window.onload = initRotateText;
</script>
</head>
<body>
<span id="textToChange"></span>
</body>
</html>


Same as before, you create add a tagline in your notes, but this time, if you are using the default configuration of this script, you separate each tagline with @, so you'd have:
<tagline=Tagline1@Tagline2@Tagline3 />

The script will then show Tagline1, after 3 seconds, change it to Tagline2, after 3 seconds, change it to Tagline3, and after 3 seconds, back to Tagline1, and so on and so forth.
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
If anybody is interested, my current version select the taglines at random, instead of cycling through them in order. Just let me know, and I'll post the code here.
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 see that it apparently is not supposed to... but the current one I am using is showing them in a random order.. I watched... one that has 3... and it cycled through as... Tagline 1, Tagline 3, Tagline 1, Tagline 2.

it is either going random or somehow skipped tagline 2 the first time through.
Pete
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:
I see that it apparently is not supposed to... but the current one I am using is showing them in a random order.. I watched... one that has 3... and it cycled through as... Tagline 1, Tagline 3, Tagline 1, Tagline 2.

it is either going random or somehow skipped tagline 2 the first time through.


Are you using my script posted above? Because it's odd.. It shouldn't be doing that.
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2 3  Previous   Next