Exporting Actors

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
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Exporting Actors

Post by Gregi »

I know that I can export actors field in HTML format with $$ITEM_ACTORS 

But is it possible to export only the first 5 rows?


For example:

Vin Diesel ... Xander Cage
Asia Argento ... Yelena
Marton Csokas ... Yorgi
Samuel L. Jackson ... Agent Augustus Gibbons
Michael Roof ... Agent Toby Lee Shavers
Richy Müller ... Milan Sova
Werner Dähn ... Kirill
Petr Jákl (II) ... Kolya (as Petr Jakl)
Jan Pavel Filipensky ... Viktor (as Jan Filipensky)
Tom Everett ... Senator Dick Hotchkiss


...from this list I would like to get just:

Vin Diesel ... Xander Cage
Asia Argento ... Yelena
Marton Csokas ... Yorgi
Samuel L. Jackson ... Agent Augustus Gibbons
Michael Roof ... Agent Toby Lee Shavers
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

it is not possible to limit the export
but maybe you can get that by using javascript or a height-limited div with "overflow: hidden" style
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Post by Gregi »

Maybe you know the code for that?

I'm not very good in programming, I only know how to modify a code thet has been allready written or add a simple line but that's it!
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

try:

Code: Select all

<div style="height: 5em; overflow: hidden;">$$ITEM_ACTORS </div>
for the height, I do not remember if "5em" is the height of 5 lines or if it is a smalled unit. So if it does not work maybe you'll have to increase this.
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Post by Gregi »

It works great thank you!!!! :grinking:

Here is the complete code now - it's not polished :D (I used few scripts and combined them to this one):


Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html dir="ltr">
<head>
<title>MOVIE CATALOG</title>
<style TYPE="text/css">
  text,body,p,div,span,th,td,ul,li { FONT-SIZE: 10pt; FONT-FAMILY: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif; color: black; background: white; }
  HR { color: black; }
  A:link { COLOR: #003399; background: white; }
  A:visited { COLOR: #003399; background: white; }
  A:hover { COLOR: #CC0000; background: white; }
  A:active { COLOR: #CC0000; background: white; }
  td.blk { color: white; background: black; border: solid; border-color: black; }
  table.blk { color: white; background: black; border: solid; border-color: black; border-width: thin; }
  table.lgt { color: black; background: white; border: solid; border-width: thin; border-color: #F5F5F5; }
  td.lgt { color: black; background: white; border: solid; border-width: thin; border-color: #F5F5F5; }
  p.title { font-size: 18pt; font-weight: bold; }
</style></head><body>
<Center><B><U><font size=+3>MOVIE CATALOG</B></U></FONT></CENTER><br><BR>
</script>


</tr>$$ITEM_BEGIN
<table id="aTable" class="blk" border="1" cellspacing="0" cellpadding="5"><tr>
<td width=12% class="blk" nowrap><strong>$$ITEM_NUMBER <strong></td>
<td width=33% class="blk" nowrap><strong>Original Title<strong></td>
<td width=23% class="blk" nowrap><strong>Video Format<strong></td>
<td width=12% class="blk" nowrap><strong>Resolution<strong></td>
<td width=20% class="blk" nowrap><strong>Sound Format<strong></td>

<tr style=display:"" movie=$$ITEM_VIDEOFORMAT>
	<td class="lgt"><Center><strong>Number of CD's: </strong>$$ITEM_DISKS</CENTER></td>
	<td class="lgt" dir="ltr"><strong><font size=+1>$$ITEM_ORIGINALTITLE </strong></td>
	<td class="lgt" dir="ltr"><strong>$$ITEM_VIDEOFORMAT <strong></td>
	<td class="lgt" dir="ltr"><strong>$$ITEM_RESOLUTION <strong></td>
	<td class="lgt" dir="ltr"><strong>$$ITEM_AUDIOFORMAT <strong></td>
</tr>

<tr style=display:""  movie=$$ITEM_VIDEOFORMAT>
	<td style=display:"" what=image rowspan="2" class="lgt">$$ITEM_PICTURE</td>
	<td style=display:"" what=text colspan="4" class="lgt" dir="ltr"><strong>Description:</strong><br> $$ITEM_DESCRIPTION </td>
</tr>

<tr style=display:""  movie=$$ITEM_VIDEOFORMAT>
	<td style=display:"" what=text colspan="2" class="lgt" dir="ltr"><strong>Cast:</strong><br> <div style="height: 11em; overflow: hidden;">$$ITEM_ACTORS <br></div></td>
  <td style=display:"" what=text colspan="2" class="lgt" dir="ltr"><strong>Director:</strong> $$ITEM_DIRECTOR <br><BR><strong>Year:</strong> $$ITEM_YEAR <br><BR><strong>Lenght:</strong> $$ITEM_LENGTH min<br><BR><strong>Category:</strong> $$ITEM_CATEGORY <br><BR><strong>Country:</strong> $$ITEM_COUNTRY </td>
</tr>

<tr style=display:""  movie=$$ITEM_VIDEOFORMAT>
	<td colspan="5" class="blk"></td>
</tr>
$$ITEM_END
</table>
<p><strong>Total - $$TOTALMOVIES Movies</strong></p></body></html>
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You can even get a scrollbar instead of hide the extra actors : just replace hidden by auto (works in Mozilla, IE6 and Opera 7)
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Post by Gregi »

Another great stuff! :grinking:

Thanx
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Post by Gregi »

One more question:

how can I justify (align at both sides) text (paragraph)?
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

give style="text-align: justify" to the paragraph (<p> or <div> tag, maybe directly to the <td> tag)
Gregi
Posts: 21
Joined: 2003-08-31 15:13:12

Post by Gregi »

Thx for quick reply! :grinking:
Post Reply