Author |
Message |
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 3,435 |
| Posted: | | | | Quoting ya_shin: Quote: Storing the EPGs sound a bit messy though (not that I see a better solution). I think I will want to keep a external Master HTML file, where I link to the EPGs, so that I can find them easier. If there are many numbered files, how to you find a specific one to edit it.... I just found out that my concerns were unnecessary. ![](/images/emoticons/happy.gif) If you right-click in the HTML Window with the EPG it will open Notepad with the file inside. You can edit it right in there and changes made will be saved. ![](/images/emoticons/cool.gif) | | | Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan. Registered: May 29, 2000 (at InterVocative) |
|
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 467 |
| Posted: | | | | I have adapted the code to use Tag at the place of <ep=1> in the notes. I have also added code to delete the code of country at the end of the UPC so the html files must be named only UPC.html. This is my code : Quote:
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool = 0; var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = ("D:/Mes documents/DVD Profiler/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "Genre/Série TV") { bool = 1; } } if (bool == 1) { document.write("<iframe SRC='" + epg + "' width='100%' height='100%'></iframe>"); } else { document.write("Il n'existe pas de guide pour cette série ou ce film"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
You must change in the code Genre/Série TV by the name of your Tag and if you want the message when there is no EPG : document.write("Il n'existe pas de guide pour cette série ou ce film");. If you need help, ask question. | | | Regards Cyrille |
|
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 467 |
| Posted: | | | | The only thing I need to improve is the case where it's a Serie TV and there is no EPG file. The only thing I know to do it is the ActiveX object but don't work with DVD Profiler. If someone know a solution without use an ActiveX to test a file exist is welcome For the moment I think I will use a Tag to indicate No EPG. | | | Regards Cyrille |
|
Registered: March 13, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 17,330 |
| Posted: | | | | How about if you just create a new tag for series with epg's and use that tag to show epg's or not? you would just have to make new tag and go through and check them for the ones with the epgs. I personally am fine with <epg=1> in my notes since it don't show up in the notes field anyway. ![](/images/emoticons/smile.gif) | | | Pete |
|
Registered: March 13, 2007 | Posts: 1,242 |
| Posted: | | | | Pete
I have just tried Cyrille's suggestion for the Epg tab, I'm the user who Ya_Shin was helping via PM's. Using Cyrille's version of using a tag to indicate if it's a TV Series or not doesn't require the notes field to be HTML enabled in the first place, and I have been able to adapt it so as to be able to have my epg's in another drive / directory as well modified code below. As I said to Ya_Shin I'm not a programmer or anything so am picking this up as I go. Only trouble so far is if you have an episode guide it shows inside another frame within your choosen new tab (mine EPG), but this is scrollable, if not tag set for TVSeries then you get no frame but a message of your chosing (mine "No Epg"). Perhaps somebody can point me in the direction for removing the frame within the new tab?
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool = 0; var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = ("D:/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "TVSeries") { bool = 1; } } if (bool == 1) { document.write("<iframe SRC='" + epg + "' width='100%' height='100%'></iframe>"); } else { document.write("No Epg"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
Steve |
|
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 467 |
| Posted: | | | | Version to manage No EPG Tag : Quote:
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool_serie = 0; var bool_epg = 1; var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = ("D:/Mes documents/DVD Profiler/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "Genre/Série TV") { bool_serie = 1; }
if (DP_Tags[i] == "Genre/Série TV/Pas d'Epg") { bool_epg = 0; } } if ((bool_serie == 1) && (bool_epg == 1)) { window.location.href= epg ; <!-- document.write("<iframe SRC='" + epg + "' width='100%' height='100%'></iframe>"); --> } else { document.write("Il n'existe pas de guide pour cette série ou ce film"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
You must change " Genre/Série TV/Pas d'Epg" by your new tag for No EPG. PS : Changed the code to remove the border with the code given by SH84 in this post previously. | | | Regards Cyrille | | | Last edited: by Cyrille |
|
Registered: March 13, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 17,330 |
| Posted: | | | | Quoting snarbo: Quote: Pete
I have just tried Cyrille's suggestion for the Epg tab, I'm the user who Ya_Shin was helping via PM's. Using Cyrille's version of using a tag to indicate if it's a TV Series or not doesn't require the notes field to be HTML enabled in the first place, and I have been able to adapt it so as to be able to have my epg's in another drive / directory as well modified code below. As I said to Ya_Shin I'm not a programmer or anything so am picking this up as I go. Only trouble so far is if you have an episode guide it shows inside another frame within your choosen new tab (mine EPG), but this is scrollable, if not tag set for TVSeries then you get no frame but a message of your chosing (mine "No Epg"). Perhaps somebody can point me in the direction for removing the frame within the new tab?
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool = 0; var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = ("D:/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "TVSeries") { bool = 1; } } if (bool == 1) { document.write("<iframe SRC='" + epg + "' width='100%' height='100%'></iframe>"); } else { document.write("No Epg"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
Steve I also have no real experience with codes and learning as I go... but I don't have the iframe (otherframe inside the field) using SH84's code... Quote: <HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //-->
function showEPG() { var epg = ("C:/Dokumente und Einstellungen/Thomas/Anwendungsdaten/DVD Profiler/epg/epg-" + DP_UPC + ".html"); var notes = DP_Notes.indexOf("epg=1"); if (notes != -1) { window.location.href= epg ; } else { document.write("no EPG!"); } } </SCRIPT> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML> As for having to use <epg=1> in the notes and having html in notes enabled... that is more then cool for me... since I already have html in notes enabled for other purposes. and since that is the case... epg=1 don't show in the notes field. so that frame is coming somewhere about the iframe in the code... but how to make it go away with their version... I don't know. BTW... is there any other reason for me to change to know of epg's by tag other then not having to by the notes? because if not... I am cool with the way it is for me. | | | Pete |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Cyrille: Here's the code I'm using Quote:
<HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //-->
function showEPG() { [b] var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = (DP_ProgramPathImages + "epg/" + upc + ".html"); [/b] var notes = DP_Notes.indexOf("epg=1"); if (notes !=-1) { window.location.href= epg; } else { document.write("No EPG available."); } } </SCRIPT> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
As you can see, I'm using the code that check for epg=1 in the notes, but I have integrated your removal of the country code from the upc, as shown in the bolded part. The problem I have is if the locality is United States, then there is no country code in the upc, so it doesn't see a dot and the UPC variable ends up containing nothing. For example, I have 24:Season 1 as Canada locality, here's where it's trying to get the epg: Quote: file:///C:/Documents and Settings/WhateverIsMyUserName/My Documents/DVD Profiler/Databases/Default/Images/epg/024543114185.html If I change the locality to United States, here's where it's looking: Quote: file:///C:/Documents and Settings/WhateverMyUserNameIs/My Documents/DVD Profiler/Databases/Default/Images/epg/.html Is there way to fix that? |
|
Registered: March 13, 2007 | Posts: 1,242 |
| Posted: | | | | Pete No other reason, it's just that I used notes in v2.4/5 without html enabled, so with new v3 and being able to create your own window, I can now use your Episode Guides and keep all my old info from the un-html notes. I think thanks to Ken this new version 3 of DVDP is going to prove to be quite an exceptional piece of software when it comes to uncatalogued DVD's. I will have to see if I can incorporate SH84 no frame into Cyrille code and get "The Best of Both World's" Star Trek TNG Seasons 3/4 Steve |
|
Registered: March 13, 2007 | Reputation: ![Highest Rating](/images/Ratings/Small/4.png) | Posts: 17,330 |
| Posted: | | | | Cool... thanks Steve... looks to be no reason for me to re-code mine then. ![](/images/emoticons/smile.gif) And I agree about this new version... as I said earlier... now with these new html windows.... the possibilities are endless! ![](/images/emoticons/grin.gif) | | | Pete |
|
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 467 |
| Posted: | | | | Quoting RossRoy: Quote: Cyrille:
Here's the code I'm using
Quote:
<HTML> <HEAD> <SCRIPT TYPE="text/javascript"> <!-- <DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False"> //-->
function showEPG() { [b] var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = (DP_ProgramPathImages + "epg/" + upc + ".html"); [/b] var notes = DP_Notes.indexOf("epg=1"); if (notes !=-1) { window.location.href= epg; } else { document.write("No EPG available."); } } </SCRIPT> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
As you can see, I'm using the code that check for epg=1 in the notes, but I have integrated your removal of the country code from the upc, as shown in the bolded part.
The problem I have is if the locality is United States, then there is no country code in the upc, so it doesn't see a dot and the UPC variable ends up containing nothing.
For example, I have 24:Season 1 as Canada locality, here's where it's trying to get the epg:
Quote: file:///C:/Documents and Settings/WhateverIsMyUserName/My Documents/DVD Profiler/Databases/Default/Images/epg/024543114185.html
If I change the locality to United States, here's where it's looking:
Quote: file:///C:/Documents and Settings/WhateverMyUserNameIs/My Documents/DVD Profiler/Databases/Default/Images/epg/.html
Is there way to fix that? Yes I will check to this. I will test the return value of lastIndexOf and change the value when no dot. | | | Regards Cyrille |
|
Registered: March 13, 2007 | Reputation: ![High Rating](/images/Ratings/Small/1.png) | Posts: 467 |
| Posted: | | | | This is the last version of code with the test if USA dvd (and so no dot in the UPC (thanks to RossRoy)) and the no border of SH84. Quote:
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool_serie = 0; var bool_epg = 1; var upc = DP_UPC; var pos_dot = upc.lastIndexOf("."); if (pos_dot != -1) { upc = upc.substring(0,pos_dot); } var epg = ("D:/Mes documents/DVD Profiler/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "Genre/Série TV") { bool_serie = 1; }
if (DP_Tags[i] == "Genre/Série TV/Pas d'Epg") { bool_epg = 0; } } if ((bool_serie == 1) && (bool_epg == 1)) { window.location.href= epg ; } else { document.write("Il n'existe pas de guide pour cette série ou ce film"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
| | | Regards Cyrille |
|
Registered: March 13, 2007 | Posts: 1,242 |
| Posted: | | | | Cyrille
Thanks for posting new code had to adapt it for my use, here's what I'm using, I'm in the UK region 2, new frame inside the new tab now gone, thanks, don't have to use extended (UPC).html number as under SH84's code, with combination's of various codes that have been submitted and with Ya_Shin's help I now have the Episode Guides as provided by Pete up and working and still able to retain old V2.4/5 notes that are not in html format.
<HTML> <HEAD> <SCRIPT TYPE="text/javascript">
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="False" IncludeCast="False" IncludeCrew="False">
function showEPG() { var i; var bool = 0; var pos_dot = DP_UPC.lastIndexOf("."); var upc = DP_UPC.substring(0,pos_dot); var epg = ("D:/Epg/" + upc + ".html");
for (i=0; i < DP_Tags.length; i++) { if (DP_Tags[i] == "TVSeries") { bool = 1; } } if (bool == 1) { window.location.href= epg ; } else { document.write("No Epg"); } } </SCRIPT> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </HEAD> <BODY onload="showEPG()"> </BODY> </HTML>
Steve |
|
Registered: March 13, 2007 | Posts: 793 |
| Posted: | | | | Quoting Cyrille: Quote: This is the last version of code with the test if USA dvd (and so no dot in the UPC (thanks to RossRoy)) Yes! Thanks a lot! |
|
Registered: March 13, 2007 | Posts: 525 |
| Posted: | | | | Although I'm no javascript person. I had enough trouble getting this to work for me. But what would be nicer instead of having to use tags is if it could just attempt to load the page and have it work or fail without the 404 error.
Anyone know of a way to do that? | | | ![](http://www.dvdaholic.me.uk/phpdvdprofiler/imagecache/dvdp.jpg) Home of the phpDVDProfiler forums |
|
Registered: March 13, 2007 | Posts: 1,242 |
| Posted: | | | | AJM
From what I remember 404 error is what we get on the internet when the file / location can't be found, so if I was you I would check to see if the file that the program is looking for is where it is supposed to be found by which ever function is calling for it. I know this might not sound very helpful, but I'm no programmer, and am only going on memory of 404 error.
Steve |
|