Author Topic: html export question  (Read 10951 times)

0 Members and 1 Guest are viewing this topic.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
html export question
« on: July 14, 2009, 11:20:51 am »
hey guys i'm just wondering how to fix an issue. everything works fine when i export but for each movie the title is stated twice ie. Watchmen - Watchmen (2009). how do i fix this so the title doesn't show twice? thx

also how would i setup a hyperlink in the details page to a url (like a trailer on youtube)

sorry i'm pretty clueless with html.

here's my current setup for refferance:

%OPTIONS%
filter="HTML Files|*.html;*.htm"
encoding="UTF8"
sortby="0"
sortdir="sdDecending"
itemsperpage="50"
recordtemplate="pages\movie.ptm"
recordfilename="movie%d.html"
pagestpl="pages\pg.ptm"
prevtpl="pages\prev_pg.ptm"
nexttpl="pages\next_pg.ptm"
pagelinktpl="pages\link_pg.ptm"
pagecurtpl="pages\cur_pg.ptm"
imagepath="images\"
fullstar="images\star_on.gif"
halfstar="images\star_on_half.gif"
nonestar="images\star_off.gif"
copyfile="images\star_on.gif<->images\star_on.gif"
copyfile="images\star_on_half.gif<->images\star_on_half.gif"
copyfile="images\star_off.gif<->images\star_off.gif"
%OPTIONS%
%HEAD%<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Video Database</title>
<style type="text/css">
<!--
.style1 {
   font-size: 24px;
   font-weight: bold;
   color: #FFFFFF;
}
.style2 {
   font-size: 12px
}
.style3 {font-size: 14px}
.style4 {color: #FFFFFF}
.style5 {
   color: #000000;
}
.border {
   border-bottom-width: 1px;
   border-top-style: none;
   border-right-style: none;
   border-bottom-style: solid;
   border-left-style: none;
   border-bottom-color: #999999;
}
.center {
   vertical-align: middle;
}
body {
   background-color: #CCCCCC;
}
-->
</style>
</head>

<body>
<table width="760" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#003399"><div align="center" class="style1">My Video Database</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="5">%HEAD%

          <tr>
            <td width="50" class="border"><div align="right"><span class="style3">{%value=203}</span>.&nbsp; </div></td>
            <td width="50" class="border"><img src="{%value=poster width="48" height="62"}" /></td>
            <td width="710" class="border"> &nbsp;<a href="movie{%value=mid}.html" class="style5">{%value=origtitle} - {%value=title} ({%value=year})</a><br />
               &nbsp;<span class="style2">{%value=genre}</span><br /></td>
          </tr>         
        %FOOT%</table></td>
      </tr>
      {%value=211}
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#003399"><div align="center" class="style2"><a href="http://www.videodb.info" class="style4">Generated by Personal Video Database</a></div></td>
  </tr>
</table>
</body>
</html>%FOOT%
« Last Edit: July 14, 2009, 12:18:55 pm by dan16326 »

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: html export question
« Reply #1 on: July 14, 2009, 01:20:51 pm »
Quote
hey guys i'm just wondering how to fix an issue. everything works fine when i export but for each movie the title is stated twice ie. Watchmen - Watchmen (2009). how do i fix this so the title doesn't show twice?

replace this text:
Code: [Select]
{%value=origtitle} - {%value=title} ({%value=year})with this one:
Code: [Select]
{%value=title} ({%value=year})
Quote
also how would i setup a hyperlink in the details page to a url (like a trailer on youtube)

How are these links stored in the database?
Gentlemen, you can’t fight in here! This is the War Room!

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #2 on: July 15, 2009, 11:12:59 am »
thank you new code worked like a charm.


i currently don't have links in my database but i could put them in my comments field as i don't use them.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #3 on: July 15, 2009, 11:31:03 am »
sorry i lied the movie is still being double listed but now it's only like that in the details page

Offline Luke_S

  • Member
  • *
  • Posts: 4
    • View Profile
Re: html export question
« Reply #4 on: July 15, 2009, 10:09:05 pm »
Hey Dan,

You need to change the following line inside the movie.ptm file as well:

Code: [Select]
<title>{%value=origtitle} - {%value=title} ({%value=year})</title>
to

Code: [Select]
<title>{%value=origtitle} ({%value=year})</title>
This is just one of the minor annoyances that I fixed in my own version of the html-export page. Seeing as some users might already find it agreeable I will put a link for a zip-file with the changes I made (and a short description) under this post:

http://www.videodb.info/forum_en/index.php?topic=1414.0


/Luke
« Last Edit: July 16, 2009, 10:01:06 am by Luke_S »

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #5 on: July 17, 2009, 11:43:23 am »
in my database i have my trailers hyper-linked in my comments section i tried to move it to the url section for the sake of it showing up in my detailed pages when exporting html. but it shows up as the entire code instead of it being mask by the word "trailer" like in my comments. any ideas?

nostra is there a way i could get my comments section to appear at all? and if so is there a way to place it under the imdb ratings?

thx for the help guys i really appreciate it.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #6 on: July 17, 2009, 12:05:34 pm »
okay after playing with it for a while and looking up html code. i was able to get it to work using <a
href= yadda yadda. but i had to put it in the description which ultimately i don't want to do. i'd settle for it working in the links section but due to the programing of it, it won't work because once there is a space in the text it tries to create a separate link.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #7 on: July 17, 2009, 02:10:51 pm »
okay so a solution has been found thx to the help of luke

what i did was put an html code in my comment in PVD ie. <a href="url">Trailer</a>

then in the ptm file below the imdb rating line i put:

             
                  <td width="100" class="top"><div align="right"><strong>Trailer:</strong></div></td>
                  <td>{%value=comment}</td>
      

this gave me the result i was looking for. also just as a note the html code that gets entered in the comment field does not work in PVD but it works on the exported files.

thx again everyone.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: html export question
« Reply #8 on: July 17, 2009, 08:06:49 pm »
Quote
the html code that gets entered in the comment field does not work in PVD but it works on the exported files.

Can't you save the trailer URL in its own custom field, and then pass that value in the template? In other words, use

     <td><a href="url">{%value=trailer}</a></td>

instead of

     <td>{%value=comment}</td>.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #9 on: July 18, 2009, 11:51:11 am »
 :-\ i've only had PVD for about a week and i know next to nothing about html so i have no idea how to create a custom field in the database.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: html export question
« Reply #10 on: July 18, 2009, 08:14:11 pm »
Preferences - Movies - Custom items.

Offline dan16326

  • Member
  • *
  • Posts: 12
    • View Profile
Re: html export question
« Reply #11 on: July 19, 2009, 08:18:45 am »
hmm interesting thx for that. i would have done that to start had i known but as i have it set up right now it does what i want so i don't think i'm going to mess with it.

cheers though.

 

anything