Still working with Details template

Any trouble you encounter with the Pedias, here's the place to ask for help.
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Still working with Details template

Post by Rigido »

Ciao Conor,
I didn't notice before so I think it started with DVDpedia 5.1.5, on the modify window there are empty stars for the rating.
Do you think we could use that empty stars for a Detail template?

I still have issues with multi values (comma separated strings) on the director field and filter option.
"Original" templates like Collection or Mint use:

Code: Select all

<!--IFgenericField
<div class="field">
	<div class="title">[translate:genericField]: </div>
	<div class="text"> [key:genericField]</div>
</div>
ENDgenericField-->
For every field expect starring info, so I think DVDpedia will "automagically" apply the "filter by" to some fields and it will correctly split the field into different links.
I started to modify another template (probably it was an old "Collection" copy as I renamed to myCollection) and I have to force the filterby with:

Code: Select all

<!--IFdirector<div class="field"><div class="title">[translate:director]:</div><div class="text"><a href="pedia://filterBy=[key:director]&field=director">[key:director]</a></div></div>ENDdirector-->
but in this case there is no handle for the comma and DVDpedia would try to filterby (i.e.) "Gary Trousdale, Kirk Wise".
Any hint on this?
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Still working with Details template

Post by Conor »

We did update the stars in the modify window to make it more obvious that the rating can be changed by clicking under the image. However in the main window it gets a bit crowded when we use the outline, especially true for the table view and wanted to keep the details view matching the table view with the dots instead of empty outlines.

We now create the stars on the fly from a template image to make the program use less memory and be more efficient. You can grab this template image and make your own stars for your own custom view. You can place them in ~/Library/Application Support/InfoTemplates/images and reference them by rating [key:myrating]star.jpg. You have to make an image for each option of my rating.

You will find the template image inside the program package in the Contents/Frameworks/Pediabase.framework/resources as editStar...tiff and goldenStar..tiff. They are tiff files as they include both the regular resolution and retina resolution in a single file.

For the filter by links it's best to let DVDpedia do it. I believe you added an option in the template at the top to not add the filter links. Search for filterLinks and remove that line. Without that option [key:director] will add the appropriate link and take care of the comma even for the regular keys without the generic that creates all the possible keys.

If there was a reason you did not need the link in a specific entry you can get the original value without links by appending raw to the key, e.g. [key:directorRaw].
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

Thank you Conor, I will work on stars as I would prefer a "silver" star to use on my blue background...

I found the filterlinks meta and removed it, used some Raw but the credit section is completely messed up:

Code: Select all

<!--IFcredits
<div class="credits">
<ul>
[creditsBegin]
<li>
<table>
<tr>
<td rowspan=3 height=150 valign=top><img width=100 src="Images/cast/[credit:name].jpg"></td>
<td height=30 valign=bottom style="padding-left:5px;"><a href="http://www.imdb.com/find?s=nm&q=[credit:name]"><img src="Images/imdb.png" alt="IMDB" width="24" height="24" align="top" /></a> <a href="http://en.wikipedia.org/wiki/Special:Search?search=[credit:name]"><img src="Images/wikipedia.png" alt="Wikipedia" width="24" height="24" align="top" /></a></td>
</tr>
<tr height=40 valign=bottom>
<td style="padding-left:5px;"><a href="pedia://filterBy=[credit:name]&field=credits"><font style="font-size: 20px;color: white;">[credit:name]</a></td>
</tr>
<tr valign=top>
IF_Trole<td style="padding-left:5px;"><font style="font-size: 15px;color: white;"><i>[credit:role]</i></td>END_Trole
</tr>
</table>
<br />
</li>
[creditsEnd]
</ul>
</div>
ENDcredits-->
I think I should use some "Raw" here but it looks like "[credit:nameRaw]" doesn't work.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Still working with Details template

Post by Conor »

[credit:nameRaw] now available in the beta, I had overlooked it when I added support for getting raw value instead of the filterBy tag with the raw suffix.
User avatar
FineWine
Site Admin
Posts: 904
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Still working with Details template

Post by FineWine »

Rigido - Hope you submit your template for inclusion in the Extras list when you finish it. I for one would be interested in looking at the code as I am always tweaking my own templates.
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

Conor...you're the man :!: :!: :!: :wink:
I think I found a bug, don't know if it is "template" related, will try to explain.
As you can see on the screenshot, I'm modifying the "Collection" template and adding the Cast section as FineWine showed me.
The credit:name is a link that will filter by:

Code: Select all

<td style="padding-left:5px;"><a href="pedia://filterBy=[credit:nameRaw]&field=credits"><font style="font-size: 20px;color: white;">[credit:nameRaw]</a></td>
DVDpedia will correctly filter and it will show a button on the lower side to clear the active filter.
The bug is:
  1. Open DVDpedia
  2. Select a movie and click on an actor name to apply filter
  3. Click a link on the movie details (I can click the Awards or IMDB field) and wait for the "browser" tab to load
  4. On the "browser" tab click "Finished"
  5. Click the "Show all button"
  6. BOOM :D DVDpedia will close the lower panel but will not clear the filter.
It looks like this happens just if you used the "Browser" tab.

FineWine, I just started working on "stars" and I had a funny idea, I will see IF and HOW I'll realize it...then I'll pack the whole thing and I'll write you. ;)
Look at the attached image and think: Where would you put a YouTube button (I found a really nice one) to search for the movie trailer? :D

Image
User avatar
FineWine
Site Admin
Posts: 904
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Still working with Details template

Post by FineWine »

Rigido wrote:FineWine, I just started working on "stars" and I had a funny idea, I will see IF and HOW I'll realize it...then I'll pack the whole thing and I'll write you. ;)
Look at the attached image and think: Where would you put a YouTube button (I found a really nice one) to search for the movie trailer? :D
With the YouTube Button the only place I can think of would be to the immediate left of the Film Title in the Title Bar.

By the way do you still have coded if you loan a DVD out, the If Borrow Box?

This is why in my Template I shifted the Stars, If Borrowed and the YouTube button to a Footer bar. It then moves them clear of all other data whilst also finishing of framing the Template.
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

Will take a look at the Borrowed info...
Meanwhile this is what I did today:
Image

Maybe this is clearer: Borrowed info and 2,5 stars rated
Image
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

Enough for today,
applied some -webkit-gradient background and searching for a nice youtube icon to put on "the immediate left of the Film Title in the Title Bar" :D

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

Re: Still working with Details template

Post by Conor »

Thank you for the detailed bug report, it was a complex steps but easy to reproduce. Fixed in the latest beta. Also fixed the footer, so it looks good, as it loses the highlight as it tries to make extra space for the expanded web view.
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

Conor wrote:Also fixed the footer, so it looks good, as it loses the highlight as it tries to make extra space for the expanded web view.
So, it is normal that the footer changes its size?
Can you explain me why the same code:

Code: Select all

<a href="http://www.youtube.com/results?search_query=[key:originalTitle]+trailer"><img src="Images/YouTube.png" alt="[key:originalTitle]" /></a>
is literally passed if put it on the "header" DIV and it is correctly interpreted (keys replaced by their values) if you put it on the "mainInfo" DIV?

The template is almost finished, just have to solve this :)
Thank you.

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

Re: Still working with Details template

Post by Conor »

So, it is normal that the footer changes its size?
It's not normal but to complicated to fix, so the bug has become a feature as it's so rare and irrelevant.

I tested your code by copy pasting your line to right after the IMDb tag in the default collections template and not an issue. I would use the "Show details view HTML" command by holding down the option key and clicking on the main help menu. There likely a missing tag or other issue in the template
User avatar
Rigido
Addicted to Bruji
Addicted to Bruji
Posts: 139
Joined: Mon Dec 03, 2007 8:07 am
Location: Acilia, Rome, Italy

Re: Still working with Details template

Post by Rigido »

As always Conor pushed me to find a solution...and it worked once again! :)
The problem was with "<!--BeginRepeat-->" meta-tag (?), just moved BEFORE my anchor code ;)

So, with some more "cloning" from the original "Collection" template, I think my job is finally DONE!
FineWine, I hope to hear what you think about it:

Image
User avatar
FineWine
Site Admin
Posts: 904
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Still working with Details template

Post by FineWine »

Rigido wrote:So, with some more "cloning" from the original "Collection" template, I think my job is finally DONE!
FineWine, I hope to hear what you think about it:

Image
Apart from the colour, which is individualistic anyway, well done. I like the tiny box above the credit box listing similar movies. The YouTube button is "just right" where you have it. The fonts are great too.

Mi piacerebbe molto vedere il codice.

Hai il mio indirizzo di posta elettronica in modo da comprimere e inviare a me per favore.

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

Re: Still working with Details template

Post by Conor »

<!--BeginRepeat-->
I should have mentioned that the movie tags needed to be enclosed by the repeat section. I actually thought about it, but since you mentioned the header and mainInfo I assumed that could not be the case as the begin tag is above the mainInfo class in the default template. For a details template you can move the <!--BeginRepeat--> all the way to the top, it's just it shares the same engine as the export and hence needs the tag (was coded many years ago before I was slightly smarter in order to make it optional). Congratulations on the finished template.

@Finewine Il mio italiano è pessimo, parlare spagnolo pensiero che è italiano perfetto.

The next template built needs to use fonts to be awesome, i.e. Font Awesome. Another great free font resource worth mentioning.
Post Reply