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  Previous   Next
HTML Window Request - Movie Trivia
Author Message
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
After VirusPil posted in his thread (Invelos Clarifications thread) an old discussion about putting movie trivia in the Easter Egg Field...

That Discussion

...I realized that there are people out there interested in movie trivia field for profilier. And since I am pretty sure we won't see one soon that we can submit to the profile (Probably good idea... talk about can of worms!)... I was wondering if any of you HTML geniuses felt up to working with me to make HTML Window for this purpose.

If we can get this off the ground I would be happy to start a thread in general forum much like Martian's Birthyear thread where we can all work together and get the info in one thread to add to our profiles.

Well... that is the idea anyway... anyone interested in working with me on this... as I really know nothing about html. 
Pete
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 595
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Pete, I took Xyrano's tagline code and tweaked it so that it will display rotating bits of trivia in a HTML window. Is that what you're looking for? Here's the code...


Quote:
<html>
<head>
<STYLE>
BODY {
  padding: 10px;
  margin: 0px;
  background-color: #ECE0F8;
  background-repeat: repeat-x;
  background-image:url($DPIMAGES.bgimage.jpg);
}
SPAN {
position:absolute;
width: 100%;
top: expression((document.body.clientHeight - this.offsetHeight) / 2);
text-align: center;
color: black;
font: bold 14pt "Arial"; }

</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");
if ( typeof DP_Genres != "undefined" && DP_Genres[0] != "") rotatingTextElement.className = DP_Genres[0].replace(/\//, "").toLowerCase();

var tagStart = DP_Notes.toLowerCase().indexOf("\<trivial") + 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) {
ctr = Math.floor(Math.random()*(rotatingText.length));
rotatingTextElement.innerHTML = rotatingText[ctr];
setInterval(rotateText, Interval);
} else {
rotatingTextElement.innerHTML = rotatingText[0];
}
} else {
rotatingTextElement.innerHTML = "&nbsp;";
}
}

function rotateText() {
ctr = Math.floor(Math.random()*(rotatingText.length));
rotatingTextElement.innerHTML = rotatingText[ctr];
}

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


All you have to do now is add <trivial=info you want to display/> into your Notes section and it will display the trivia.

If you have more than one piece of info, place a @ between each bit of info. Just make sure that you have /> at the end of the last piece of info.

Also, you can change the speed of the changing text by adjusting in the code where it says var Interval = 3000

A higher number will slow it down.

Hope this is what you want?
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Thanks... This will work. Though I was thinking maybe a version that does not rotate the pieces of trivia so I could have one big window/field with all the trivia for that movie that I want. maybe separated with a horizontal line. Something like that be possible? or not to much trouble?   
Pete
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Actually couldn't even get it to work. Maybe because of so much info? Like the one I linked to in the OP.... the one trivia would be...

<trivia=R2D2 in Star Trek - During the Drill Machine sequence as the Enterprise comes out of its barrel role amidst destruction of the other Federation ships above Vulcan, we cut to an interior Enterprise bridge over the shoulder of Kirk that is looking out through the front viewscreen. In space, R2-D2 of Star Wars fame is floating in the debris. If you freeze frame the movie at 47:39 you can see the robot towards the bottom left of the viewscreen. />

When I put the above in... nothing shows in the trivia window.

And I would prefer it to show up in the window to look something more like...

Quote:
R2D2 in Star Trek
During the Drill Machine sequence as the Enterprise comes out of its barrel role amidst destruction of the other Federation ships above Vulcan, we cut to an interior Enterprise bridge over the shoulder of Kirk that is looking out through the front viewscreen. In space, R2-D2 of Star Wars fame is floating in the debris.

If you freeze frame the movie at 47:39 you can see the robot towards the bottom left of the viewscreen.
Pete
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 595
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Try this instead, it won't rotate. Type the trivia in the notes section, just make sure you put <p> after each bit of trivia.


Quote:
<HTML>
<HEAD>
<STYLE>
BODY {
  padding: 0px;
  margin: 0px;
  background-color: white;
  background-repeat: repeat-x;
  background-image:url($DPIMAGES.bgimage.jpg);
}
P {
  padding-top: 0px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  margin: 0px;
  color: black;
  font: 18pt Arial;
}
TABLE {
  width: 100%;
  text-align: center;
}
</STYLE>
</HEAD>
<BODY>
<p><DP NAME="NOTES"></p>
</BODY>
</HTML>
 Last edited: by Antares
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 595
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:
Actually couldn't even get it to work. Maybe because of so much info? Like the one I linked to in the OP.... the one trivia would be...

<trivia=R2D2 in Star Trek - During the Drill Machine sequence as the Enterprise comes out of its barrel role amidst destruction of the other Federation ships above Vulcan, we cut to an interior Enterprise bridge over the shoulder of Kirk that is looking out through the front viewscreen. In space, R2-D2 of Star Wars fame is floating in the debris. If you freeze frame the movie at 47:39 you can see the robot towards the bottom left of the viewscreen. />

When I put the above in... nothing shows in the trivia window.

And I would prefer it to show up in the window to look something more like...

Quote:
R2D2 in Star Trek
During the Drill Machine sequence as the Enterprise comes out of its barrel role amidst destruction of the other Federation ships above Vulcan, we cut to an interior Enterprise bridge over the shoulder of Kirk that is looking out through the front viewscreen. In space, R2-D2 of Star Wars fame is floating in the debris.

If you freeze frame the movie at 47:39 you can see the robot towards the bottom left of the viewscreen.


You're missing one letter, put an L at the end of trivia.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting Antares:
Quote:
Try this instead, it won't rotate. Type the trivia in the notes section, just make sure you put <p> after each bit of trivia.


Quote:
<HTML>
<HEAD>
<STYLE>
BODY {
  padding: 0px;
  margin: 0px;
  background-color: white;
  background-repeat: repeat-x;
  background-image:url($DPIMAGES.bgimage.jpg);
}
P {
  padding-top: 0px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  margin: 0px;
  color: black;
  font: 18pt Arial;
}
TABLE {
  width: 100%;
  text-align: center;
}
</STYLE>
</HEAD>
<BODY>
<p><DP NAME="NOTES"></p>
</BODY>
</HTML>


This one feels like we are getting real close...  but the way it is... the info goes both in the Notes field as well as the trivia field. Is there any way to make it so that this info don't also go in the notes field as I use that for other things as well.
Pete
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 595
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:

This one feels like we are getting real close...  but the way it is... the info goes both in the Notes field as well as the trivia field. Is there any way to make it so that this info don't also go in the notes field as I use that for other things as well.



If you don't mind using your Easter Egg field to hold the trivia info, try this instead...


Quote:
<HTML>
<HEAD>
<STYLE>
BODY {
  padding: 0px;
  margin: 0px;
  background-color: white;
  background-repeat: repeat-x;
  background-image:url($DPIMAGES.bgimage.jpg);
}
P {
  padding-top: 0px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  margin: 0px;
  color: black;
  font: 18pt Arial;
}
TABLE {
  width: 100%;
  text-align: center;
}
</STYLE>
</HEAD>
<BODY>
<p><DP NAME="EASTEREGGS"></p>
</BODY>
</HTML>


Remember, same as before with <p> in between each bit of trivia. Also, if you want the trivia subject in bold type, place it in between <b>  </b>
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Don't worry about it. If it has to be in more then one place notes is better. I was completely against this type of thing being in the Eater eggs field... as I said in that thread I linked to. But I appreciate the help! Thanks!
Pete
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 595
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Addicted2DVD:
Quote:
Don't worry about it. If it has to be in more then one place notes is better. I was completely against this type of thing being in the Eater eggs field... as I said in that thread I linked to. But I appreciate the help! Thanks!



Sorry, I didn't read the other thread.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
No reason to be sorry... I appreciate all the help.

I was just hoping for something that would make it invisible in the notes field. Kinda like the taglines do not show up in the notes field since it is inside <Tagline=Tagline />
Pete
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
hmmm... that makes me think. The first version of the Tagline code didn't rotate... if we can find that first version I bet I can make it work!
Pete
DVD Profiler Unlimited RegistrantMuckl
That's my common name.
Registered: April 9, 2009
Reputation: Great Rating
Germany Posts: 858
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Here's my attempt to fulfill your request. Hope you like it, but any criticism and suggestions are welcome – if not actually expected. 

I bolded and coloured the parts you can change without knowing HTML, CSS or JS.

Please make sure to check for the latest version of the Trivia HTML window here:
Movie Trivia for HTML Window

Quote:

<HTML>

<!--

@name              Trivia
@description      DVD Profiler HTML Window, that shows trivia saved in Notes.
                          Each piece of trivia has to start with <trivia= and end with />
                          E.g. <trivia=HERE COMES THE TEXT, YOU CAN USE ANY CHARACTERS YOU WANT, EVEN A / :-)/>
@author            Muckl (http://invelos.com/UserProfile.aspx?alias=Muckl)
@license            (CC) Attribution-Noncommercial-Share Alike 3.0 Unported; http://creativecommons.org/licenses/by-nc-sa/3.0/
@version            0.0.4
@date                2010-02-15
@dependencies  DVD Profiler v3+, DVD Profiler HEADER_VARS, IE v5.5+
@changelog        [REL] v0.0.4
                            [ADD] Several options of separating each trivia item
                            [CHG] Minor improvements
                            [REL] v0.0.3
                            [FIX] Minor bugfixes
                            [REL] v0.0.2
                            [ADD] Font size and style are configurable in config block
                            [REL] v0.0.1 (initial release, thanks Addicted2DVD for your request ;-))
@todo                - Show trivia from online resources like IMDb
                            - Even more features ;-)

//-->

<HEAD>

<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
//-->
</SCRIPT>

<script type="text/javascript">

/***************************************\
|********* START CONFIG BLOCK ***********|
\***************************************/

// Item list format
//    'hline'          --> separated with horizontal lines (see also lineColor underneath)
//    'paragraph'  --> separated with new paragraphs
//    'blank'          --> separated with blank lines
//    'bulls'            --> as bulleted list
var listStyle = 'hline';

// Colours
//    black, gray, maroon, red, green, lime, olive, yellow, navy, blue, purple, fuchsia, teal,
//    aqua, silver, white or any other colour in hexadecimal notation --> #000000 - #FFFFFF
var textColor = 'white';
var bgColor = 'black';
var lineColor = 'grey';

// Font
var textSize = 12; // Font size in pixel [integer]
var textStyle = 'normal'; // Additional font style ['normal' OR 'bold' OR 'italic']

/***************************************\
|********** END CONFIG BLOCK ************|
\***************************************/

window.onload = function () {
    // The split pattern is a bugfix for posting this code on Invelos Forums :-)
    var rx = new RegExp('<trivia=(([^\\/]|\\/(?!>' + '))*?)\\/>', 'gim'),
        res = [], code = '', pre = '', suf = '';
    switch (listStyle) {
        case 'bulls':
            pre = '<li>'; suf = '</li>'; break;
        case 'paragraph':
            pre = '<p>'; suf = '</p>'; break;
        case 'blank':
            suf = '<br><br>'; break;
        default:
            suf = '<hr style="color: ' + lineColor + ';" />';
    }
    while ((res = rx.exec(DP_Notes)) !== null) {
        code += pre + res[1] + suf;
    }
    if (pre === '') {
        code = code.slice(0, -suf.length);
    } else if (pre === '<li>') {
        code = '<ul>' + code + '</ul>';
    }
    document.body.innerHTML = code;
    document.body.style.color = textColor;
    document.body.style.backgroundColor = bgColor;
    document.body.style.fontSize = (isFinite(textSize)) ? Math.round(parseFloat(textSize, 10)) + 'px' : '12px';
    document.body.style.fontStyle = textStyle;
};
</script>

<style type="text/css">
body { margin: 10px; font-family: Tahoma,Arial,sans-serif; }
hr { width: 90%; height: 1px; margin: 8px 0px; }
ul { margin: 15px; }
li { margin-bottom: 15px; }
</style>

</HEAD>
<BODY>

</BODY>
</HTML>

 
1.0.1, iPhone 3GS, iOS 4.1.0

Trivia v0.3.1
My HSDB v5 additions, HTML windows and other stuff
 Last edited: by Muckl
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Thanks.,.. Antares and I got a makeshift (edited tagline one)one working... but I am glad to check this one out as well! So about to give it a try!
Pete
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Great Rating
United States Posts: 16,579
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
That worked great! Very little editing to it to do... and what editing there is to do is very easy! Thank You!
Pete
DVD Profiler Unlimited RegistrantEdwinK
Registered: May 27, 2007
Netherlands Posts: 686
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Looks cool.

Thanks for this. Now onwards looking for some cool trivia stuff.
Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer.
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2  Previous   Next