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. David -> I much more prefer textile instead of editors like TinyMCE. Anyway, if you wish to use it, I believe its only a few lines of code to have it play with my plugin.

  2. As a movie fan I love this plugin. Its easy to use, it looks nice and works good. Thanks, Dee

  3. Hey. Just tried to set up and use the plugin but encountered a database error. The plugin activated fine and the menu items appear in my WordPress admin area under Manage, and Options, but when I try to add a review I get a database table not found error. I’m using WordPress 2.3.3 and the latest version of the plugin (1.4). The error message is:

    Error: not added. Table ‘mydatabasename.wp_movie_ratings’ doesn’t exist.

    I’ve checked your code quickly, but haven’t had real chance to debug it myself yet. At this stage I can only presume the issue is regarding the logic used in the activation/installation hook. I’m guessing the event isn’t triggering the installation function call. I observed that none of the options in the Options page had any default values either, which lead me to that conclusion, since they’re also defined in the installation function.

    I have a standard WordPress install, and I copied the entire plugin directory as the README said to. It definitely activates, but just doesn’t trigger the installation call.

    I noticed you said the plugin isn’t in development right now so I’ll see what I can find and post back if I can get it working.

  4. Seems the problem is with the user level checking in the installation function:

    if ($user_level user_level or something similar. Hope that helps your future development.

  5. Excellent plugin!

    A wish: Is it possible to make a choice in the settings, where I can choose to paginate on a ‘Per year’-basis in stead of ‘Max movies per page: 100’. You see; I want to show all the movies for the current year, and then show links for previous years at the bottom where it now shows pagination-links (previous 1 2 3 4 next). Was that understandable?

  6. Paul, I have to say that I LOVE this plugin in. It works like a charm. I am wondering though if you can tell me how to the use the pagination from your plugin in my blog for posts. I love the look of the plugins navigation, very clean and crisp. I am currently using WPPageNavi for my posts, but I’m not nearly as fond of that look.

  7. I’ve been trying to add the date before the movie title in the page listings, in a different date format than the standard YYYY-MM-DD HH:MM:SS. I want to show them as simply d.m.y.

    What I did, I got this slightly modified version from a friend of mine, he added the following part under # Movie title (about line 374/375 in movie.class.php:

    $mindato = date_format(date_create($this->_watched_on), ‘d.m.y’);
    $o .= “$mindato: <a class=\”url fn\” href=\””;

    But this doesn’t seem to work for me, the page loads just my header and part of my page-template just until the beginning of your plugin.

    I don’t expect much, but do you have any idea what it could be?

  8. same prob here we by davey. pls just release new version to become this prob fixed. thx! i need this lovley plugin, pls :)

  9. @Stian Andreassen: this is a very good idea. I’ll put it on my TODO list.

    @kasper: if you’re a developer, it should be fairly simple to use stuff from my pagination in another plugin. If you don’t know how to code, though, it’s another pair of boots.

    @Asbjørn: you should be better off with the strftime function (http://pl.php.net/manual/pl/function.strftime.php).

    @skyarc: tell me about it… I know I need to release it… anyway, check your email.

  10. Thanks, Paul, used the following to get the date I wanted:

    strftime(“%d.%m.%y”, strtotime($this->_watched_on))

  11. loving your plugin….. I finally scrolled down all the comments to the form, phew ;)
    my request is already in your todo list for v2.0, and that is for extra movie details and a cover image. I found another plugin whilst searching, its does the bits your plugin doesnt, but doesnt do the stuff that yours does. http://www.fots.nl/index.php/imdb-tag

  12. I super can’t wait for the new version! Been wondering what was up with this plugin, it’s one of my favorites :D

  13. can you also show a short example how to implement the output into a sidebar? mine is just 150px wide, and I am getting nowhere. If I just use it gets automatically limited to 150px by my sidebar, but the stars are showing oevr the title, and you cannot read anything, just looks shi**y…

    is it actually possible to fit the output into a sidebar of 150px wide?
    can you give an example i.t. to show the latest 5 movies, with title, stars ratings and short review?

    thanks

  14. @ovidiu: just use the sidebar example from the FAQ and use the options panel to switch to 5 stars rating and limit the title length (once again in the options panel) to appropriate number of characters. That should do the trick.

  15. ok, got it to work, looks pretty nice in my sidebar. but can you give me directions where the url to imdb for the title is assembled? I would like to add a class=”no_icon” to outgoing urls, as I have a plugin that adds a small icon to outgoing urls, and I want to avoid it for these links as it looks ugly.

  16. perfect :-) thx for the help.
    btw. by using a plugin called widget logic, I can make the sidebar movie ratings widget disappear on the page that holds the movie ratings archive itsself – just by adding something like this: !is_page(‘551’) to my widget

  17. All I get is
    [[wp_movie_ratings_page]]

    On my page. I’ve tried the other ways you mentioned and it doesn’t work. I’ve disabled all plugins but this one and it STILL doesn’t work.

    Any ideas?

  18. Thanks, this makes things ALOT easier for me, and more nice looking!
    Think you should hurry doing the 2.0 version, it would be nice to have it as a widget. :D

  19. @ajemi: try the just released version 1.5. If that does not work try with a fresh wordpress install (or maybe first with another theme) and go from there.

  20. Hi, been having a problem lately. I can add movies and it says the ratings have been saved but the movies aren’t in the lists and not on the manage page either. What could be wrong? Thanks for the help.

  21. @Juice: hard to say. Try adding them via admin panel and via bookmarklet. Check if they are added to the database. Try deactivating/activating my plugin (be sure to use version 1.5). Maybe start a fresh wordpress installation (in a subdomain, for example) and go from there?

  22. I did a reset install and deleted all the tables in my MySQL which had something to do with the plugin and I got it to work again! :) Thanks.

  23. hi there.
    I really like your plugin and I have been looking for something like this for quite a while.

    Eventually, before finding your plugin, I found another one, which gave me an error, but when I went to the plugins page, it seems the author has recycled it. There is no mentioning of that plugin anywhere…
    And it seemed to have a lot of features integrated that are also on your list for 2.0 so if you are interested, jsut send me an email, and I`ll mail you that one, maybe you can get some inspiration from its code.

  24. I am using a black background for my site and it’s making the plugin appear in the sidebar in a white box so that the writing in it is invisible…

    Is there a spot in the file to change the colour of the text and background?

    Thank you!

    *huggles*

    Tera

  25. Fatal error: Cannot instantiate non-existent class: movie in /home/denizkar/public_html/wp-content/plugins/wp_movie_ratings/wp_movie_ratings.php on line 289

    Whats this error ?
    I didnt change wp_movie_ratings.php .
    I just changed movie.class.php for date .
    Where is the problem ?

  26. Interested i reupload my movie.class.php with date change and now there’s no problem . Thank you :)

  27. @Deniz: Uhm, there are at least two ways to display such list and there are few ways to sort it. Now I don’t know what and how you do, but I kind point you in the right direction (despite the fact that you use customized version, which might be broken). One way to set the sorting options it via the function call, passing the appropriate arguments (see FAQ) but the preferred method is to set them via the settings panel.

  28. I think you can add one more thing, “This DB has ### movies” or “### movies have been rated so far”

    Great Job, Keep it up!

  29. One more thing, now when we click on the movie title, it opens on the same window, it could open in a new window. That would be great!

  30. Paul —

    This plug-in is awesome and a half. I watch a LOT of movies and this has made reviewing, quickly, a dream. While adding a new review takes a moment to get to (log-in -> manage -> movies), it is a small issue with such an awesome plug-in.

    I can hardly wait to see the development grow with time. Great work.

  31. Wow, sounds like 2.0 is exactly what I am looking for since I’m working on an Arnold Vs Sly website… if you need a beta tester – let me know…

  32. Hi!
    First thanks for the great plugin. Works like a charm. Actually there are only two issues: the site doesn’t validate, when movie ratings are shown in sidebar and on page at the same time, because the IDs are already taken by one or the other.. The other problem is that the parameter on how many movie reviews are shown in the sidebar doesn’t seem to work.

    Maybe you can check these problems.
    Thanks!

Comments are closed.