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. John -> I’ve sent you the latest version. I’m still waiting for some free time to release the v1.4 to the public (hopefully this week…). It should’ve been released 3 weeks ago :/

  2. Got it upgraded Paul. Wow, anybody who has been using this in the past will love your upgrades..Great job man……so far, it’s working like a charm…

  3. Hi Paul,

    1) count me as another vote to make a “review” a blog post and also keep a page or sidebar that collects all reviews.

    2) I display all the movies in a page, how can I make the display default order be descending by “view date”.

    3) The bookmarklet should have a field to edit the view date.

    4) The bookmarklet should have a “save” button. Marking the star rating is not the same thing as being done with the review.

    5) Thanks for a cool plugin it is definitely the best in this category!

    6) If you’re looking for beta-testers get in touch with me.

  4. earlax -> 1) yea… v2.0 someday, maybe ;) 2) v1.4 (soon… really) 3) Uhm, I don’t really want to clutter the bookmarklet, and it’s only useful for backfilling, so that’s a “no” 4) Uhm, no. It’s purpose is to be as simple as possible. Use admin panel for any advanced features. 5) Thanks for the kind words! 6) Check your email.

  5. Warning: fsockopen(): unable to connect to reviews.pingerati.net:80 in C:\Inetpub\wwwroot\mt\wearemad\wp-content\plugins\wp_movie_ratings\wp_http_request.class.php on line 60

    Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\wwwroot\mt\wearemad\wp-content\plugins\wp_movie_ratings\wp_http_request.class.php on line 61

    Warning: fclose(): supplied argument is not a valid stream resource in C:\Inetpub\wwwroot\mt\wearemad\wp-content\plugins\wp_movie_ratings\wp_http_request.class.php on line 66

    this is appearing, sometimes… when editing…

  6. I’ve got the plugin installed, and prior to adding movies, the page had worked fine (and showed sans reviews.) Upon adding reviews, I end up getting a fatal error that results in the movie reviews not being displayed for that specific page, as well as the main index after the first entries Title and category listings.

    The error I receive is:
    Fatal error: Unknown function: wp_get_current_user() in /home/riane/public_html/wp-content/plugins/wp_movie_ratings/movie.class.php on line 385

    I figured it might’ve been another plugin conflicting with it, which is nataan.com’s useronline plugin, so I deactivated that, and then reactivated the movie plugin, and I still receive that error… Any idea what’s conflicting with the plugin, if a conflication is even the problem.

    Thanks in advance :)

  7. ss -> 1) Go into options panel and set all of the options that you want to be enabled on your movie page. 2) For the sidebar mode execute the following php code:

    <?php wp_movie_ratings_show(6, array("sidebar_mode" => "yes", "include_review" => "no")); ?>
    

    Jordan -> You need WordPress 2.0.4 or newer for my plugin to work.

  8. Brilliant plug-in. Thanks! It does exactly what I’m looking for! Something useful would be to have a pointer/map to which CSS files and tags we could edit, as I had to resolve some conflicts with the CSS file for my theme.

  9. Awesome plugin–I love it. One question though. When I sort using the view date link, I end up with the following error at the top of the list (which, btw, does sort itself into months):

    WordPress database error: [Unknown column ‘watched_on’ in ‘order clause’]
    SELECT id, title, amazon_url_short, rating, review, DATE_FORMAT(read_on, ‘%Y-%m-%d %H:%i’) AS read_on FROM wp_book_ratings ORDER BY watched_on ASC, read_on DESC

    Any ideas?

  10. I just noticed the bug mentioned. It’s hard having two competing style sheets. Paul, do you know of a way to conditionally load one vs. the other based on the script running? I’ve tinkered with it for a bit and am having no success.

  11. Devin: Hard to say… wordpress gives some possibilities of checking for example which plugins are enabled. Other way of dealing with that is assigning different ids to html elements and create CSS rules with lots of ids, like this: #ratings #single-rating #item p.item a { color: red; } (this is the way I deal with hostile templates).

  12. Using the paragraph tag in the review breaks the CSS on my blog, so I have to use double line breaks instead. This might be a bug.

  13. Is there a way to show only the titles and rating on the index.php page, and in the archives allow the user to expand the reviews? Right now to have expandable reviews on the archive page it shows the review text on the front page.

  14. Great plugin!!! Am using it as a sidebar widget and am using IMDB links to fetch the movie titles. However, every title has a trailing letter ‘e’ afterwards! Any idea how I can adjust the file to NOT show the ‘e’ after the title? THANKS!
    S

  15. Shawn: uhm, it’s a feature! It’s a direct link to edit the movie rating/review and it is only displayed for logged in users (namely admin). This is the same as WordPress does for comments (at least in the classic Kubrick theme).

  16. Oh…lol! Duh! I didn’t even notice – but it’s a great feature (now that I know it’s there!) Keep up the good work and thanks for the prompt reply :)

  17. Amazing plugin. I skipped the IMDB link and used the replacement so i can review games (and other items). Awesome job :)

  18. How can I change or delete the sentence “Movies I’ve watched recently” in the sidebar?

    thanks

  19. would be possible for the next rls that the ratings page validates xhtml?!

    ther’s a

    i don’t know where it’s coming from that gives an error…

    tnkz ;)

  20. Bloo -> look into “options”…

    task -> I’ve fixed it in the trunk (so for example now all of my movie reviews pages validate). Drop me an email and I’ll send you the newest version.

  21. Hi there,

    You mentioned to Rolle that if you got more requests you’d implement the ability of your plugin to fetch cast and credit information from IMDB. I could really use that feature, seeing as how I probably spend more time copying the cast and credit info from IMDB than actually writing reviews.

  22. Hey that’s great! I was thinking of writing a plugin myself, and I may still, but it’s nice to know I have another option if it doesn’t work out.

  23. How can I “hide” the ‘watched on:’ date? I am adding this code to my site’s sidebar and would only like to display the movie’s name & rating.

Comments are closed.