Globally adding IMDb user reviews

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Globally adding IMDb user reviews

Post by kbarnes70 »

I wonder if any of you database or programming gurus can help me with this?

The IMDb website has a standard format url for its user reviews of a movie. It looks like this:

http://www.imdb.com/title/tt1259014/usercomments
http://www.imdb.com/title/tt0076786/usercomments

As you can see the format is standard and the only variable is the IMDb reference number for the movie.

I would love to be able to automate the procedure of adding this to every movie in my database - presumably it would have to take the IMDb reference number from the DVDpedia database, insert it into the url as appropriate and then add the url to the Links field in DVDpedia - with the Title of something like "IMDb User Reviews" to show up in the main Info View pane.

Can this be done easily? If so, if someone could tell me how, I'd be very grateful.

Kind regards,

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

Re: Globally adding IMDb user reviews

Post by Conor »

Hi Keith,

You won't need a plug-in or clutter your links. The best approach is to create a custom version of your favorite info view and add the following link in HTML.

Code: Select all

<a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a>
For creating a custom version read the following post which was about adding a direct link to movieposterdb but has inctructions on creating an info view template.

Where to add the above HTML link? The default collections template currently has this links section code:

Code: Select all

<!--IFlinks
<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
</ul>
</div>
ENDlinks-->
Modify it in a text editor to add the link and remove the "if" HTML comments:

Code: Select all

<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Globally adding IMDb user reviews

Post by kbarnes70 »

Conor wrote:Hi Keith,

You won't need a plug-in or clutter your links. The best approach is to create a custom version of your favorite info view and add the following link in HTML.

Code: Select all

<a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a>
For creating a custom version read the following post which was about adding a direct link to movieposterdb but has inctructions on creating an info view template.

Where to add the above HTML link? The default collections template currently has this links section code:

Code: Select all

<!--IFlinks
<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
</ul>
</div>
ENDlinks-->
Modify it in a text editor to add the link and remove the "if" HTML comments:

Code: Select all

<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>

Phew! I'll have a go, Conor... this will be new territory for me. But I have a text editor, and I can follow your instructions... so here goes...

I'll let you know... :)

Kind regards.

Keith
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Globally adding IMDb user reviews

Post by kbarnes70 »

Conor wrote:Hi Keith,

You won't need a plug-in or clutter your links. The best approach is to create a custom version of your favorite info view and add the following link in HTML.

Code: Select all

<a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a>
For creating a custom version read the following post which was about adding a direct link to movieposterdb but has inctructions on creating an info view template.

Where to add the above HTML link? The default collections template currently has this links section code:

Code: Select all

<!--IFlinks
<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
</ul>
</div>
ENDlinks-->
Modify it in a text editor to add the link and remove the "if" HTML comments:

Code: Select all

<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>
Hi again Conor,

Well, I've had a go. And I've kinda made it work (but not for the User Reviews I wanted!). I tried adding the link to movieposterdb.com first as I also use that site for covers and that worked as advised in the other post you referred me to.

I am using Collectionlinks rather than the default collection and I opened this in Textedit as instructed and found the section of code you refer to. I added the code you suggested like this:


<!--IFcredits
<div class="links">
<ul>
[creditsBegin]<li><a href="pedia://bruji.com/filterBy=[credit:name]&field=credits">[credit:name]</a> : [credit:role]</li>
[creditsEnd]
</ul>
</div>
ENDcredits-->

<!--IFlinks
<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>
ENDlinks-->

<!--IFsimilarProducts
<div class="similiarProducts">
<ul>
[similarProductsBegin]<li><div class="similiarProductsTitle"><a href="[similarProduct:url]">[similarProduct:name]</a></div><div class="plus"><a href="pedia://bruji.com/findEntry=[similarProduct:asin]"><img src="Images/smallPlus.png"></a></div></li>
[similarProductsEnd]
</ul>
</div>
ENDsimilarProducts-->
</div>

But I am not sure what you mean by removing the IF comments. I tried removing the <!--IFlinks line and that made no difference - nothing shows up when I use the template. What am I doing wrong?

Thanks for your help - this is the first time I have done any sort of programming! As you can probably guess :)

Kind regards,

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

Re: Globally adding IMDb user reviews

Post by Conor »

You added the correct link, but do remove both the IFlinks and ENDlinks; otherwise the links section will only show up if there are other links. You can copy paste the following as this is what it should be:

Code: Select all

<!--IFcredits
<div class="links">
<ul>
[creditsBegin]<li><a href="pedia://bruji.com/filterBy=[credit:name]&field=credits">[credit:name]</a> : [credit:role]</li>
[creditsEnd]
</ul>
</div>
ENDcredits-->

<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>

<!--IFsimilarProducts
<div class="similiarProducts">
<ul>
[similarProductsBegin]<li><div class="similiarProductsTitle"><a href="[similarProduct:url]">[similarProduct:name]</a></div><div class="plus"><a href="pedia://bruji.com/findEntry=[similarProduct:asin]"><img src="Images/smallPlus.png"></a></div></li>
[similarProductsEnd]
</ul>
</div>
ENDsimilarProducts-->
</div>
Also after doing a change to the file and saving you have to switch to a different template and back or restart DVDpedia (DVDpedia caches the original template while using it). This is most likely what happened when you removed the <!--IFlinks line as that should have worked.
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Globally adding IMDb user reviews

Post by kbarnes70 »

Conor wrote:You added the correct link, but do remove both the IFlinks and ENDlinks; otherwise the links section will only show up if there are other links. You can copy paste the following as this is what it should be:

Code: Select all

<!--IFcredits
<div class="links">
<ul>
[creditsBegin]<li><a href="pedia://bruji.com/filterBy=[credit:name]&field=credits">[credit:name]</a> : [credit:role]</li>
[creditsEnd]
</ul>
</div>
ENDcredits-->

<div class="links">
<ul>
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
</div>

<!--IFsimilarProducts
<div class="similiarProducts">
<ul>
[similarProductsBegin]<li><div class="similiarProductsTitle"><a href="[similarProduct:url]">[similarProduct:name]</a></div><div class="plus"><a href="pedia://bruji.com/findEntry=[similarProduct:asin]"><img src="Images/smallPlus.png"></a></div></li>
[similarProductsEnd]
</ul>
</div>
ENDsimilarProducts-->
</div>
Also after doing a change to the file and saving you have to switch to a different template and back or restart DVDpedia (DVDpedia caches the original template while using it). This is most likely what happened when you removed the <!--IFlinks line as that should have worked.
Hi Conor,

I'm getting there, slowly. I've copied and pasted the relevant section from your post. But now, if there are other links, it works as intended, but if there are NO other links, the following shows up in the Links area of the template:

[linksBegin]
[link:name]
[linksEnd]
IMDB User Reviews

The [link:name] shows up as an actual link but nothing happens when it's clicked. What am I still doing wrong?

Thanks for your help on this - it's appreciated.

Kind regards,

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

Re: Globally adding IMDb user reviews

Post by Conor »

That was my fault, I didn't think far ahead enough. What happens is when there are no links the tags for filling in possible links show up. So we have to re-add the <!--IFlinks section but further in to avoid commenting out the new IMDb link. Here is the final version of the links section to copy paste (if you want the movieposterdb link you would add that right after the user reviews):

Code: Select all

<div class="links">
<ul>
<!--IFlinks
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
ENDlinks-->
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
kbarnes70
Addicted to Bruji
Addicted to Bruji
Posts: 333
Joined: Tue Nov 11, 2008 3:15 pm
Location: United Kingdom

Re: Globally adding IMDb user reviews

Post by kbarnes70 »

Conor wrote:That was my fault, I didn't think far ahead enough. What happens is when there are no links the tags for filling in possible links show up. So we have to re-add the <!--IFlinks section but further in to avoid commenting out the new IMDb link. Here is the final version of the links section to copy paste (if you want the movieposterdb link you would add that right after the user reviews):

Code: Select all

<div class="links">
<ul>
<!--IFlinks
[linksBegin]<li><a href="[link:url]">[link:name]</a></li>
[linksEnd]
ENDlinks-->
<li><a href="http://www.imdb.com/title/tt[key:imdb]/usercomments">IMDb User Reviews</a></li>
</ul>
That's terrific now, thanks Conor. It's working exactly how I want it now. Thanks for the help.

Kind regards,

Keith
Post Reply