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: Plugins Page: 1  Previous   Next
Hello, is there a HTML window for Amazon?
Author Message
DVD Profiler Unlimited Registrantclam995
Registered: January 4, 2009
Posts: 4
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
First off; great program, great community.  Quick thanks to Gadgeteer, whose Widescreen plus layout I am using, and RHO & Goodguy whose plug-ins are some of the most useful pieces of coding I have ever had the pleasure of using. Also anyone to else who has contributed, thanks.

Down to business.  Is there a HTML window that directs itself to the DVD on Amazon?  Like the IMDb and Wikipedia windows in Gadgeteers layout?  I am entering a rather large DVD collection and find myself referencing Amazon for DVD features quite a bit. Not having to switch out of Profiler would save quite a bit of time.

If not, would it be possible to recode the Wikipedia page to do it?  I'm not a code monkey but I have coded a little before.  I did a google search for pulling info off of Amazon and all I got was Amazon deals!  Could some kind soul direct me to information I would need to do this?

Thanks
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 599
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
I got this from someone's layout, can't remember whose. Just paste this into a new HTML section you create.

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

function amazon() {
  var UPC = DP_UPC;
  var matchErg = DP_Notes.match(/asin:\s*(.+)$/i);
  if (matchErg) {
    var amazonlink = "http://www.amazon.com/dp/" +  matchErg[1];
  } else {
    var amazonlink = "http://www.amazon.com/s?url=search-alias%3Ddvd&field-keywords=" + UPC;
  }
  window.location.href= amazonlink;
}

//-->
</SCRIPT>
</HEAD>
<BODY onload="amazon();">
</BODY>
</HTML>
DVD Profiler Unlimited Registrantclam995
Registered: January 4, 2009
Posts: 4
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Thank you so much. 
DVD Profiler Unlimited RegistrantRAPepper
Registered: March 13, 2007
Posts: 21
Posted:
PM this userDirect link to this postReply with quote
Gave this a try (altering amazon.com to amazon.co.uk) and it is not fully working as it adds extra characters to the end of the UPC ".4" for the region 2 for example

e.g. 5035822908031.4

If I remove that and search again in the window the dvd is found.

Any idea how I can stop the extra info which is (I think) to do with the region .4 ?

RAP
 Last edited: by RAPepper
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,461
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting RAPepper:
Quote:
Gave this a try (altering amazon.com to amazon.co.uk) and it is not fully working as it adds extra characters to the end of the UPC ".4" for the region 2 for example

e.g. 5035822908031.4

If I remove that and search again in the window the dvd is found.

Any idea how I can stop the extra info which is (I think) to do with the region .4 ?

RAP


Add this, just after "var UPC ...."

  var ix = UPC.indexOf(".");
  if (ix > 0) UPC = UPC.substring(0, ix);

I didn't test it, but it should be close.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
DVD Profiler Unlimited RegistrantAntares
Registered: May 26, 2007
Reputation: High Rating
United States Posts: 599
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:
Quoting RAPepper:
Quote:
Gave this a try (altering amazon.com to amazon.co.uk) and it is not fully working as it adds extra characters to the end of the UPC ".4" for the region 2 for example

e.g. 5035822908031.4

If I remove that and search again in the window the dvd is found.

Any idea how I can stop the extra info which is (I think) to do with the region .4 ?

RAP



Add this, just after "var UPC ...."

  var ix = UPC.indexOf(".");
  if (ix > 0) UPC = UPC.substring(0, ix);

I didn't test it, but it should be close.


It works.
 Last edited: by Antares
DVD Profiler Unlimited RegistrantRAPepper
Registered: March 13, 2007
Posts: 21
Posted:
PM this userDirect link to this postReply with quote
Works for me to - thanks

RAP
DVD Profiler Unlimited RegistrantMuckl
That's my common name.
Registered: April 9, 2009
Reputation: Great Rating
Germany Posts: 858
Posted:
PM this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Thanks, very nice.

For anyone who's interested, here's my modified version that fits into the layout columns.
If you change the TLD back to .com, you have to delete/comment the two lines after "var UPC = DP_UPC;".


Quote:

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

function $(id) {
  return document.getElementById(id);
}

function getHttpRequest(url) {
  var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttp.open("GET", url, true);
  xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState != 4) {
      $('result').innerHTML = '<p style="padding: 10px;">Loading ...</p>';
    }
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
      $('temp').innerHTML = xmlhttp.responseText;
      $('result').innerHTML = $('result_0').innerHTML;
      $('temp').innerHTML = "";
      $('result').id = "result_0";
    }
  }
  xmlhttp.send(null);
}

function amazon() {
  var UPC = DP_UPC;
  var ix = UPC.indexOf(".");
  if (ix > 0) UPC = UPC.substring(0, ix);
  getHttpRequest("http://www.amazon.de/s?url=search-alias%3Ddvd&field-keywords=" + UPC);
}

//-->
</SCRIPT>
<STYLE TYPE='text/css'>
  @import url("http://z-ecx.images-amazon.com/images/G/01/nav2/gamma/search-css/search-css-search-18639._V245173371_.css");
  body { margin: 0px; font-size: 12px; }
  div#temp, div.number, div.fastTrack, div.sss, div.prime { display: none !important; }
</STYLE>
<BASE TARGET="_blank">
</HEAD>
<BODY onload="amazon();">
<DIV id="temp"></DIV>
<DIV id="searchTemplate">
  <DIV id="atfResults">
    <DIV class="listView">
      <DIV id="result" class="result firstResultRow lastResultRow"></DIV>
    </DIV>
  </DIV>
</DIV>
</BODY>
</HTML>
 
1.0.1, iPhone 3GS, iOS 4.1.0

Trivia v0.3.1
My HSDB v5 additions, HTML windows and other stuff
 Last edited: by Muckl
DVD Profiler Unlimited RegistrantEdwinK
Registered: May 27, 2007
Netherlands Posts: 691
Posted:
PM this userEmail this userView this user's DVD collectionDirect link to this postReply with quote
Only get an empty window.
Unfortunately, I can't use DVDprofiler at the moment due to lack of a Windows computer.
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,461
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting Muckl:
Quote:
Thanks, very nice.

For anyone who's interested, here's my modified version that fits into the layout columns.
If you change the TLD back to .com, you have to delete/comment the two lines after "var UPC = DP_UPC;".


Are you sure? It is looking for a "." in the UPC and does nothing if not there. So, no change should be necessary.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
    Invelos Forums->DVD Profiler: Plugins Page: 1  Previous   Next