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  Previous   Next
Request: DVD Compare window
Author Message
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Hello, I tried this and failed, so I thought I would request from someone that knows what they are doing. I would love to have a window for DVD Compare (http://www.dvdcompare.net/index.php) similiar to the ones available for IMDB and Wikipedia. If someone thanks that can do this I would really appreciate it.
DVD Profiler user since October 1, 2004
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
There you go:
Quote:

<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/
var dvdcStart = "";
var dvdcEnd = "";
var dvdcCode = "";
var dvdcLink = "";
var dvdcURL = "http://www.dvdcompare.net/comparisons/film.php?fid=";

// Open DVD Compare page for the profile
function dvdc() {
dvdcStart = DP_Notes.toLowerCase().indexOf("\<dvdc") + 6;

if (dvdcStart>5) {
dvdcEnd = DP_Notes.toLowerCase().indexOf("\/\>", dvdcStart);
dvdcCode = DP_Notes.slice(dvdcStart, dvdcEnd);
dvdcLink = (dvdcURL + dvdcCode);
window.location.href = dvdcLink;
} else {
document.write("There is no DVD Compare code in the notes.");
}
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="dvdc();">
</BODY>
</HTML>


Just add <dvdc=3212 /> for example, which will open this page:
http://www.dvdcompare.net/comparisons/film.php?fid=3212
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Try this:
Quote:
<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/
// Open IMDb page for the profile
function dvdcompare() {
  var dvdcompareStart = DP_Notes.toLowerCase().indexOf("\<dvdcompare\=") + 12;
  var dvdcompareEnd = DP_Notes.toLowerCase().indexOf("\>", dvdcompareStart);
  var dvdcompareCode = DP_Notes.slice(dvdcompareStart, dvdcompareEnd);
  var dvdcompareLink = ("http://www.dvdcompare.net/comparisons/film.php?fid=" + dvdcompareCode);
  if (dvdcompareEnd > 1) {
    window.location.href= dvdcompareLink;
  } else {
    document.write("You need to add &LT;DVDCOMPARE=XXXXX&GT; to your notes for this to work")
  }
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="dvdcompare();">
</BODY>
</HTML>


You need to add the number at the end of the DVD Comapre URL in the Notes section using:
<dvdcompare=xxxx>

I only put this together quickly using the IMDb window code, so give it a try and check back if it doesn't work.

EDIT:
Doh, RossRoy must have hit "Submit" just after I hit "Reply"...
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
 Last edited: by nuoyaxin
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Thank you so much for the script RossRoy, just a few more questions since I am a total noob at this,

where exactly do I add the <dvdc=3212 />?

Also, is this script automatic as with the IMDB and Wikipedia ones?
DVD Profiler user since October 1, 2004
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
wow, you guys are fast, I love it

Anyways, thanks for the tip as well Achim, I will give it a try.

My only question is, is it possible to make this so that it will automatically find the page for the film when the profile is selected? I have scripts for IMDB, Rotten Tomatoes, and Wikipedia that do this.
DVD Profiler user since October 1, 2004
 Last edited: by deadman36g
DVD Profiler Unlimited RegistrantRossRoy
Registered: March 13, 2007
Posts: 793
Posted:
PM this userDirect link to this postReply with quote
The code at the end of the DVD Compare link, you just add it to the Notes of the specific profile. So, like my example above, for 28 Days Later, the link is :

http://www.dvdcompare.net/comparisons/film.php?fid=3212

so you'd add this to your notes:

<dvdc=3212 />

Oh and, sorry Ya_Shin. Didn't mean to make you work on it for nothing, but at least, it validates my solution! 
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Thanks Ross, it is working,

I have the following script for IMDB,

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

function imdb() {
if (DP_OriginalTitle) {
var title = DP_OriginalTitle;
} else {
var title = DP_Title;
}
var matchErg = DP_Notes.match(/imdb:\s*(tt\d+)/i);
if (matchErg) {
var imdbLink = "http://www.imdb.com/title/" + matchErg;
} else {
var imdbLink = "http://www.imdb.com/find?s=tt&q=" + title;
}
window.location.href= imdbLink;
}

//-->
</SCRIPT>
</HEAD>
<BODY onload="imdb();">
</BODY>
</HTML>


And that scripts makes it so that there is no need to enter anything in the notes to find a certain listing, is this possible with DVD Compare or are they perhaps set up differently so that this cannot be done?
DVD Profiler user since October 1, 2004
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting RossRoy:
Quote:
Oh and, sorry Ya_Shin. Didn't mean to make you work on it for nothing, but at least, it validates my solution! 

No worries, I just felt surprised when I hit "Submit" to find your answer above mine...

It's better to have two answers than none.

Quoting Deadman:
Quote:
And that scripts makes it so that there is no need to enter anything in the notes to find a certain listing, is this possible with DVD Compare or are they perhaps set up differently so that this cannot be done?

Both scripts above are designed that way. If that doesn't work, something is wrong.

I am not sure, but if the window is not active, e.g. hidden behind another tab, it may only begin to load when being selected, so still take a moment there, but it should load automatically.
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Achim, I tried it and it just says There is no DVD Compare code in the notes., now if I put the code in the notes it works, but for the others (IMDB, Wiki, etc.) I did not have to put any code in the notes.
DVD Profiler user since October 1, 2004
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Wiki is going by Title, IIRC. IMDb, however, should not open the correct page right away if you don't add the code in the Notes...

The only thing we could then do is open the main page for DVD Compare, as the search pages don't seem to have their own URLs, like IMDb does. If that is sufficient for you, simply do this:

Quote:
<HTML>
<HEAD>
</HEAD>
<BODY onload= (window.location.href="http://www.dvdcompare.net/")>
</BODY>
</HTML>
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Quoting ya_shin:
Quote:
The only thing we could then do is open the main page for DVD Compare, as the search pages don't seem to have their own URLs


var szUrl = "http://www.dvdcompare.net/comparisons/search.php?searchtype=text&param="
            + escape(DP_OriginalTitle);

is the search URL for DVDCompare using the original title.
Matthias
 Last edited: by goodguy
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Thanks goodguy! I found though that the OriginalTitle is often empty and as Doug's collection mainly contains R1 DVDs the DP_Title seems to quite sufficient. I tried and got fairly good results.

Doug, here is the code using goodguy's link:
Quote:
<HTML>
<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
<DP NAME="HEADER_VARS" Language="JavaScript" Comments="True" IncludeCast="False" IncludeCrew="False">
/**************************************************/
// Open DVD Compare page for the profile
function dvdcompare() {
  var szTitle = (DP_OriginalTitle == "") ? DP_Title : DP_OriginalTitle;
  var dvdc = ("http://www.dvdcompare.net/comparisons/search.php?searchtype=text&param=" + escape(szTitle));
  window.location.href= dvdc;
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="dvdcompare();">
</BODY>
</HTML>
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
 Last edited: by nuoyaxin
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
Yeah, sorry about that. you can do something like this:

var szTitle = (DP_OriginalTitle == "") ? DP_Title : DP_OriginalTitle;

If you want to go crazy, you can also use a RegExp to strip leading articles, but the DVDCompare search shouldn't require it.
Matthias
DVD Profiler Unlimited Registrantnuoyaxin
prev. known as ya_shin
Registered: March 13, 2007
Reputation: High Rating
Taiwan, Province of China Posts: 3,436
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Amended aboce script to incorporate goodguy's suggestions; hopefully correctly.
Achim [諾亞信; Ya-Shin//Nuo], a German in Taiwan.
Registered: May 29, 2000 (at InterVocative)
DVD Profiler Unlimited Registrantdeadman36g
got 1200 and counting!
Registered: March 13, 2007
United States Posts: 262
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Thank you all so very much it is working perfectly
DVD Profiler user since October 1, 2004
DVD Profiler Unlimited RegistrantWhite Pongo, Jr.
No, I iz no Cheshire Cat!
Registered: August 22, 2007
Reputation: High Rating
Posts: 1,807
Posted:
PM this userDirect link to this postReply with quote
Quoting ya_shin:
Quote:
Amended aboce script to incorporate goodguy's suggestions; hopefully correctly.


Works nicely 
-- Enry
    Invelos Forums->DVD Profiler: Layouts and Reports Page: 1  Previous   Next