Editing Print and HTML Templates

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
dthedude
Junior Member
Junior Member
Posts: 2
Joined: Thu May 31, 2007 6:41 pm

Editing Print and HTML Templates

Post by dthedude »

Hello, I have only just recently started using DVDPedia instead of my old program DVD Sphere and what a great program it is, much faster and more flexible.
I am trying to print using the thick list but would like to replace, lets say the release date with my collection id and have tried editing the PrintingListThick.html from within dvdpedia but this does not seem to work, I either get nothing or just a foreign character.

please can anyone help or point me to the best direction for creating/editing printing/html templates.

Kindest Regards

Darren
DreamStatic
Addicted to Bruji
Addicted to Bruji
Posts: 71
Joined: Tue May 30, 2006 4:57 pm

Post by DreamStatic »

Hello dthedude,

Welcome to the DVDpedia family. I am not qualified to answer your question, as I have no affiliation with Bruji. But I will shoot you an answer nonetheless. :)

By referencing these links

How to change an HTML export template (baby steps)
Creating HTML export templates and info view templates (advanced class)
The possible HTML tags for a template

in the Support section of Bruji.com you can change release date with collection id and it should work . . . if you have a collection id on your items you are printing. :)

Nora or Conor will probably answer your question shortly with more accurate info.

Hope it helps. Here is what I see in the "stock" template you mention. Just edit the Bold Red area below and it should be good to go.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>[Global:CollectionName]</title>

<meta name="image-export" content="no" />
<meta name="PageSplit" content="99999" />
<meta name="PageBreakAfterEvery" content="6" />
<meta name="PrintLandscape" content="no" />


<!-- These tempaltes for DVDpedia where adapted from the iSale 4 print templates as both programs use the same template system. Just plain HTML with tags to fill out and a loop. Credit goes to the iSale people for the design and Alex Szekely for the adaptation -->

<script type="text/javascript">
	function setAlternatingRowColors() {
		
		var tables = document.getElementsByName("mainTable");
		var i = 0;
		while(tables[i] != null) {
			incrementalCount = tables[i].ref % 2;
			if (incrementalCount == 1) {
				tables[i].className = "rowDark";
			}
			
			i++;
		}
	}
</script>

	<style type="text/css" media="screen,print">
	body {
		margin: 0;
		padding: 0;
		background-color: white;
		font-family: "Arial";
		font-size: 12px;
		color: black;
	}
	
	.caption {
		font-weight: bold;
	}
	
	#title {
		background-color: #CACFF1;
		font-weight: bold;
		padding: 4px;
		line-height: 14px;
	}
	
	#groupTitle {
		font-weight: bold;
		margin-left: 20px;
	}
	
	#status {
		background-color: #CACFF1;
		font-weight: bold;
		padding: 4px;
		padding-right: 20px;
		line-height: 14px;
		text-align: right;
		color:red;
		white-space:nowrap;
		overflow: hidden;
		text-overflow:ellipsis;
	}

	.rowLight {
		background-color: #00000;
	}
	
	/* Set above by the alternating color javascript on load based on incremental number */
	.rowDark {
		background-color: #EDF3FE;
	}
	
	#picture {
		height: 120px;
	}
	</style>
</head>
<body onload="setAlternatingRowColors();">
	<br />
	<div id="groupTitle"><div style="float:right; margin-right: 20px;">Updated on [Global:DateUpdated]</div>[Global:CollectionName] : [Global:TotalEntries] DVDs, sorted by [Global:SortedBy]</div><br />
	<!--BeginRepeat-->
	<div style="page-break-inside:avoid">
	<table name="mainTable" width="100%" border="0" cellspacing="0" cellpadding="0" class="rowLight" ref="[Key:IncrementalNumber]">

		<tr>
			<td id="title">[Key:Title]</td>
			<td id="status">[Key:Status]</td>
		</tr>
		<tr>
			<td>
				<table cellspacing="0" cellpadding="0" border="0">
					<tr>

						<td style="width:110px;">
							<!-- image -->
							<img id="picture" src="[Key:LocalCoverImageURL]" border="0" />
						</td>
						<td valign="top">
							<table cellspacing="0" cellpadding="3" border="0" style="padding-top:10px;">
							
								<tr>
									<td style="width:300px;"><span class="caption">[Translate:Director]:</span> [Key:Director]</td>

									<td style="width:300px;"><span class="caption">[Translate:ListPrice]:</span> [Key:ListPrice]</td>
								</tr>
								
								<tr>
									<td style="width:300px;"><span class="caption">[Translate:Genre]:</span> [Key:Genre]</td>
									<td style="width:300px;"><span class="caption">[Translate:Rated]:</span> [Key:Rated]</td>
								</tr>

								
								<tr>
									<td style="width:300px;"><span class="caption">
[Translate:Collection]:</span> [Key:Collection]

Code: Select all

</td>
									<!--IFDuration <td style="width:300px;"><span class="caption">[Translate:Duration]:</span> [Key:Duration]</td> ENDDuration-->

								</tr>
								
								<tr>
									<td COLSPAN="2" style="width:150px;"><span class="caption">[Translate:Starring]:</span> [Key:Starring]</td>

								</tr>
								
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	</div>

	<!--EndRepeat-->
</body>
</html>
Enjoy DVDpedia,

~DreamStatic
dthedude
Junior Member
Junior Member
Posts: 2
Joined: Thu May 31, 2007 6:41 pm

Thanks??

Post by dthedude »

thank you very much for a prompt and detailed reply. I will try this later it maybe that i typed collectionid instead of just collection, i hope its that easy.

once again many thank for your much appreciated help.

kindest regards

Darren
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

DreamStatic is correct that all you have to do is change the key. Collection ID is a tricky one because the key is actually "Collection" instead of "CollectionID" as you would assume (we are fixing this in our next mayor releases to avoid confusion). If you still have trouble editing the template send us a copy of the template you have so far and we can take a look see where it fails. Thank you DreamStatic for answering a fellow users while I was away.
Post Reply