Actors, Directors URL Links

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.

Actors, Directors URL Links

Postby FineWine » Fri Apr 15, 2011 11:32 pm

In the Add Edit where Actors, Directors are entered/listed is there away to url link their names to their bio site such as Wikipedia or IMDB (I prefer Wikipedia) and once that link has been made the database then searches for their names in other DVD entries and automatically associates that link to that name. Then in the Info view (Details) panel their name is link clickable.

At the moment I am sort of using the Links Panel but each entry must be re-entered for each DVD entry for that persons name. A bit tedious.
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby Jonas » Sat Apr 16, 2011 1:20 am

By editing your InfoView you can make the names clickable without having to enter any URLs manually.
I have updated my so I get to the persons page on IMDB by clicking their name in the InfoView.

Just open the HTML file for the InfoView you are using and find the following lines:
Code: Select all
<!--IFcredits
<div class="links">
<table>
[creditsBegin]
<tr><td>[credit:name]</td>IF_Trole<td>&nbsp;&nbsp;…&nbsp;&nbsp;</td><td>[credit:role]</td>END_Trole</tr>
[creditsEnd]
</table>
</div>
ENDcredits-->


Change that to:
Code: Select all
<!--IFcredits
<div class="links">
<table>
[creditsBegin]
<tr><td><a href="http://www.imdb.com/find?s=nm&amp;q=[credit:name]">[credit:name]</td>IF_Trole<td>&nbsp;&nbsp;…&nbsp;&nbsp;</td><td>[credit:role]</a></td>END_Trole</tr>
[creditsEnd]
</table>
</div>
ENDcredits-->



And for the director you change the line:
Code: Select all
<!--IFdirector<div class="field"><div class="title">[translate:director]:</div><div class="text">[key:director]</div></div>ENDdirector-->


to:
Code: Select all
<!--IFdirector<div class="field"><div class="title">[translate:director]:</div><div class="text"> <a href="http://www.imdb.com/find?s=nm&amp;q=[key:director]">[key:director]</a></div></div>ENDdirector-->



I am sure this can be done for Wikipedia too.
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden

Re: Actors, Directors URL Links

Postby Jonas » Sat Apr 16, 2011 1:43 am

I tested a little with Wikipedia. Just change the part "http://www.imdb.com/find?s=nm&amp;q=" to "http://en.wikipedia.org/wiki/Special:Search?search=" in the code above to make a link to Wikipedia instead.

So for example the code for the director would be:
Code: Select all
<!--IFdirector<div class="field"><div class="title">[translate:director]:</div><div class="text"> <a href="http://en.wikipedia.org/wiki/Special:Search?search=[key:director]">[key:director]</a></div></div>ENDdirector-->


And the same can be done to the credits.


Another nice thing you can do is adding two small icons after the names, one for IMDB och one for Wikipedia. And instead of linking directly from the name you just link from the icon. That way you can get to both IMDB and Wikipedia directly from the InfoView.
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden

Re: Actors, Directors URL Links

Postby FineWine » Sat Apr 16, 2011 2:32 am

Jonas wrote:By editing your InfoView you can make the names clickable without having to enter any URLs manually.
I have updated my so I get to the persons page on IMDB by clicking their name in the InfoView.
Just open the HTML file for the InfoView you are using and find the following lines:

Thank you for all of that code, for which I understand most of it. I am only a very amateurish coder, more along the lines of copy & paste with some minor alterations made, not a true writer of code.

Anyway for the life of me I can not find the InfoView HTML file you refer to. I have looked into DVDpedia package contents and support folders but can not find it. I am not looking properly obviously.
Jonas wrote:Another nice thing you can do is adding two small icons after the names, one for IMDB och one for Wikipedia. And instead of linking directly from the name you just link from the icon. That way you can get to both IMDB and Wikipedia directly from the InfoView.

That is a very neat idea and one I believe I will use as it gives you the choice, but as I said I am a very amateurish coder so could you provide me with the sample code for this.

The images I can find on the net and down size them to 16px X 16px or what ever size would fit into the required space.

Thanks
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby FineWine » Sat Apr 16, 2011 3:07 am

FineWine wrote:Anyway for the life of me I can not find the InfoView HTML file you refer to. I have looked into DVDpedia package contents and support folders but can not find it. I am not looking properly obviously.


OK I have found it: /Contents/Resources/WebViewFiles/en/Collection.html And your code for Wikipedia works a bloody treat. :D :D :D

Be nice to link the images though. :)

Cheers
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby Jonas » Sat Apr 16, 2011 4:54 am

Glad it worked!
I would recommend that before you start making more changes, make a copy of the file "Collection.html" and rename it something like "MyCollection.html".
Then place that file in the following directory instead: [Your Home Folder]/Library/Application Support/DVDpedia/InfoTemplates/
(then restart DVDPedia and you can choose "MyCollection" under the menu View > Info View Style)

This way you will not lose your changes when a new version of DVDPedia is released.

Then download two icons. I use the 16x16 versions from this site (choose the PNG-versions):
http://www.mricons.com/icon/124179/48/wikipedia-icon
http://www.mricons.com/icon/124148/48/imdb-icon

Rename them "imdb.png" and "wikipedia.png" and place them in the directory:
[Your Home Folder]/Library/Application Support/DVDpedia/InfoTemplates/Images/

Then use the following code:

Credits:
Code: Select all
<!--IFcredits
<div class="links">
<table>
[creditsBegin]
<tr><td><a href="http://www.imdb.com/find?s=nm&amp;q=[credit:name]"><img src="Images/imdb.png" alt="IMDB" width="16" height="16" align="top" /></a>&nbsp;<a href="http://en.wikipedia.org/wiki/Special:Search?search=[credit:name]"><img src="Images/wikipedia.png" alt="Wikipedia" width="16" height="16" align="top" /></a>&nbsp;[credit:name]</td>IF_Trole<td>&nbsp;&nbsp;…&nbsp;&nbsp;</td><td>[credit:role]</td>END_Trole</tr>
[creditsEnd]
</table>
</div>
ENDcredits-->


Director:
Code: Select all
<!--IFdirector<div class="field"><div class="title">[translate:director]:</div><div class="text">[key:director]&nbsp;<a href="http://www.imdb.com/find?s=nm&amp;q=[key:director]"><img src="Images/imdb.png" alt="IMDB" width="16" height="16" align="top" /></a>&nbsp;<a href="http://en.wikipedia.org/wiki/Special:Search?search=[key:director]"><img src="Images/wikipedia.png" alt="Wikipedia" width="16" height="16" align="top" /></a></div></div>ENDdirector-->


Hope this will work.
Last edited by Jonas on Sat Apr 16, 2011 6:35 am, edited 1 time in total.
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden

Re: Actors, Directors URL Links

Postby Jonas » Sat Apr 16, 2011 6:32 am

I updated the post above. I mixed up the IMDB link with a link for a regular Google-search. But thats fixed now.
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden

Re: Actors, Directors URL Links

Postby FineWine » Sat Apr 16, 2011 9:04 am

Jonas wrote:Glad it worked!
I would recommend that before you start making more changes, make a copy of the file "Collection.html" and rename it something like "MyCollection.html".
Then place that file in the following directory instead: [Your Home Folder]/Library/Application Support/DVDpedia/InfoTemplates/
(then restart DVDPedia and you can choose "MyCollection" under the menu View > Info View Style)

This way you will not lose your changes when a new version of DVDPedia is released.

After my last thread I was already thinking along those lines as you suggested above but had not gotten around to it.

Any way you are just brilliant - it all worked an absolute treat. :D :D Yes I did pick up on the Google error but as I had guests over for dinner did not reply and then you bet me to the punch with your correction.

ATTN: Nora & Conor this I believe would make a great permanent fixture in the Collection.html file.

Thanks again Jonas
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby FineWine » Sat Apr 16, 2011 9:17 am

This all so works a treat in the DVDpedia 4.8.3 Beta 5 (Doghouse) version with the in-build browser.
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby FineWine » Wed Apr 20, 2011 2:59 am

Jonas wrote:I updated the post above. I mixed up the IMDB link with a link for a regular Google-search. But thats fixed now.

I wrote a modified Collections and Mint InfoTemplate for DVDpedia which has been accepted into the Extras pages and I wish to thank Jonas for the help with the IMDb & Wikipedia code.

You can view and download the Template here: http://www.bruji.com/extras/jungleGreen.html

Thanks again Jonas
User avatar
FineWine
Addicted to Bruji
Addicted to Bruji
 
Posts: 536
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: Actors, Directors URL Links

Postby Jonas » Thu Apr 21, 2011 10:08 am

FineWine wrote:Thanks again Jonas


I'm glad I could help.
Jonas
Addicted to Bruji
Addicted to Bruji
 
Posts: 28
Joined: Fri Jan 04, 2008 11:58 am
Location: Sweden


Return to Feature Requests