Suggestions for a solution?

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
Post Reply
sracer
Posts: 23
Joined: 2002-12-11 17:47:32

Suggestions for a solution?

Post by sracer »

About a year ago I moved to Ant Movie Catalog (from DVDProfiler) and haven't looked back. AMC is a fantastic tool!

When I was using DVDProfiler, I had written a utility to read in a CSV file and generate an basic html listing for posting on my website. I updated that tool for use with AMC (AMC generates a different CSV-style file). And it worked pretty good.

After upgrading to the latest version of AMC, I thought about using AMC's built-in html generation features to create the page.

The table I generate with my tool has alternating row colors. I would like to duplicate this behavior in my AMC template. Is there a way to do it within the template definition? (I'd rather avoid having the resulting html file use JavaScript.)

Any advice, suggestions, recommendations, etc. are greatly appreciated, thanks!

Here is the html generated by my tool: -> http://www.geocities.com/tcperconti/mov ... ction.html

Here is the html generated by the AMC html template I created: -> http://www.geocities.com/tcperconti/amc.html

Code: Select all

<!-- Ant Movie Catalogue Template - Created By sracer - tcperconti@hotmail.com -->
<html>
<head><title>$$OWNER_NAME's Movie Collection</title></head>
<!--LOAD THREE STYLESHEETS, 1 COMMON, 1 FOR NETSCAPE, 1 FOR IE-->
<link rel="stylesheet" type="text/css" href="common.css">
<link rel="stylesheet" type="text/css" href="netscape.css" disabled>
<script language="JavaScript1.2" type="text/javascript"><!--
	if (document.all) document.createStyleSheet("ie.css");
//--></script>
<!-- ******************************************************************** -->
<body bgcolor="#0098C8" text="#000000" link="#0000FF" vlink="#800080">
<!-- Title Banner -->
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#0098C8"><tr><td>
<table width="100%" cellspacing="1" cellpadding="1">
<tr bgcolor="#006098"><td align="center" width="60%"><b><font face="verdana" size="4" color="FFFFFF">Tom Perconti's Movie Collection</font></td></tr></table></td></tr></table>
<br>

<font face="verdana" size="2">The movie collection is stored in BuyPin Software's <b>Ant Movie Catalog</b>.
 <p><b>LINKS:</b><font face="verdana" size="1"> [  <a href="http://www.buypin.com/moviecatalog.php">Ant Movie Catalog</a>  |  DVD Information: <a href="http://www.dvdtalk.com/">DVDTalk</a>  |  VideoCD Information: <a href="http://www.vcdhelp.com/">VCDHelp</a>  ]<br> </font>

<br>
<table border=0 width="100%" cellpadding="0" cellspacing="0" bgcolor="#0098C8"><tr><td>
<table width="100%" cellspacing="1" cellpadding="1">
  <tr bgcolor="#006098"><td width="50%" align="LEFT"> <b><font face="verdana" color="FFFFFF" size="2">Title</font></b></td><td width="10%" align="LEFT"> <b><font face="verdana" size="2" color="FFFFFF">Media</font></b></td><td width="5%" align="LEFT"> <b><font face="verdana" size="2" color="FFFFFF">Genre</font></b></td></tr>
$$ITEM_BEGIN
<tr bgcolor="#BFE5F1"><td align="LEFT"> <font color="000000">$$ITEM_ORIGINALTITLE</font></td><td  align="LEFT"> <font color="000000">$$ITEM_VIDEOFORMAT</font></td><td align="LEFT"> <font color="000000">$$ITEM_CATEGORY</font></td></tr>
$$ITEM_END
</table></td></tr></table>
<br>
<center>
<table width="40%" cellpadding="0" cellspacing="0" bgcolor="#0098C8"><tr><td>
<table width="100%" cellspacing="1" cellpadding="1">
<tr bgcolor="#7FCBE3"><td align="right" width="85%"><b><font face="verdana" color="000000" size="2">Total number of Movies:</font> </td><td> $$TOTALMOVIES</td></tr>
</table></td></tr></table>
<br>
<p><small><i>This list was generated by AntMovieCatalog on $$DATE</i></small>
</center>


</body></html>
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Suggestions for a solution?

Post by antp »

sracer wrote: The table I generate with my tool has alternating row colors. I would like to duplicate this behavior in my AMC template. Is there a way to do it within the template definition? (I'd rather avoid having the resulting html file use JavaScript.)
Unfortunately it is not yet possible :/
Guest

Post by Guest »

Thank you for the quick reply. I was hoping that there would be some way to "trick" the code by using one of the variable fields like $$OWNER_ICQ (to contain html that could self-toggle between the two values)
Willspo
Posts: 61
Joined: 2002-08-14 15:50:23

Do it with javascript

Post by Willspo »

Hey u can do it with javascript instead (Internet Explorer)

Code: Select all

function formatTable(oTable) {
  var rows=oTable.rows;
  for(var i=0;i<rows.length;i++) {
    if(i%2==0) {
      rows[i].style.backgroundColor = "black";
      rows[i].style.color = "white";
    } else {
      rows[i].style.backgroundColor = "white";
      rows[i].style.color = "black";
    }
  }
}
Tell me if you need more help on implementing it.

/w
mzemina
Posts: 8
Joined: 2003-10-14 20:18:30

Post by mzemina »

sracer - Do you still have the utility to allow importing of the DVDProfiler catalog into ANT? I am ready to change over but don't want to add my 300 DVDs by hand into this program.

Mike
Post Reply