Author |
Message |
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Quoting Pantheon: Quote: 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? Well testing the file itself is easy, just try opening it in Internet Explorer. When you say it doesn't work, what is shown in the HTML window? |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | All I can see is the 'No Review Available' statement. |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Ah! What did you put in the notes? The code, as posted by Pete, is currently set up to look for <tfr=1> |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | That's what it was! Many thanks! I obviously missed that little nugget of information. There's a couple of people who just got positive ratings from me! | | | Last edited: by Pantheon |
|
Registered: March 13, 2007 | Reputation: | Posts: 17,334 |
| Posted: | | | | Glad you got it working Pantheon! | | | Pete |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | Hello all...
With the recent 3.5 updates I personally feel Profiler is finally nearing perfection (for me, at least) and, the things left that I want are more aesthetic than essential.
Here's what I want - if it's even possible:
A 'General Information' HTML window to replace the existing GI tab.
I want it to display the following (as it already does): Media Format EAN Changes/Locked/Updates Icons Release Date Purchase Date & Place of P Genres Runtime Case Type Reviews......................and it is here that the challenge lies....................
I don't want the review to display as coloured boxes as it does now...I WANT STARS!!!
In effect I want the window to be able to display the coloured squares as coloured stars and half-stars.
If this is possible - and if someone is capable of writing the code (and has the time) - I will be very pleased.
Neil |
|
Registered: March 15, 2007 | Reputation: | Posts: 5,459 |
| Posted: | | | | Eeeh, you don't ask for much do you! I started one of these a while ago, but abandoned it cos I couldn't get the background to match the rest of Profiler. I'll see if it's still on my harddrive somewhere and can be adapted. Edit: if I remember rightly, I don't think you can add the Changes/Locks/Updates icons to an HTML window either. | | | Last edited: by northbloke |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,029 |
| Posted: | | | | Quoting Pantheon: Quote: A 'General Information' HTML window to replace the existing GI tab.
I want it to display the following (as it already does): ... Changes/Locked/Updates Icons ...
Unfortunately, there lies the problem with replacing the GI window. While you can simulate (or even improve *1) the locked icon, there is no way for a skin (or a plugin) to correctly display the "Changes Made" and "Updates Available" status. -- (*1) By improving locks, I mean differing between full/partial locks and separating profile from image locks - just as it is done when you display the list of available updates. | | | Matthias |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | Thanks for the replies guys. Would it be possible to do what I want WITHOUT the change/update etc icons? I can live without them on the screen if it means I can get my stars! EDIT: Or maybe keep/improve the locked icon only? | | | Last edited: by Pantheon |
|
Registered: June 9, 2007 | Posts: 1,208 |
| Posted: | | | | I'm intrigued by this Stars idea if someone can make it work |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | I wrote some code that did that in the old 2.x skin system. It should be about the same - I don't think that the reviews items changed ... I'll look to see where I left that ... | | | -fred |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | Well, that code was a little embedded in the skin, so I extracted and fixed an example. This javascript calculates the number of half-bars (half-stars) in the review display. It sets the javascript array "count" to the number found. The numbers range from 0 to 10 (1 will never be seen since DVDProfiler doesn't allow a single half-star). Zero means no value found - one cannot deduce whether this is because it is configured to not display this particular review type, or whether it was really lousy ... To put stars in, you need gifs of stars (3.gif should be 1 and one-half stars, 10.gif should be 5 stars, etc.). The location of the stars must be specified in the javascript (the variable imgloc, arbitrarily set here to "c:\Stars\" - note the trailing slash) hope this helps Quote: <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1"> <title><DP NAME="SORTTITLE"></title> </head> <body> <form style="display:none"> <textarea id="reviews"><DP NAME="REVIEW" WIDTH="240"></textarea> </form> <script type="text/javascript"> var ShowGraph = false; var imgLoc='C:/Stars/'; var ReviewNames=new Array(); ReviewNames['#0080FF'] = 'film'; ReviewNames['#00FF80'] = 'video'; ReviewNames['#FF8080'] = 'audio'; ReviewNames['#FFFF80'] = 'extras'; var counts=new Array(); counts['film'] = 0; counts['video'] = 0; counts['audio'] = 0; counts['extras'] = 0;
var TheReview=document.getElementById('reviews').value; var t=TheReview.split('<'); var divisor=1, numreviews=4;
for (var i in t) { if (t[i].substr(0,3) == 'TD ') { a = t[i].split(' '); if (a.length == 3) { z = a[1].split('='); width=z[1]; z = a[2].split('"'); color=z[1]; width++; if (divisor == 1) { divisor = width/2; numreviews = (2*24)/width; } counts[ReviewNames[color]] += width/divisor; } } }
if (ShowGraph) document.write(TheReview); document.write('<table>'); if (counts['film'] != 0) document.write('<tr><td class=f3>Review (movie):</td>' +'<td class=f2><img src="'+imgLoc+counts['film'] +'.gif" alt="'+counts['film']+' / 10">' +'</td></tr>'); if (counts['video'] != 0) document.write('<tr><td class=f3>Review (video):</td>' +'<td class=f2><img src="'+imgLoc+counts['video'] +'.gif" alt="'+counts['video']+' / 10">' +'</td></tr>'); if (counts['audio'] != 0) document.write('<tr><td class=f3>Review (audio):</td>' +'<td class=f2><img src="'+imgLoc+counts['audio'] +'.gif" alt="'+counts['audio']+' / 10">' +'</td></tr>'); if (counts['extras'] != 0) document.write('<tr><td class=f3>Review (extras):</td>' +'<td class=f2><img src="'+imgLoc+counts['extras'] +'.gif" alt="'+counts['extras']+' / 10">' +'</td></tr>'); document.write('</table>'); </script> </body> </html>
| | | -fred |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | Hi Fred,
Thanks for the hard work....
Can't get it to work though!
I've found the gifs I want to use and have saved them in a folder. I've also put the path in the code but it's not working. I've just got text (Review (movie) on a white background and the graphic to show where the stars should be. In addition to the above, how do I change the bgrd colour? Do I have to colour the stars? and if so, how do I differentiate between the blue/yellow/green stars etc? Sorry to be such a html-virgin! I'm actually looking for a tutorial to learn it (at the moment I only know the very basics).
Also - not wanting to look a gift horse in the mouth!!!! - but, how would I go about making the window display the other General Info stuff I wanted? | | | Last edited: by Pantheon |
|
Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | ah, sorry, I was just focused on the stars part of the problem.
If I had to guess why the path wasn't working, I'd have to guess you used back slashes? Those need to be doubled in strings as they are the escape character. that's why i tend to use forward slashes. If that isn't it, could you PM me your code, or post it and I'll take a look.
You could use styles to change the background color, or you could change the <body> tag to read <body bgcolor="#aabbcc"> where #aabbcc is carefully chosen to match the color of the other backgrounds (I don't know what this value is, sorry)
If you want the stars to be different colors depending on review types, you could get a complete set of stars for each color, then change the code to identify the correct set (ie. name the stars files something like Video1.gif, Extras5.gif, etc. and then have something like: document.write("<img src="+"Review"+counts['review']+">");
The other info is (mostly) available using the <DP NAME="key"> API (i used a couple of those in the sample).
I tend to use www.w3schools.com for general HTML reference; it has pretty wide coverage ...
HTH | | | -fred |
|
Registered: May 27, 2007 | Posts: 691 |
| Posted: | | | | I had a problem when using the '/' in the path. Changed it to '\\' and it worked. Now I need to find nice star images . Thanks Freed. | | | Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer. |
|
Registered: March 14, 2007 | Reputation: | Posts: 1,819 |
| Posted: | | | | Here's how it currently looks:
<html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1"> <title><DP NAME="SORTTITLE"></title> </head> <body bgcolor="#000053"> <form style="display:none"> <textarea id="reviews"><DP NAME="REVIEW" WIDTH="240"></textarea> </form> <script type="text/javascript"> var ShowGraph = false; var imgLoc='C:/Users/Neil/Documents/DVD Profiler/Stars'; var ReviewNames=new Array(); ReviewNames['#0080FF'] = 'film'; ReviewNames['#00FF80'] = 'video'; ReviewNames['#FF8080'] = 'audio'; ReviewNames['#FFFF80'] = 'extras'; var counts=new Array(); counts['film'] = 0; counts['video'] = 0; counts['audio'] = 0; counts['extras'] = 0;
var TheReview=document.getElementById('reviews').value; var t=TheReview.split('<'); var divisor=1, numreviews=4;
for (var i in t) { if (t[i].substr(0,3) == 'TD ') { a = t[i].split(' '); if (a.length == 3) { z = a[1].split('='); width=z[1]; z = a[2].split('"'); color=z[1]; width++; if (divisor == 1) { divisor = width/2; numreviews = (2*24)/width; } counts[ReviewNames[color]] += width/divisor; } } }
if (ShowGraph) document.write(TheReview); document.write('<table>'); if (counts['film'] != 0) document.write('<tr><td class=f3>Review (movie):</td>' +'<td class=f2><img src="'+imgLoc+counts['film'] +'.gif" alt="'+counts['film']+' / 10">' +'</td></tr>'); if (counts['video'] != 0) document.write('<tr><td class=f3>Review (video):</td>' +'<td class=f2><img src="'+imgLoc+counts['video'] +'.gif" alt="'+counts['video']+' / 10">' +'</td></tr>'); if (counts['audio'] != 0) document.write('<tr><td class=f3>Review (audio):</td>' +'<td class=f2><img src="'+imgLoc+counts['audio'] +'.gif" alt="'+counts['audio']+' / 10">' +'</td></tr>'); if (counts['extras'] != 0) document.write('<tr><td class=f3>Review (extras):</td>' +'<td class=f2><img src="'+imgLoc+counts['extras'] +'.gif" alt="'+counts['extras']+' / 10">' +'</td></tr>'); document.write('</table>'); </script> </body> </html>
I've got the correct background colour now. However, can't see the text - need the text in white.
Also, I really don't understand where I should put the document.write code you mentioned. Sorry.
So far I've created the gifs and have named them Movie1 etc, and DVD1 etc. |
|