WP Movie Ratings is a WordPress plugin perfect for movie fans who like to let the world know their opinion on what they’ve been watching. At its core is a bookmarklet, which combined with Internet Movie Database and a little bit of AJAX magic lets you rate movies with just one click. Also, there is no need to write the title of the movie as it is automatically fetched from imdb. Optionally, you can also write a short review for each movie. The output from this plugin is a list of recently watched movies, which you can put anywhere you want (it is a WordPress widget). Check out the live demo.
The published movie reviews are hReview compliant.
Latest stable version (for WordPress 2.8+): 1.8 (tar.gz, zip) (2019-10-13).
The current development version can be found at github.
Screenshots
Recently watched movies list:
Bookmarklet in action (one click movie rating):
Requirements
- WordPress 2.8+
- FTP, SSH or SCP access to your wordpress blog (so you can upload this plugin).
Installation
- Download the plugin.
- Extract the contents of the .tar.gz/.zip file into the WordPress plugins directory (usually
wp-content/plugins
). Alternatively you can upload them using ftp. You should have a new directory there called wp_movie_ratings (just along the akismet directory). - Activate the plugin by going into your administration panel and selecting Plugins from the menu and clicking the Activate button for the WP Movie Ratings.
- Go to the Manage section in the administration panel and see the new Movies menu option there (you’ll find the bookmarklet there too). Rate at least one movie (using the bookmarklet or the administration page).
- Go to the settings section in the administration panel and under the Movies tab customize this plugin’s options.
- Customize your theme by adding a new Widget to its sidebar called “Movie Ratings”.
- Make a new page listing all your movie reviews by adding a new page in WordPress with this as its content:
[[ wp_movie_ratings_page]]
. - Go to your blog and see the movie ratings! :)
Upgrading
- Download the newest version of the plugin.
- Go to the Plugins section of the administration panel and deactivate the WP Movie Ratings plugin. Don’t worry as it will never ever delete any movie ratings.
- Go to the wp_movie_ratings plugins directory and delete all of the plugin files (should be
wp-content/plugins/wp_movie_ratings
). It will not delete any movie ratings (those are saved in the database). Be aware though, that if you’ve made any changes to the plugin, you might consider doing a backup. - Extract the contents of the .tar.gz/.zip file into the wp_movie_ratings directory (
wp-content/plugins/wp_movie_ratings
). - Go to the Plugins section of the administration panel and activate the WP Movie Ratings plugin (notice that higher version number of the plugin). The deactivation/activation cycle is required because of the new options that need to be written into the wordpress database (during activation).
- Enjoy life with the newest version of the WP Movie Ratings plugin!
FAQ
How can I have the ratings box displayed right after the first post?
Assuming you want to have movie ratings displayed on the front page of your blog, edit the index.php
file. Find the line similar to this one:
<?php while (have_posts()) : the_post(); ?>
Change it so it looks like this:
<?php $first_post = true; ?> <?php while (have_posts()) : the_post(); ?>
And then, inside the while
loop find this line:
<?php endwhile; ?>
and make it look like this:
<?php if ($first_post) wp_movie_ratings_show(); $first_post = false; ?> <?php endwhile; ?>
And that should do it.
How can I create a separate page listing all of my movie reviews?
Create new WordPress page by selecting Write Page in the Write menu option of the administration panel and put this line as the page content:
[[ wp_movie_ratings_page]]
How to I make the imdb link open in a new window?
Open movie.class.php
and change this line:
$o .= "<a class=\"url fn\" href=\"";
to
$o .= "<a class=\"url fn\" target=\"_blank\" href=\"";
What to do when the rating box is too wide?
Wrap the plugin function call in a fixed width <div>
, like that:
<div style="width: 200px"> <?php wp_movie_ratings_show(); ?> </div>
Your plugin is not working! All I get are (EmptyReference!)
errors!
Stop using Adobe GoLive! as it is utter evil.
The bookmarklet is not working! Help!
Currently the bookmarklet works in Mozilla Firefox, Camino and WebKit. No IE, sorry.
Check if your blog’s home address is the same as your wordpress installation. If it is not (for instance when your website’s address is example.com and there sits your wordpress installation, but your blog is located at blog.example.com), then using this bookmarklet is not possible as that kind of AJAX calls are regarded as XSS and are blocked by Firefox (by default). You need to mess with your wordpress installation for it to work.
I’m using the Markdown plugin and I cannot create a movie ratings page!
Instead of writing:
[[ wp_movie_ratings_page]]
try
<!--wp_movie_ratings_page-->
and if that still does not work for you, wrap the call in a <p>
tag, like this:
<p><!--wp_movie_ratings_page--></p>
or like this:
<p>[[ wp_movie_ratings_page]]</p>
How can I have the reviews shown when in page mode but hidden while in sidebar mode?
Go into settings in the administration panel and set all of the settings you want to have for the page mode. For the sidebar mode execute the following php code:
<?php wp_movie_ratings_show(6, array("sidebar_mode" => "yes", "include_review" => "no")); ?>
The first parameter of the wp_movie_ratings_show()
function is the number of latest movie reviews to show. The second is the array of additional display options (all are optional). Here is the list of all the options you can set (hash array):
text_ratings
– text ratings (like 5/10) instead of the stars,include_review
– include review with each movie rating,expand_review
– initially display expanded reviews when in page mode,sidebar_mode
– compact view for sidebar mode,five_stars_ratings
– display movie ratings using 5 stars instead of 10,highlight
– will highlight the stars of top rated movies,page_mode
– display all movie ratings on a separate page,page_url
– link to the movie reviews page,char_limit
– will cut any character in the title after this number,only_not_rated
– will select only not yet rated movies (‘yes’/’no’),only_rated
– will select only already rated movies (‘yes’/’no’),order_by
– default sort (valid only when used with combination of either ‘only_rated’ or ‘only_not_rated’) (‘title’/’rating’/’watched_on’),order_direction
– default sort direction (valid only when used with combination of either ‘only_rated’ or ‘only_not_rated’) (‘ASC’/’DESC’).
Other questions?
Just ask.
License
Released and available under the GNU General Public License (GPL) version 2 or later.
Known bugs
- Bugs? What bugs?
TODO
v2.0 plans:
- Convert movie ratings from separate database table to normal posts and assign custom tag to hide them from normal content (similarly to the sideblog plugin). Doing this will give us: integrated search for already rated movies, RSS feeds, comments under reviews, permalinks to each review.
- Automatically fetch movie covers from amazon, fetch director, cast, rating, movie language from imdb (when adding a new review).
- Automatic updates through the WordPress plugin administration panel.
Post v2.0 plans:
- Use static methods of Movie class, like Movie::get_watched_movies_count() instead of what I’m doing currently (tested; works in PHP 4.4.x).
- Different color schemes/images for different blog backgrounds (white/black/transparent) using different CSS selectable via panel option.
- Dynamic graph chart showing the votes breakdown.
- Automatic voting on imdb.
- Amazon links ($$).
- Bookmarklet working in Internet Explorer.
- Implement vote history import from imdb.com (and somehow solve the watched_on problem as imdb doesn’t tell when the movie was rated).
- Expand on the concept of this plugin being a general rating plugin, which will let you rate books and music too.
- Implement multiple users ratings (for multi-author websites).
- Automatically collect the movies you saw each month/week and post them on the blog.
Changelog
2015-11-19
- full compatibility with WordPress 4.4+.
- widgetization: added possiblity to display ‘Recent ratings’ in a widget
- fetch original movie titles from IMDb (ie: use akas.imdb.com instead of just imdb.com) and display links to akas.imdb.com (instead of imdb.com)
- fixed: make movies page pagination links XHTML standards compliant (& => &)
- compatibility/deprecation fixes (some of them at least…)
- release 1.7.
2010-10-14
- full compatibility with WordPress 2.7.*, 2.8.*, 2.9.* and 3.0.*.
- fixed: when ‘only_rated’ or ‘only_unrated’ option was used the ‘count’ argument the for wp_movie_ratings_show() function was ignored.
- removed automatic pingerati.net pinging (pingerati.net is AWOL).
- fixed: fetching movie title from IMDb (after IMDb has changed their website).
- release 1.6.
2008-05-18
- added option to add movies without rating them (only through the administration panel) (to create a list of owned just not yet seen dvds, for example).
- added option to select all ‘only_rated’ or ‘only_not_rated’ movies using the wp_movie_ratings_show() function call.
- char_limit option can now be passed as a parameter to the wp_movie_ratings_show() function call.
- fixed problems making the movie reviews pages non XHTML compliant.
- fixed error which prevented certain users from activating the plugin (the database table was not created).
- fixed XHTML validation error in the bookmarklet.
- release 1.5.
2006-11-18
- fixed lots of rendering issues (problems in IE, Blue-k2 theme, Golden Gray theme, reviews not expanding, etc.).
- completely rewritten encoding module, so now international characters as well as HTML should work correctly.
- fix for Markdown markup – you can now use the alternate tag:
<!--wp_movie_ratings_page-->
to create a movie ratings page. - new feature: if no imdb link is given, the plugin will not look for the movie’s title on imdb. As a drawback, there can be now movies without imdb links (and without titles…).
- new feature: ability to edit imdb links for already rated movies.
- new feature: added pagination in page mode (so movie reviews can now span among several pages).
- added option to disable pingerati.net pinging.
- added option to highlight top rated movies.
- added link from the recently rated movies list to the page with all movie ratings.
- movies are now grouped together by month when sorting by view date in page mode.
- added default movies sorting options for page mode.
- added a new database field with optional link that is used instead of imdb.
- added option to initially display expanded reviews in page mode.
- added ability to edit movies directly from the displayed ratings list (in page mode too).
- release 1.4.
For previous changes check out the changelog
file within the plugin’s archive.
@Andy: if you want your site to validate just disable the plugin in the sidebar when viewing the movie reviews page. Now as for the number of movie reviews shown in the sidebar it works this way: first, you can set it in the options panel and it will work, but you can also override it using the wp_movie_ratings() function call and setting the first parameter.
Hi Paul: Thanks for the quick answer. The id-Problem isn’t that easy to solve without creating two alternating sidebars.. :( Anyhow, the bigger problem is the number of movie ratings. I’ve set it to “3” in the options and also used the override with wp_movie_ratings_show(3,array..). The sidebar still shows all reviews :( Any idea? I’m using the sniplet-plugin and tabbed-widget, but that isn’t a problem with any other plugin so far..
I figured out that the Sniplet plugin indeed was the problem with the number of shown reviews in the sidebar.. :( Sorry for worries.
@andy: there’s lots of way to do that. One would be to alter the page’s template and use either
the_ID()
function or$post->ID
in the condition to check whether we are displaying a movie ratings page and put thewp_movie_ratings_page()
call only if we are not.Awesome update! Thanks!
Hi again ;) Okay, I still got some problems.. I managed to validation-problems by using two different sidebars now. I couldn’t see any chance to implement your solution because I’m using the tabbed-widget Plugin inside my sidebar widgets.. Kinds complicated ;)
But the main problem still exists: no matter how I try to implement the wp_movie_ratings_show(3, array(..)) the number of shown reviews always gets ignored. I’ve tried the Sniplet-Widget, Samsarin-php-widget and now I even made my own function to register the code as a widget. It only works when I directly put the code in the sidebar without any widget-stuff. Could you please take a look? Because I’m quite sure most are using widgetized sidebars.. Thanks.
I’lll have a look at this, but I cannot promise anything.
Thanks Paul, great plugin that suits my needs. 2 features that I look forward to are:
1-the RSS updates that you have planned for the next version.
2-slightly more information pulled from imdb such as the thumbnail and directors.
Hmm.. Nice plugin. I try it on my blog. Thank you!
Very cool plugin, thanks!
Nice update. It’s cool that you wanted to make it XHTML compliant – but I get a “document type does not allow element “div” here…” error at “” when I try to validate my page. Maybe other parts of my page are messing this up but I don’t see what the problem is exactly and how I can fix it…
I have an idea for future versions: Automatically collect the movies you saw each month/week and post them on the blog (with the name of the movie, star rating, optionally the review and possibly the poster for each movie).
Another idea: You could look into enabling automatic upgrade through the WP admin area like so many plug-ins have now.
it’s just what i want.
thanks…
@Hannes: it has to do with your template (the function call is put in the wrong place). The plugin produces valid html. TODO list updated.
Any news on the problem with the movie number limitation in the sidebar? My list is growing from week to week and I still couldn’t figure how to limit the number of shown reviews.. As I’ve stated before the number just gets ignored when I implement the code as a widget.. :(
Hey there Paul. I want to make a separate list for movies not yet seen. I’m not sure how I do that, I use only the [[wp_movie_ratings_page]] code. How do I make the list for the not rated films?
And, is there any chance to display the list in sidebar without changing the sidebar.php file, and only use the text-widget?
Oh, and I just got an idea. Would it be possible to somehow link it to the imdb Top 250 list? I mean, the list changes almost every day, but the plug-in would update once a day. You could put some ticker or something that shows the place the movie is on the 250 list.
It would also be pretty sweet if you could add the feature that you could have like a “imdb top 250 project” to see all the movies on the list. You know were I’m going? :P
@Maggi: to make the page listing only the unrated movies you need to edit the php code of the appropriate template and call the
wp_movie_ratings_show()
function with:only_not_rated
and:page_mode
parameters. Now as for other ideas, sure they sound good…Hi, sorry to bother again.. Just wondering if I’m the only one who doesn’t get the limit of the shown movie reviews in the sidebar right. I’ve used the correct implementation but when I want to use the sidebar as a widget it just ignores my limit and shows the complete list. Would be so great if someone could help. Thanks!
I have installed it in my side bar, but the rating stars are covering the title of the film. Its a great idea – well done!
@Rick: you have to turn on the sidebar mode. Look in the settings.
Excellent plugin! I’m gonna use it with the new theme I’m building. Thanks.
One of the best plugins for WordPress.. Well done mate!
just a little problem;
I updated my wordpress to 2.7-beta 1 and now everytime I rate something using the bookmarklet it says I need to login.. is this because of the 2.7 beta? can it be resolved?
@Jase: it might have something to do with 2.7… I’ll fix it after 2.7 is released (if the problem still persists by then).
Excellent, can’t wait!
I can only update the first 20 movies…. How can one edit all of them when needed?
Well I see that you can edit any movie from the movie review page one creates but that is very cumbersome. Just let us edit all the movies in the admin section. Anyway, this plug in could also be adapted to keep a list of funny thoughts. Almost like a twitter but listings only from you.
hi paul, any beta version where the bookmarklet is working?!
hello.
I am trying to use this plugin: http://wordpress.org/extend/plugins/footer-javascript/ but your plugin doesn’t comply. would you be interested in checking this article and maybe change your plugin slightly? http://www.prelovac.com/vladimir/best-practice-for-adding-javascript-code-to-wordpress-plugin
@ovidiu: I might take a look at that at some point (probably around WP2.7).
Does this plugin work with wordpress 2.7?
@Paul + Niklas: thx. am running wp 2.7 since the first betas, your plugin works just fine. Would really appreciate if you continue the development.
for an example of it running on wp 2.7RC1 click on my name. Btw. woudl you mind sending out updates-info by email? i.e. with this plugin? http://wordpress.org/extend/plugins/contact-commenters/ Its pretty hard to follow up, I have to come to this page, every month and check for a new version :-(
Thanks
;)
btw. how is your progress? there is now a similar plugin, lacking the review function, but extracting more info from IMDB: http://wordpress.org/extend/plugins/imdb-link-transformer/
I’m having problems with 2.7:
Error: movie rating not added. Perhaps you are not logged in? although I am logged in. I can’t rate anything right now.
Fix for 2.7: The structure of the admin-pages is slightly changed in WP 2.7. To fix this, open the file ‘add_movie.js’, and on line #87 change this:
../../../wp-admin/edit.php?page=wp_movie_ratings.php
to:
../../../wp-admin/tools.php?page=wp_movie_ratings.php
That worked for me.
I haven’t been able to add a movie review through the bookmarklet since upgrading to WP 2.7
I tried Stian’s fix (edit.php -> tools.php) but I still get “Error: movie rating not added. Perhaps you are not logged in?” when I try to submit a review.
Hannes: You may have to force a refresh when you open the bookmarklet-window after the edit. I had to.
I ran into the same ‘not logged in’ error. The Stian workaround needed some modification for me.
Modification to the add_movie.js:
– Copied and commented line 87
// var myAjax = new Ajax.Request(‘../../../wp-admin/edit.php?page=wp_movie_ratings_management’, { method: ‘post’, parameters: pars, onComplete: show_response })
Changed the copied line to:
var myAjax = new Ajax.Request(‘../../../wp-admin/tools.php?page=wp_movie_ratings_management’, { method: ‘post’, parameters: pars, onComplete: show_response })
Basically changed the edit.php part to tools.php
Hi Paul,
I got your (beta) update and installed it. It works, but:
In the old version the post (movie display), and page option of displaying movies worked correctly. In the new version both the page and post no. of entries are the same. So if you want 100 entries on your page AND you have a ‘post’ entry diplaying a couple of movies this will also result in a ‘post’ of 100 items.
Hope it makes sense.
Anyway, keep up the good work.
Hi Paul
I have a 2.7 problem I think. I use the plug-in to display only the films currently showing in my region which means manually deleting films from the database when they are no longer screening locally. Because of the 20 film limit on the “Manage Movies” admin page I used the edit option from the front page to get to the correct entry so I could delete it.
Now whenever I click edit I only get a blank “Add a new rating” option instead of the entry I am trying to delete – something isn’t being passed through.
Best option for me would be an option to show the full database at the “Manage Movies” screen (or a search function).
I hope you get to look at this after the holidays.
best regards,
DS
I got pretty much the same problem as Dan ^^ but after i changed the “edit.php” in every file of the plugin, it passes everything through to the edit-page..
Problem though..
deleting files/movies doesn’t work..
Editing movies doesn’t work either :/
What about double checking? I found this one doesn’t check the DB before posting a rating. You can post unlimited numbers of rating of the same movie. It should be there.
@Omi Azad: It’s intentional, so you could watch & rate the same movie twice and if you have a multi-user blog different users could rate the same movie.
hello Paul,
I just noticed that this plugin, makes my site slow. I analized my blogs performance with this plugin: http://blogs.icta.net/plugins/wptuner
maybe, if you are interested, you could analize your own plugin with this wptuner and optimize it? It adds a noticeable amount of miliseconds to my blogs load time. Analize your blog with movie ratigns activated and then without and you’ll see the difference.
Thanks for the plugin. Its just what I was looking for!
@Paweł Gościcki
Then you can put an option on the control panel, if I like to check for duplicate entries or not.
While clicking on the movie titles from the front end, it should take me to IMDB page on a new window or tab, this function should be useful.
movie ratings seems to add 9 db calls on any given page of my blog :-( – unfortunately I am no programmer so I can’t offer any solutions, just wanted to remark that here.
hey. just wanted to let you guys know that if you only want a simple showing of your latest ratings on IMDB you can use my dapper service, http://www.lasseman.se/2009/01/01/imdb-movie-ratings-in-wordpress/
This is a super plugin. But would it be too much to beg for it to be made blogspot-able? Or does anyone know of a similar plugin for blogger?
thanks