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.
Jompa -> Try searching at php.net. Getting (native) localized dates in PHP (and in Linux in general) is cumbersome at best and impossible at worst.
Nice plugin.. I am in midst of starting a blog dedicated to Hollywood and Bollywood.. and this plugin would be awesome!
I really dint think anyone would make something like this.. but the search paid off.. Thanks mate
Hi. I wanted to use movie plugin for my second blog (first blog’s plugin is working) but i got this error :
“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 ‘ watched_on DESC LIMIT 0, 0’ at line 1]
SELECT id, title, imdb_url_short, rating, review, replacement_url, DATE_FORMAT(watched_on, ‘%Y-%m-%d %H:%i’) AS watched_on FROM wp_movie_ratings ORDER BY , watched_on DESC LIMIT 0, 0;
WordPress database errorı: [Table ‘wpen.wp_movie_ratings’ doesn’t exist]
SELECT COUNT(id) AS count FROM wp_movie_ratings
Warning: Division by zero in C:\Inetpub\vhosts\nihilanth.org\httpdocs\en\wp-content\plugins\wp_movie_ratings\wp_movie_ratings.php on line 359
I control my wordpress mysql database and there is no wp_movie_ratings table. what can i do now for work?
I copy the existing wp_movie_ratings table file and upload it to my new database and deactivate+activate plugin but i got same error again.
Just what I’ve been looking for for so long!! THANK YOU!
I noticed when editing the star images, that there are half stars… am I missing something in the ranking? How do I rank something as a half? or is this for future dev?
THANKS AGAIN LOVE THE PLUGIN!!
Oh, also one thing, my archive page isn’t showing up when I create a page with [[wp_movie_ratings_page]].
Do I need to implement some javascript manually? or turn on visual editor?
Sorry, didn’t read your whole page… I’m using markdown… got it now!!! LOVE IT!!!
nihilanth -> it either means that your wordpress version is too old or your installation is hosed. Or both. Try installing my plugin on a fresh wordpress install. Manually creating the table just won’t do.
Pace -> Half stars show up when you enable “5 stars movie ratings”. You rate movies from 1 to 10 but you can display the rating as 5 stars and that’s when you can see the half-stars.
I feel like a total idiot trying to figure this out, and I know that it is probably the simpliest thing in the world, but I cannot for the life of me figure out how to get this damn thing to go in my sidebar!!! Can you help? Sorry for being so php challenged.
duanne -> It’s all in the FAQ. Anyway, I can see that you’ve managed to do it.
Great plugin. Works flawlessly for me. I have my own review site and I was thinking to myself the other day that it would be great to be able to view a list of all the reviews in order of rating. Which is basically just want you’ve done.
I guess what I really need is to have individual reviews as posts, but also have the list functionality you have here. I see you’ve planned that in for version 2. Can’t wait to see that. I might even have a go myself at building something like that myself if I could ever find the time.
Doing the plugin that has movie reviews as post alone is no big deal. It’s the integration and the conversion of current wp_movie_ratings reviews to normal wordpress posts that gives me the creeps.
Hi, This is awsome and just what I’ve been looking for but I am having a problem with it when I activated the plug in, its somehow automatically gone onto my index page, but is just showing these errors?
WordPress database error: [Table ‘gf7org_wrdp1.wp_movie_ratings’ doesn’t exist]
SELECT id, title, imdb_url_short, rating, review, replacement_url, DATE_FORMAT(watched_on, ‘%Y-%m-%d %H:%i’) AS watched_on FROM wp_movie_ratings ORDER BY title ASC, watched_on DESC LIMIT 0, 0;
WordPress database error: [Table ‘gf7org_wrdp1.wp_movie_ratings’ doesn’t exist]
SELECT COUNT(id) AS count FROM wp_movie_ratings
Warning: Division by zero in /home/gf7org/public_html/wp-content/plugins/wp_movie_ratings/wp_movie_ratings.php on line 359
Im not sure how its showing up in my main index as I havnt pasted any code in there yet..? but I have the latest version of wordpress installed.
Does anyone know what I’m doing wrong?
With Many Thanks
Martin
One or two more this kind of complains and I’ll actually have a second look at the installation hook in my plugin. For now, I can only recommend starting with a fresh wordpress install and see if it works this way.
Hi Paul..
Thanks for such a rapid reply.. and like i say the plugin itself seems awsome, and thanks for all the hard work, time and effort you put in to it’s creation.
unfortunately I’ve already tried a fresh install of wp and was getting the same results.. I did look at the mysql database and there was no table there as the error report states, but Im not sure what parameters etc to put in to try creating one manually..
It’s strange… hmmm
i wil keep trying and keep you posted.
Many Thanks
Martin
hello paul…
after our server crashed and was restored with new hardware and PHP5
i have the following issue:
http://img530.imageshack.us/img530/9157/moviesdk4.jpg
i saw others also having this… did you fond what could it be?
task -> You have “short_open_tag Off” set in your php.ini file. Change it and it should work just fine.
It’s the weirdest thing. For a week now I’ve only gotten the database error, I just just about to copy and paste the error here so you would know it’s not isolated errors because mine was a 100% clean install, at the time even had the default theme.
Seconds ago I went to copy and paste the error, but when activated it worked.
I can’t explain it.
thank you very much!!!
Hi Paul,
I read tgpo’s message and wondered if it was maybe to do with imdb updating their database or something.. but alas.. still the same, I tried installing the script on another domain with a fresh install of wpress but still the same.. Its weird eh!…
I’m gonna keep trying though..
M
Paul, I love your plug in. One question, is there an easy way I can change the color of the stars? I would LOVE for them to be orange, as it is my favorite color, and I don’t want to compromise the layout by trying to make my own image. Is there any way you could help me with this? Any help is much appreciated. Again, LOVE the plug in!
duane -> Just fire up Photoshop and change the included gifs. Don’t create new ones, just change the existing.
Word! Will do! Thanks Paul!
Thanks! This plugin works great.
Hi! I have the same issue as maz. I’ve tried everything. I’ve re-installed the plugin countless of times, I’ve uninstalled WP and installed a fresh copy but it doesn’t help, I still get a MySQL error :/
Like Maz & K.E I’m having the same issues. I got rid of the problem with it installing by creating the table myself, but I still get this error:
Warning: Division by zero in /public_html/wp-content/plugins/wp_movie_ratings/wp_movie_ratings.php
:s
For 2.0, you might consider an “archive” system like Now Reading. While other readers can’t leave comments on the books there, it is pretty adaptable to multiple users (I made some changes to it do so) and allows for using amazon for thumbnails and $$. Just something else to think about, so that you don’t need to figure out how to hide the movie posts from normal feeds.
BTW, if those were to be hid from the main feed, would it possible to have the movie rating included in both the “ratings” and regular feed? I think it’s a great plugin and has great potential. Thanks for all the hard work you’ve put into it. If there’d be anyway to search the movies in 1.4, it’d be just right.
There will be search and there will be an option to have movies in the main feed. Thanks for the kind words!
Hi Paul,
First of all, this is a great plugin! However, I’m having some trouble installing it. I’ve activated the plugin but it doesn’t seem to create a table in the database.
Error message:
WordPress database error: [Table ‘aggiflinki.wp_movie_ratings’ doesn’t exist]
SELECT id, title, imdb_url_short, rating, review, replacement_url, DATE_FORMAT(watched_on, ‘%Y-%m-%d %H:%i’) AS watched_on FROM wp_movie_ratings ORDER BY watched_on DESC, watched_on DESC LIMIT 20
I have WordPress 2.1.3 and WP-movie-ratings 1.4, both installed yesterday.
Any ideas on what to do?
A follow up:
My site is hosted by godaddy.com.
I tried it on another site I have that is hosted at a different location and it worked fine. I also tried installing some other plugin on my godaddy-hosted site, and it worked.
This problem is therefore specific to WP Movie Ratings and the Godaddy-hosting, at least in my case.
My site simply won’t be complete without this plugin – hope you can solve the problem soon! :)
Awesome plugin. I, too, join the request to make it configurable for books, movies, restaurants, songs, albums, bands, etc. But hey, it’s awesome like this.
But one thing: When I try to create the “list all movies” page, I get a 404 error. It shows up fine in my sidebar, but the list all just doesn’t work. It did work once, but then I changed some of the options on the options page and now I just get a 404 error. Any suggestions?
ambib -> 404 errors are not related to my plugin but to the wordpress itself. You’ve just probably messed up your permalinks.
Hi Paul,
Do you know how I can get the lastest five movies rated to show up “inside of” a post? i’m using php-exec with no luck. any suggestions?
thanks
hubs -> The suggestion is simple: don’t do it. Do it the way which is shown in the installation instructions.
Is it possible (if so how) to change the colour the text that the plug in uses cause the theme on one of my blogs is dark blue but uses white text but with your plug in it has a white background area so the plug in just looks like one big rectangle of white.?
You need to hack the
wp_movie_ratings.css
file.For those having trouble with the install, I was running into the same table errors. Here’s how I got to work.
Deactivate the plugin.
Open wp_movie_ratings.php and remove the following lines of code near the top:
Can anyone else confirm this?
I can confirm that it does work. I now have it all set up. Nice one Aaron. :D
Hey thanks! :P
Hmm.. As soon I turn on Pierres AJAX Shoutbox (http://pierre.sudarovich.free.fr/index.php/2006/02/28/ajax-shoutbox/) I get databaseerror for the movieratings plug.