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 4  Previous   Next
Help with HTML Window - A CHALLENGE.... (to help me of course! :))
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

I want to create a window in Profiler where I can type text for film reviews.

I've been a long-time subscriber to Total Film and at the moment I cut out the reviews of movies I own or want and keep them in a folder. (If you're wondering why...it's because I find it entertaining to read them when I watch a film; it is also a talking point when friends are over.)

I want a window I can type the text in.
I want it linked to tags so that if I've typed a review in I can check the tag box to display the review.

So far, I've managed to create the window and name it but I just can't get my head around how to get the text in it.
Do I HAVE to use Notes?  I really just want to be able to type it in the window because I use notes for gallery and taglines etc.

Any help would be greatly appreciated.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Not sure how much I can help... but I haven't seen a html field yet that you can type directly into the html field.. because if you set it up so you could... at least in my experience.... you would see that text in all profiles. The only thing I can personally think of is something like we use for the Episode Guides.... where you tell it to look for an html file named the upc/disc id. 

What I would probably do is convert the Episode guide loader to look for txt files instead of html files and have it load that way. I use note field with <ep=1> to tell it to laod an episode guide... but believe it can be done with tags as well.
Pete
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
I've been reading the other thread about Extended Features....could that work?

If I write the text in Word and save it as an html file into a folder and then link the window to that folder, would it work?

I really wouldn't know the first thing on how to make this work though.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
If you are talking the extended features I made... it could as it is also one I converted from the episode guide viewer. I can convert one for you easy enough I think... but a couple questions...

- Do you prefer it to look for a TXT file or an HTML file?... either is easy enough depends on if you will want to add formatting or graphics.
- Is putting something like <review=1> in notes ok.... or would you prefer the tags.... if the tags then I will have to try to look at the newer episode guide viewer to see how he got that going.

but no promises... I am new to this stuff too and can only try.
Pete
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
Thanks for any help you can give Pete.

HTML will be fine; as I can save to HTML through word.

I've rethought the tags issue...I think I'll skip that.

Here's what I want

Simple background colour (which I can then customise)
Simple text.
Display "No Review Available" if I haven't written one.

I've already typed up one review and have saved it as: tfr.UPC.html

tfr=total film review
So, what I need the window to do it look in the location of this file and then display it.

Hope that makes sense.

Neil
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
yup.. makes sense... let me see what I can do.
Pete
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
OK... I copied another html window I use and updated it to work for what you want..., I Think... worked with my tests at least.

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

// -------- Configuration block - Start --------
// Extended Features Storage Location
var pathToEfStorage =  "C:\\tfr\\"; // <-- SET

// filename
var fileNamePrefix = "tfr."; // <-- SET
var excludeLocality = true; // <-- SET true/false
var fileNameSuffix = ".html"; // <-- SET .htm/.html

// -------- Configuration block - END --------


function showEF()
{
var notes = DP_Notes.indexOf("\<tfr=1\>");
if (notes != -1) {
var upc = DP_UPC;
if (excludeLocality == true && upc.indexOf(".") != -1)  upc = upc.substring(0, upc.lastIndexOf("."));
pageToLoad = pathToEfStorage + fileNamePrefix+ upc + fileNameSuffix;

window.location.href = pageToLoad;
} else {
document.write("No Review Available!");
}
}

</SCRIPT>
</HEAD>
<BODY onload="showEF()">
</BODY>


The small part I put in bold you will have to change to tell it where you store the html files. No background color... but figured you can add that to the html file. Let me know how that works for you.
Pete
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
I'm thinking the filename prefix shouldn't be set in the HTML code, because that prefix probably changes the according to where the review is from.

Maybe something like I did for the tagline would work better in this case. For instance, you put the review tag in the notes, but instead of specify just whether there is a review or not, you can specify a prefix, and it then builds the filename using the prefix and UPC. That way, you could even, theoretically, have multiple review for a single film and have them rotate.

Thoughts?
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Feel free to improve on it... I am far from good enough to do anything but convert other html windows to get what I need..

For what he is doing it will work though... he is typing out a review from a magazine and storing it on his harddrive... then having it open in profiler.
Pete
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
Didn't work 

I copied your code and changed the path to:
var pathToEfStorage =  "D:\Neil's Stuff\DVD Profiler\Total Film Review\\tfr\\"; // <-- SET

Is that wrong?

The window is now displaying the 'No Review Available' but not the actual review.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
I didn't rewrite that part of the code... but going by how I changed mine... try...

D:\\Neil's Stuff\\DVD Profiler\\Total Film Review\\tfr\\

that is assuming your folders are...

D
- Neil's Stuff
-- DVD Profiler
--- Total Film Review
---- tfr

If you only have folders...

D
- Neil's Stuff
-- DVD Profiler
--- Total Film Review

Then try...

D:\\Neil's Stuff\\DVD Profiler\\Total Film Review\\
Pete
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
D
- Neil's Stuff
-- DVD Profiler
--- Total Film Review

This is correct.

I changed it accordingly but it's still not working.

It now reads:
var pathToEfStorage =  "D:\\Neil's Stuff\\DVD Profiler\\Total Film Review\\"; // <-- SET

In folder 'Total Film Review' there is one file - tfr.UPC.html

Could my translation file have any impact? Meaning that UPC is referred to as EAN?
 Last edited: by Pantheon
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
Dumb question, but it has to be asked: When you say there is one file in the folder called tfr.UPC.html, you do mean it is tfr.19345628675.html (or whatever real UPC it should be)?

You could also add the line "alert(pageToLoad);" right before the line "window.location.href = pageToLoad;", which would tell us what page it is actually trying to load.
DVD Profiler Unlimited RegistrantStar ContributorAddicted2DVD
Registered: March 13, 2007
Reputation: Highest Rating
United States Posts: 17,329
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Quoting Pantheon:
Quote:
D
- Neil's Stuff
-- DVD Profiler
--- Total Film Review

This is correct.

I changed it accordingly but it's still not working.

It now reads:
var pathToEfStorage =  "D:\\Neil's Stuff\\DVD Profiler\\Total Film Review\\"; // <-- SET

In folder 'Total Film Review' there is one file - tfr.UPC.html

Could my translation file have any impact? Meaning that UPC is referred to as EAN?


hmmm... I don't know... I just put a folder in C Drive called tfr... and have the html file (tfr.024543116080.html) in that. Then in that line I have mine set to...

var pathToEfStorage =  "C:\\tfr\\"; // <-- SET

...and that worked for me. so sorry to say.. but I am at a loss.
Pete
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
OH i just noticed something.. You have an apostrophe in one of the folder's name. I don't know if that's the problem, but it wouldn't hurt to try and remove it from the folder's name. It might be what is breaking it.
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:
OH i just noticed something.. You have an apostrophe in one of the folder's name. I don't know if that's the problem, but it wouldn't hurt to try and remove it from the folder's name. It might be what is breaking it.


Thanks for the suggestion - didn't work tho'

My gallery window works fine and it has exactly the same path.

Could it be something to do with the file I saved, maybe?
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1 2 3 4  Previous   Next