Author Topic: Improved Web Page template  (Read 10484 times)

0 Members and 1 Guest are viewing this topic.

Offline Luke_S

  • Member
  • *
  • Posts: 4
    • View Profile
Improved Web Page template
« on: July 15, 2009, 10:50:31 pm »
Seeing as my changes to the html-export template might already be of use to others I decided to post a link here even if I don't feel I'm completely done with it.

http://medlem.spray.se/luke79/pvd/templates.rar

I'll try and remeber the changes I did in each file and inside that rar-file are also the originals so you can check for yourselves. I might go a bit too much into detail, but whereas I had to figure these things out by myself, maybe my explanation of the changes will give others courage to try themselves first before asking for the changes to be made by others (on that note... I still need help with that TV.com script  ;D )

Web Pages(Index&Movies).ptm

1) I changed the width of the page to match my changes made in the movie.ptm file from 760 to 800 pixels by changing

Code: [Select]
<table width="760" border="0" align="center" cellspacing="0" cellpadding="0">
to

Code: [Select]
<table width="800" border="0" align="center" cellspacing="0" cellpadding="0">
2) I removed the annoying double title by changing

Code: [Select]
<td width="710" class="border"> &nbsp;<a href="movie{%value=mid}.html" class="style5">{%value=origtitle} - {%value=title} ({%value=year})</a><br />
to

Code: [Select]
<td width="710" class="border"> &nbsp;<a href="movie{%value=mid}.html" class="style5">{%value=origtitle} ({%value=year})</a><br />
Movie.ptm

1) Again I removed the double title from the webpage title and the webpage body text, and widened the page from 760 to 800 pixels (so that the names and roles of the actors weren't squished together as much as before) the same way I did the changes above

2) I added a "style" in the head part of the code called style4 for later use in another template. This basically just says that the text introduced later in the code will be of 12 pixel's height (width?) and that the first font to be used is Arial... Times New Roman if Arial isn't installed etc.

Code: [Select]
.style4 {
font-size: 12px;
font-family: Arial, "Times New Roman", Times, serif;
}

3) I removed some data fields by simply deleting those blocks of information (anything inside a <tr></tr> tag that I wanted removed) and changed positions a bit of other fields. What's more interesting is that I added fields that to me were very interesting such as Subtitles, Duration, File Size and Quality. I found these values by guessing and by looking through the part of the .pvd file that's created by PVD to search for strings such as "subs", "length", "size", "resolution", "videobitrate" etc. For more strings look at this link http://www.videodb.info/forum_en/index.php?topic=766.0, information I sadly didn't have before I started fiddling around

4) I think the most valuable changes I made was fixing an error where movie screen dumps showed up as text instead of pictures through this change in the screens.ptm file

Code: [Select]
{%param=imgdata}
to

Code: [Select]
<img src="{%param=imgdata}" />&nbsp;&nbsp;&nbsp;
5) and by moving the information about Seasons and Episodes from TV-series from the top to the bottom of the page, making it easier to read and also adding hyperlinks (which I intend to have point towards a new similar page as movie.ptm with information about each episode as soon as Nostra has time to add that function) by the following change

Code: [Select]
<tr>
   <td colspan="2" bgcolor="#FFFFFF" class="top">{%value=description}</td>
</tr>
{%value=episodes template="pages\episode.ptm" grouptemplate="pages\season.ptm"}    


to

Code: [Select]
<tr>
   <td colspan="2" bgcolor="#FFFFFF" class="top">{%value=description}</td>
</tr>
<tr>
   <td colspan="2" bgcolor="#FFFFFF" class="top">{%value=episodes template="pages\episode.ptm" grouptemplate="pages\season.ptm"}</td>
</tr>

and the following changes in these files

Episode.ptm

Code: [Select]
{%param=epnum}. {%param=origtitle}
to

Code: [Select]
{%param=epnum}. <a href="{%param=url}">{%param=origtitle}</a>&nbsp;&nbsp;&nbsp;
Season.ptm

Code: [Select]
Season {%groupparam=season}
{%values}

to

Code: [Select]
%HEAD%<table>%HEAD%
<tr><td><span class="style4"><b>Season {%groupparam=season}</b><br>{%values}</span></td></tr>
%FOOT%</table>%FOOT%

I hope that gives you guys some ideas of what you can change yourselves. The reason I was reluctant in posting this before is that the information inside the "Quality" field will look fairly strange when there's no data. Something like ", , Kbps, ch,". If any of you have any ideas how to remove the spaces and commas and text when there's no data to be printed, please let me know.

/Luke
« Last Edit: July 15, 2009, 10:53:36 pm by Luke_S »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Improved Web Page template
« Reply #1 on: July 15, 2009, 11:30:14 pm »
Good work, Luke!

Thanks especially for the clear documentation of your changes. I'm sure this will be helpful to others who would like to customize the template.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: Improved Web Page template
« Reply #2 on: June 27, 2020, 03:33:49 pm »
2) I removed the annoying double title by changing

Code: [Select]
<td width="710" class="border"> &nbsp;<a href="movie{%value=mid}.html" class="style5">{%value=origtitle} - {%value=title} ({%value=year})</a><br />
to

Code: [Select]
<td width="710" class="border"> &nbsp;<a href="movie{%value=mid}.html" class="style5">{%value=origtitle} ({%value=year})</a><br />
Movie.ptm

1) Again I removed the double title from the webpage title and the webpage body text, and widened the page from 760 to 800 pixels (so that the names and roles of the actors weren't squished together as much as before) the same way I did the changes above


/Luke

After 11 years, can anyone help me with this template, please?

I have a custom field also called "Title", which I put in another section of my own customized skin. How can I insert this custom field "Title" in - {%value=title}? Is it something like - {%value=Title custom="true"}, or something else?
Thank you in advance