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: Desktop Feature Requests Page: 1  Previous   Next
HTML Window code for reading txt files .ini-style
Author Message
DVD Profiler Unlimited RegistrantBlair
Resistance is Futile!
Registered: October 30, 2008
United States Posts: 1,249
Posted:
PM this userDirect link to this postReply with quote
Ok, I know this may be confusing, but I'll do my best to explain.

For HTML-window-data related stuff, if you want to change something which fits a large portion of DVD's, you have to go into each of them, one by one (CTRL+P, click Notes, make change, OK, <down arrow>, repeat, repeat, repeat...) until all are done.

For instance, in one of my layouts, I use an HTML window for displaying taglines of the selected DVD. I made a change later which resulted in having to go through every once of the DVD's and change one repeating word to a new word which was a pain. In another case I have some complicated HTML-based stuff that I would like to use in a window, but I hate the idea of shoving it all into each Notes section because it would make the Notes section ridiculously cumbersome.

Using a frameset HTML tag, text/HTML-based files can already be read and displayed in Profiler, but if you want to use them to replace the Notes sections, each file has to be named as the DVD's UPC which means you how have hundreds or thousands of text files all possibly with only a small bit of data in each.

What I am asking for is an added HTML tag that can access data in the format of an .ini file so that the 1,000's of text files pages can be reduced to a single one.

In other words, instead of typing something like this which requires a separate file for each UPC:
----------------------------------
<frameset rows="*,*" border="0">
    <frame name="tagline" src="C:\FolderLocation\<DP NAME="UPC" Formatted="">.htm"></frameset>
</frameset>
----------------------------------

which would display the data within the corresponding file with the same UPC as the entry being viewed. It could instead be typed:
<DP FILEDISPLAY="C:\FolderLocation\taglines.htm" Type="UPC-INI">


And within the taglines HTML file you would see a nice smooth list:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[012569791916]  <!--2001: A Space Odyssey-->
Lines of text here

[043396718890]  <!--Air Force One-->
Lines of code here

[097360309041]  <!--Airplane!-->
Stuff relevant to only this UPC here

...and so on...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This means no more absolute dependency on Notes and only one file for each HTML Window displaying info making it much easier to edit data.


Completely lost and confused yet? Good
If at first you don't succeed, skydiving isn't for you.

He who MUST get the last word in on a pointless, endless argument doesn't win. It makes him the bigger jerk.
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
I like the idea, but mixing .ini syntax and HTML code is a bit ugly...


I haven't tested this, but that might work already today:
This approach works already today:

(content of HTML section)
Quote:

<html>
<head>
</head>

<frameset rows="*,*" border="0">
    <frame name="tagline" src="C:\FolderLocation\taglines.htm?upc=<DP NAME="UPC" Formatted="">">
</frameset>

</html>



(content of the external HTML file)
Quote:

<html>
<head>

<style type="text/css">
    div { display: none; }
</style>

<script type="text/javascript">
    window.onload = function () {
        if (document.location.search) {
            var query = document.location.search.split('?')[1].split('=');
            if (query[0].toLowerCase() === 'upc') {
                var div = document.getElementById('upc_' + query[1]);
                if (div) {
                    div.style.display = 'block';
                }
            }
        }
    };
</script>

</head>
<body>

<div id="upc_012569791916">  <!--2001: A Space Odyssey-->
    Lines of text here
</div>

<div id="upc_043396718890">  <!--Air Force One-->
    Lines of code here
</div>

<div id="upc_097360309041">  <!--Airplane!-->
    Stuff relevant to only this UPC here
</div>

</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 RegistrantBlair
Resistance is Futile!
Registered: October 30, 2008
United States Posts: 1,249
Posted:
PM this userDirect link to this postReply with quote
Oh I know that it could be a nightmare, but it was still worth suggesting for the nature of the advancement using HTML windows that I would love to see.

And yes, the frameset code already works (though I broke it down to a single frame). I've used it several times for testing purposes of a unique type of display I've wished to incorporate.


As for your suggested code, I haven't tested it yet, but I hadn't considered that approach.

Time to experiment!  (I wonder if HTML Window Sections have a file size limit. If so, I will be pushing it :lol: )
If at first you don't succeed, skydiving isn't for you.

He who MUST get the last word in on a pointless, endless argument doesn't win. It makes him the bigger jerk.
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
Quoting Blair:
Quote:
As for your suggested code, I haven't tested it yet, but I hadn't considered that approach.

Time to experiment!  (I wonder if HTML Window Sections have a file size limit. If so, I will be pushing it :lol: )

OK, I've just tested it. Works perfectly.

And I can't think of a relevant file size limit, DVDP just uses the IE installed on your system. And the HTML section itself only contains the frameset HTML... that's about 200 Bytes. 

EDIT: And if you use iframes, you can display several external HTML files (i.e. parts of them) in one single HTML section and display them more freely than with framesets.
 
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 RegistrantBlair
Resistance is Futile!
Registered: October 30, 2008
United States Posts: 1,249
Posted:
PM this userDirect link to this postReply with quote
Quoting Muckl:
Quote:
And I can't think of a relevant file size limit, DVDP just uses the IE installed on your system. And the HTML section itself only contains the frameset HTML... that's about 200 Bytes. 

  Yea, my mistake. I only read the code; I wasn't paying attention to it placement and in my head was putting both scripts into the window.


I have never worked with iframes (have never had a need to), but I can see how that could be a helpful alternative. I'll give that a try at some point probably.

Thanks for the suggestions.
If at first you don't succeed, skydiving isn't for you.

He who MUST get the last word in on a pointless, endless argument doesn't win. It makes him the bigger jerk.
 Last edited: by Blair
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
I'm glad I could be of help. 
 
1.0.1, iPhone 3GS, iOS 4.1.0

Trivia v0.3.1
My HSDB v5 additions, HTML windows and other stuff
    Invelos Forums->DVD Profiler: Desktop Feature Requests Page: 1  Previous   Next