Author |
Message |
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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 |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | yup.. makes sense... let me see what I can do. | | | Pete |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | 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? |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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 |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | 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. |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | 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 |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | 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. |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | 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? |
|