WP Movie Ratings

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.

Download current version of the WP_Movie_Ratings wordpress plugin.

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:

WP Movie Ratings wordpress plugin in action (recently watched movies)

Bookmarklet in action (one click movie rating):

WP Movie Ratings wordpress plugin in action (Firefox bookmarklet)

Requirements

  • WordPress 2.8+
  • FTP, SSH or SCP access to your wordpress blog (so you can upload this plugin).

Installation

  1. Download the plugin.
  2. 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).
  3. 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.
  4. 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).
  5. Go to the settings section in the administration panel and under the Movies tab customize this plugin’s options.
  6. Customize your theme by adding a new Widget to its sidebar called “Movie Ratings”.
  7. 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]].
  8. Go to your blog and see the movie ratings! :)

Upgrading

  1. Download the newest version of the plugin.
  2. 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.
  3. 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.
  4. Extract the contents of the .tar.gz/.zip file into the wp_movie_ratings directory (wp-content/plugins/wp_movie_ratings).
  5. 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).
  6. 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.

Similar plugins

594 thoughts on “WP Movie Ratings”

  1. Dear Paul,

    Thanks for the plugin, looking good, but> I’ve a question for you:

    Having uploaded the files, activated the plugin and clicked through Manage: Movies, I see the following line:

    Warning: Division by zero in /public_html/wp-content/plugins/wp_movie_ratings/wp_movie_ratings.php on line 186

  2. shelby -> atm the only way to edit/delete a movie rating is to edit the database manually. I’m planning to add edit/delete ability soon (v1.1 probably).

  3. Great plugin… how would I go about including this in a page or post though? Usually for that, support for extra markup is needed like [[movierating]]. Or am I wrong?

  4. At the moment you can include movie ratings only as a php function call, but it’s a brilliant idea to have a tag like that. I’ll definitely implement it.

  5. Would love to use your plug-in on my sidebar, but so far, I’ve been unable to get it to work in the sidebar.php file of wordpress. i know you said that the code should be added to the main index template, but that doesn’t really work well with my css. Please help. I love your plugin and the fact that it works with imdb.com.

  6. Sam -> The code can be added to the sidebar.php file too. It will work. The caveat is that it will not look good as the sidebar just doesn’t have enough space for this plugin. Unless, of course, your sidebar is at least 370px wide.

  7. Thanks Paul, waiting for the new version :)

    Here’s an idea, how about expanding this to accept music, restaurants, or any other list of things one can rate? Instead of imdb, make it a generic link and allow multiple lists (like [[toplist:listA]] etc… unless there’s something that I am missing about your plugin and it’s made very specifically for movies with no changes like this possible.

  8. okie i got it to work finally.

    but i get this error in the admin :
    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near \’SELECT watched_on FROM wp_movie_ratings WHERE id=(SELECT MIN(id]
    SELECT TO_DAYS((SELECT watched_on FROM wp_movie_ratings WHERE id=(SELECT MIN(id) FROM wp_movie_ratings)));

  9. Archon810 -> I believe that strength of my plugin lies in the ability to rate movies very easily (bookmarklet integrated with imdb). It’s not quite simple with other ‘categories’ like music, restaurants, plays, etc. There are quite a few ‘generic’ rating plugins around. They are not as good as mine when it comes to rating movies, but the allow you to rate some other stuff too. So, answering your question – I really doubt this plugin will ever become more generic.

    Toon -> The zip file is posted. Judging by the error it seems your MySQL copy is quite old (without the support for subqueries). I’ll write it in my TODO list to make simpler SQL queries so it works with older MySQL versions too.

  10. I firmly believe that target="_blank" is evil, so that functionality will probably never be in my plugin. Although if you really need it, feel free to modify the show() method in the movie.class.php so it includes the target attribute (it’s pretty easy).

  11. So, have next idea too. When IMDb dont have the movie, lets set the (in german EAN) unique binarycode or ISBN like the bookcover plugin.

  12. If there was a central registiry of such unique codes, why not. I doubt there is one, though. Never heard of one. Even if there was one, most independent movies would not reach it (and those are the movies that are not listed on imdb; 99,99% of the others is there). Besides, my plugin depends too much on imdb.

  13. Pingback: DZENTELMAN
  14. I think having the ability to include this in a post with tags like what Archon810 said is a great idea. Right now, having a sidebar or regular section is great but could get a little out of hand if you want to rate a lot of movies or rating movies isn’t a main purpose of your blog.

    [movie /link/ /numbered rating/]review text[/movie]

    Also, instead of a 10 star system, I would suggest a 5 star one with halves. It’s just easier on the eyes and won’t take up much space for movies with long titles ;)

    Just my 2 cents sir. Keep up the great work =)

  15. Great idea for a plugin and a terrific start. I too vote for 5 stars. Hard to tell at a glance if a rating is 6 stars or 7. As much as I love it, I can’t really make use of this plugin until it is more side-bar friendly. I’m going to mess with the CSS and see if I can make it work for me. Cutting down the number of stars and moving them on their own line under the movie title would go a long way toward slimming it down. Keep working on this one, it’s a winner!

  16. 5 stars instead of 10 as a max rating will be implemented probably in v1.5. It will be more sidebar friendly quite soon (I plan on doing that for v1.1). There are some IE CSS errors I’m fighting with now, though.

  17. I’m trying to use this plugin in my blog (WordPress 2.03), but it’s coming an error:

    Fatal error: Cannot redeclare class <b>httprequest</b> in <b>/home/xxx/domains/evilasio.org/public_html/wp-content/plugins/wp_movie_ratings/httprequest.class.php</b> on line <b>12</b>

    You know what it is? I really have no idea! Thanks!

  18. Great plugin! It would be useful to not just only have a link to imdb, but also to the post(s) I wrote about the movie (if there is one.) This shuldn’t be automatical of course.

    About the target=”_blank” being evil: One of the main reasons against it was that it opens a new window instead of a new tab. I always use target=”_blank”, I hate if a link accidantely makes the page i’m reading go away, but I never had a problem with it in Maxthon (my primary browser). I tested it now in Opera and Firefox as well and it always opened a new tab, never a new window. Maybe it was just me turning this on when I installed them, I don’t know.

  19. Wow, exactly what I wanted. I have a question though. Can you have a page that lists all your reviews? Is there a review archive?

  20. This is a fantastic plugin and exactly what I need for a site I’m developing for a film screening group. One request: can it use links from Amazon.com as well as the iMDB? It would be great to link to the item through an affiliate account!

  21. Very nice work!

    Short question though. I know that for many, IE is the root to many an evil, so skip that part, when and if answering :)
    Why does the output of the plugin look super in e.g. Firefox, but not likewise in IE? Any suggestions?

  22. Evilasio -> Plugin namespaces conflict. There will be v1.1 of my plugin in a few days which will fix it.

    stadi -> Added to the TODO list. Maybe for v2.0.

    dave -> There will be a page with all reviews in v1.2 (2-3 weeks i think). There might be amazon links in the fututre (2.0?)

    ceejayoz -> Thx!

    Markus -> All IE problems are fixed now. There will be a new release shortly (v1.1)

  23. hi there,

    if you could add a ‘product link’ (to imdb, or amazon) and a ‘review’ link, that would be great.
    also, director and genre fields would be great.

    is it possible to do them?

    thanks!

  24. hi i want to use that plug-in for my wordpress blog but i get this error:

    WordPress database error: [Table ‘burwordpress.wp_movie_ratings’ doesn’t exist]
    SELECT title, imdb_url_short, rating, review, DATE_FORMAT(watched_on, ‘%Y-%m-%d %H:%i’) AS watched_on FROM wp_movie_ratings ORDER BY id DESC LIMIT 10

    Note from admin: This has been fixed in v1.2.

  25. alper -> Product link maybe, it’s in my todo. Linking to review posts too. Director, genre, cast, etc. is out there on imdb. No need to duplicate it.

    bsam -> It might be that your wordpress installation is not quite ok. Or you might have simply not activated my plugin. Or maybe you don’t have the rights to create new tables in your wordpress installation (admin account on wordpress is required, leve 8 or higher). Or maybe I just don’t know what ;)

Comments are closed.