Customizing iPhone HTML Export Template

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.
Post Reply
User avatar
ltcarter47
Addicted to Bruji
Addicted to Bruji
Posts: 26
Joined: Fri Feb 22, 2008 11:13 pm
Location: Roseville, CA

Customizing iPhone HTML Export Template

Post by ltcarter47 »

Hi,

Here's what I'm doing. I have 2 HTML exports that I use regularly. Basic and iPhone. On both of these I want to replace the rating stars with the contents of Custom1.

I was able to successfully modify the "Basic" template by replacing

Code: Select all

<img src="[key:starRatingURL]" width="77" height="14">
with

Code: Select all

[key:custom1]
This worked well.

Doing this with the iPhone template is proving to be far more difficult, mostly because I don't know a thing about javascript :?, and the part I would need to change seems to be within another file that I'm not sure how to get to....

Can anyone help point me in the right direction?

Thanks!
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Customizing iPhone HTML Export Template

Post by Nora »

The iPhone template comes in two parts, with two different files so you have to go into DVDpedia.app to look for the second part of the template first. You'll find it by ctrl-clicking (right-clicking) the DVDpedia icon and then navigating to Show package contents/Contents/Resources/Templates/iPhoneDetails.html. Create a copy of the file (Command-D), rename the copy to 'MyiPhoneDetails.html' and move it into your DVDpedia data folder where the rest of your customized MyiPhone.html template resides already. (By default this would be in your Home folder under ~/Library/Application Support/DVDpedia/Templates/).

Then open the MyiPhoneDetails.html file in your text editor and change the tag

Code: Select all

<img src="../[key:starRatingURL]"/>
for

Code: Select all

[key:custom1]
and save it.

After that, if you haven't done that already, change the following in the MyiPhone.html file:

Code: Select all

<meta name="details" content="iPhoneDetails.html" /> becomes <meta name="details" content="MyiPhoneDetails.html" />
and
<img src="[key:starRatingURL]" class="starRatingURL"/> becomes <div class="starRatingURL">[key:custom1]</div>
You'll also have to add color to the starRatingURL class because it's white at the moment which means your custom 1 data won't be visible. To do that, open the iPhone.css file found in Images/MyiPhoneImages/ folder (along with the rest of your MyiPhone template files) and add whatever color you'd like to the class. For example:

Code: Select all

.starRatingURL {
	float: right;
	font-size:10px;
	color:#666;
}
Save everything and try the export again. The star ratings should be replaced with your custom 1 information now.
User avatar
ltcarter47
Addicted to Bruji
Addicted to Bruji
Posts: 26
Joined: Fri Feb 22, 2008 11:13 pm
Location: Roseville, CA

Re: Customizing iPhone HTML Export Template

Post by ltcarter47 »

Awesome, thanks Nora! Changes went smoothly and the output looks perfect! :D
Post Reply