« AJAX Comments Test | Main | Customizing Ratings - Ajax Rating Advanced Features »

Ajax Rating Plugin to Rate Entries and More

Update 2/11/2007: Also see these new articles on Ajax Rating:

Ajax Rating is a plugin for Movable Type that enables visitors to rate your entries or your blog.

Try it now by rating this blog:

  • Currently 3.7/5
  • 1
  • 2
  • 3
  • 4
  • 5

The "Pro" version of Ajax Rating lets you rate comments, trackbacks, categories, authors, tags, and just about anything else. Added features include threshold viewing for comments based on rating, listing "hot" items, and comment reporting. More details on the Pro version below.

Ajax Rating is easy to setup and use. After downloading the plugin and installing the files, a few simple changes to your templates will enable you to adding Ajax Star Raters to your entries. For example, just add <MTAjaxStarRater type="entry"> to after the <MTEntryBody> tag and you are done - instant Ajax Star Ratings.

Download Now

Membership required, please sign-in or register:

Ajax Rating Pro

Ajax Rating Pro has a lot more features:

  • Thumbs up /down (or plus/minus) rating modes
  • Display listings of top rated items
  • Rate comments and other objects
  • Hide comments below a certain rating threshold
  • Enable visitors to choose their own threshold
  • Include a button for reporting spam or inappropriate comments
  • Display "hot lists" based on recent voting activity

Digg-like Functionality

The "hot lists" feature mentioned above is one of the most powerful features of Ajax Rating. It can be used to enable Digg-like functionality, in which your home page can be set to display only the items that are "popular now". Used this way, the ratings become a filter for the content you feature on the home page. If you have a site or blog network with new entries be added frequently, this feature is especially useful. In a typical blog-format home page, entries get pushed lower down the page every time a new one is posted, so even popular entries can get pushed off the home page quickly on a busy site. Ajax Ratings gives you an alternative to this, displaying the hottest entries first, as determined by visitor rankings. This is automatic, and you can define the "hot" time frame (1 day, 3 days, 2 weeks, etc.). Ajax Rating hot lists can really change the dynamics of a site, and may inspire ideas for new ratings-driven sites.

Comment Viewing Threshold

Sites like Slashdot, Scoop-powered sites, and Digg have a similar feature, which hides comments if they are below a certain rating or score threshold. Referred to as a comment viewing threshold or a "collaborative filtering tool", the idea is to display top-rated comments prominently, while hiding or collapsing lower rated comments. With the Ajax Rating plugin, it is possible to do this with Movable Type comments. The plugin is very flexible in how you want to set this, but a common approach might be to enable readers to vote each comment "up" or "down" (plus or minus, thumbs up, thumbs down, etc.). A vote up would equal +1 point and a vote down would equal -1 point. You then set a default viewing threshold. For example, you might choose -10 as the default, meaning that comments with a total score of less than -10 will appear collapsed (or partially or completely hidden, you choose). Collapsed comments can be displayed with a single click. You can also include a form that enables readers to set their own threshold level. Again, this is very customizable, you decide how you want things to work on your site. Take a look at this test entry, which demonstrates both a Star Rater (for the entry) and Plus/Minus comment threshold viewing (for the comments). Set your own threshold using the form at the bottom of the comments and see how the display changes. Similar to the hot list described, above comment viewing thresholds are another way to transform the display of your content based on user ratings.

Rate Anything

Another advanced feature is the ability to rate anything at all. In addition to rating MT objects like entries, comments, categories, authors, and blogs, you can also use Ajax Ratings to rate other things. For example, if you want to create a rater for a movie or book, you can do that. (Example: <$MTAjaxStarRater type="movie" id="23" max_points="5$> -- just remember what movie you assigned the ID 23 to....)

One Vote per IP Address

To prevent people from voting multiple times on the same item, only one vote is accepted per IP address per item.

Template Tags

Template tags for Ajax Rating are available for both static and dynamic (php) publishing.

The following template tags are available in Ajax Rating (free version):

  • <MTAjaxStarRater> - This tag will output a star rater like the one shown above. To rate entries, it must be used in an Entry context (ie. between <MTEntries> and </MTEntries> tags or in the Individual Archive Template. A good spot is just after the <MTEntryBody> tag. The following arguments are supported:
    • type - Recommend (but not required) when rating entries and required when rating a blog. (Example: <MTAjaxStarRater type="entry"> or <MTAjaxStarRater type="blog"). With Ajax Rating Pro, you can also specify the following types: comment, category, author, tag, trackback, or anything else (see "rate anything" above).
    • max_points - Not required for entries and comments, but required for other types. This argument specifies the number of stars that will be displayed. (Example: <MTAjaxStarRater type="blog" max_points="5"> will create a rater with 5 stars)
    • id - For advanced use, the id argument enables you specify a specific object ID number that you want to rate. If you use the tag in the correct context, you don't need to include the 'id' argument. But if you want to place a rater outside of the relevant context, or if you want to rate a non-MT object (see "rate anything" above), then you must specify the id of the object. Normally, you don't want to use this, so forget I mentioned it. ;)
  • <MTAjaxRatingTotalScore> - This will display the total score for the item being rated (adding up the values of all of the ratings made).
  • <MTAjaxRatingAverageScore> - This will display the average score for the item being rated.
  • <MTAjaxRatingVoteCount> - This will display the number of votes or ratings that have been submitted for this item.
  • <MTAjaxRatingEntryMax> - This will display the maximum number of points (stars) for rating entries, as specified in the plugin settings for that blog.

With Ajax Rating Pro, the following tags are also available (in addition to those described above):

  • <MTAjaxRatingList> - A general purpose container tag for displaying listings of "top rated" items in the MT database. The following arguments are available:
    • type - Required. Allowed values are: entry, comment, trackback, category, blog, author, tag. Tip: do not pluralize these types.
    • sort_by - Determines which metric is use to rank the results. Allowed value are: average, votes, total. The default is sorting by total score.
    • sort_order - The sort_order defaults to 'descend' (highest rating first), but you could also specify 'ascend' to show the worst rated items first.
    • blogs - To display a list of items from all blogs on the system, specify blogs="all". Otherwise, leave this out and the list will be restricted to the current blog.
    • show_n - Use this argument to specify the number of items you want to list (the default is 10). (Example: <MTAjaxRatingList type="entry" show_n="15">)
    • hot - Set 'hot' equal to 1 to generate a list of recently "hot" items (this is the powerful feature discussed above). When the 'hot' argument is set to 0 or omitted, the listing will be based on "all time" ratings data. Adding hot="1" will based the listing on recent voting activity only.
  • <MTAjaxRatingEntries> - Same as <MTAjaxRatingList type="entry">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingComments> - Same as <MTAjaxRatingList type="comment">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingPings> - Same as <MTAjaxRatingList type="trackback">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingCategories> - Same as <MTAjaxRatingList type="category">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingBlogs> - Same as <MTAjaxRatingList type="blog">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingAuthors> - Same as <MTAjaxRatingList type="author">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxRatingTags> - Same as <MTAjaxRatingList type="tag">. Same arguments as MTAjaxRatingList, but the 'type' argument is not required.
  • <MTAjaxThumbRater> - Instead of a star rater, this tag will display a thumbs up/down (or plus/minus, etc.) rater. With this type of rater, there are images for voting an item "up" or "down". A vote "up" is equal to 1 point, a vote "down" is equal -1 point. The following arguments are available:
    • type - Recommend (but not required when used in an entry or comment context). (Example: <MTAjaxThumbRater type="comment">). The same types can be used as described for <MTAjaxStarRater> above.
    • id - Same (advanced) usage as described for <MTAjaxStarRater> above.
    • report_icon - This optional argument will display a third button, a "report" button, when used with comment raters. Visitors to your site can click this button to report the comment (for abuse, spam, profanity, etc.). When a comment is reported, an email is sent to the author of that entry, along with a link to edit the comment in question.
  • <MTAjaxRaterOnclickJS> - In addition to the convenient star and thumb raters, you can create your own rater. This tag makes it easier. To enable a rating button (or text link), you need to specify a javascript onclick event. This tag fills in the details. For example suppose you wanted to create a single voting text link for each entry - you could do so as follows: <a href="#" onclick="<$MTAjaxRaterOnclickJS type="entry" points="1"$>">I like it!</a>). Arguments include:
    • type - Recommended (but not required when used in an entry or comment context).
    • id - Same (advanced) usage as described for <MTAjaxStarRater> above.
  • <MTAjaxRatingCommentMax> - This will display the maximum number of points for rating comments, as specified in the plugin settings for that blog.
  • <MTAjaxRatingDefaultThreshold> - This will display the default threshold for viewing comments, as specified in the plugin settings for that blog.
  • <MTIfAjaxRatingBelowThreshold> - This is conditional tag whose contents will be displayed if the comment is below the default threshold, as specified in the settings. Note that this tag does not apply to user-specified thresholds (more on those later).
  • <MTAjaxRatingRefreshHot> - WARNING: You should not use this tag if you have a busy site with high-volume voting activity. This a special tag, it displays no ouput. It simply triggers the process of calculating the list of "hot" items. Note that "hot" list are not tabulated when the listing tags are rebuilt. For performance reasons, this process happens separately, usually via an MT scheduled task that runs automatically (approx) once every hour. If, for some reason, you want to manually refresh to the "hot" list, you can place the <MTAjaxRatingRefreshHot> tag into an index template and rebuild it (be sure to uncheck the "rebuild this template with indexes" box!). Again, this should be used carefully on busy sites, and usually not at all. The "hot" list can also be refreshed via an included cron script (more on this later).
Ajax Rating Settings

The settings for Ajax Ratings looks like this:

The blog settings for Ajax rating Pro looks like this:

Ajax Rating Pro also has a setting that is set only at the system level (Go to System Overview > Plugins). The system setting looks like this:

One of the notable settings is the "Rebuild After a Vote" option. High traffic site with high-volume voting should be careful with this setting. Generally speaking rebuilds can consume a lot of processor cycles, and a significant rebuilding after votes could slow things down, depending on several factors. The best performance option is "No Rebuilds" -- if you choose this option, the page will get update with the reader's vote immediately, but if this refresh the page, their vote won't be reflected (because the page has not yet been rebuilt). In this mode, ratings and votes counts get recorded into the database, but are not reflected on your pages until those pages are rebuilt (such as after a comment is posted to the entry, or manually rebuilt). If you have a site with high volume voting, chances are that you also have high-volume commenting -- if this is true, use the "No Rebuilds" option here and your entries will still be rebuilt every time a comment is posted. The second option here is "Rebuild Entry Only" -- this will only rebuild the Individual Archive template(s) for that entry (or if the vote is for a category, it will only rebuild the relevant category archive page) -- performance-wise, this option is not too bad. The third option is "Rebuild Entry, Archives, Indexes" -- this is the same level of rebuilding that happens when a comment is posted. It is the worst option performance-wise, as many pages may be rebuilt (the individual archive page(s), each of the category pages for the entries categories, any date-based archives enabled, and every index template in your blog. Be careful with this one on high-traffic blogs. The final option is "Build Indexes Only", which will only rebuild your index templates. This option might be suitable if you are only using the "Rate This Blog" widget (more on this later) on your main index. Note that if you are using PHP Dynamic publishing, there is no issue with rebuilds, you can set this to "No Rebuilds" and ratings will always be reflected correctly each time the page is loaded.

Requirements

MT 3.2+

(Note: If you are running 3.3+, installation will be much easier, as the database tables will be automatically created for you. If you are running 3.2, you will need to create the tables manually - or via a utility like phpMyAdmin)

Installation Instructions

  1. Expand the zip file.
  2. Upload the contents of the 'plugins' directory to the 'plugins' directory of your MT install (usually /cgi-bin/mt/plugins)
  3. Upload the contents of the 'php' directory to the 'php' directory of your MT install (usually /cgi-bin/mt/php)
  4. Upload the contents of the 'mt-static' directory to the static directory created when you installed MT (usually called 'mt-static')
  5. Change the permissions on the mt-vote.cgi and mt-report.cgi (Pro only) files found within /plugins/AjaxRating/ to 755 (CHMOD 755)
  6. Login to Movable Type (or if already logged, click "Main Menu")
  7. If your are running MT 3.3+, you should now be redirected to an Upgrade screen that will install the tables for Ajax Rating. If you are running MT 3.2, then you need to create the tables manually, using the ajaxrating.sql file to create these tables.
  8. After the tables have been created, browse to the settings (Settings->Plugins) for the blog you want. Choose the settings that you want and then save.
  9. Return to the settings and click the "Click here to install the Ajax Rating templates for this blog" link. This will install the javascript and styles index templates and rebuild them automatically. (Note: if you change you settings in future, remember to manually rebuild this index templates afterwards)
  10. For every template for which you plan to place raters, add the following between the <head> and </head> tags:
  11. <script type="text/javascript" src="<MTStaticWebPath>prototype.lite.js"></script>
    <script type="text/javascript" src="<MTStaticWebPath>moo.ajax.js"></script>
    <script type="text/javascript" src="<MTBlogURL>ajaxrating.js"></script>
    <link rel="stylesheet" href="<$MTBlogURL$>ajaxrating.css" type="text/css" />

  12. Now you can place raters to meet your needs. Most people may want to add something like the following below the <MTEntryBody> tag:
  13. <$MTAjaxStarRater type="entry"$>
    Rating: <strong><span id="ajaxrating_entry_<$MTEntryID$>_avg"><$MTAjaxRatingAverageScore type="entry"$></span></strong>/<$MTAjaxRatingEntryMax$> (<span id="ajaxrating_entry_<$MTEntryID$>_cnt"><$MTAjaxRatingVoteCount type="entry"$></span> votes cast)

  14. Add the included Ajax Rating widget to your sidebar. This will display a "Rate this Blog" section that will enable people to rate your blog. (Optional)

  15. Test it out and tell people they can start submitting votes!

For more advanced usage, I am going to post a separate article soon, covering topics such as custom raters, comment threshold setup, customizing the star and plus/minus buttons, and more.

Get Ajax Rating

Ajax Rating is free for personal use, but you must include a link on your home page to http://mt-hacks.com/ajaxrating.html, such as:

Ratings on this site are powered by the <a href="http://mt-hacks.com/ajaxrating.html">Ajax Rating</a> plugin for Movable Type.

Download Now

Membership required, please sign-in or register:

A lot of effort went into this plugin, donations are much appreciated. Suggested donation is $10:

If you wish to use Ajax Rating for commercial use, a commercial license must be purchased for $25:

Get Ajax Rating Pro

Ajax Rating Pro Regular License (1 to 10 blogs)

A regular license for Ajax Rating Pro enable you to use Ajax Rating Pro on up to 10 blogs on a single MT installation. The cost is $249:

Ajax Rating Pro Blog Network License (10+ blogs)

If you want to use Ajax Rating Pro on more than 10 blogs on a single MT installation, you can purchase a "Blog Network License". The blog network license is for unlimited blogs on the same install, and includes up to 2 hours of implementation consulting and a custom multi-blog installation script. The multi-blog installation script can be customized to meet your needs (subject to the 2 hours of consulting time) and includes setup of settings and installation of templates for each blog. The blog network license is $499.

Rater Images and CSS Styles

I did not design the default star graphic used with this plugin, and I did not craft the CSS styles that make it look and work so slick. Much credit for both of these elements goes to Ryan Masuga of Masuga Design. Ryan's Unobtrusive AJAX Star Rating Bar has been downloaded more than 12,000 times! Thank you Ryan.

The plus / minus images, on the other hand, I did design .... and it shows. Graphic design is not my forte. As mentioned above, you can swap out your own images for both types of raters (more on that soon). If anyone out there want to design some better button images, please do! Thumbs up and thumbs down images would be cool, and maybe a better plus/minus set as well. If you design some buttons you want to share, let me know I will post them here or include them with Ajax Rating (giving you credit of course).

Future Features

In the future Ajax Rating Pro will be enhanced even further. If you purchase a license for Ajax Rating Pro, you can help steer the development of new features. I see a lot of potential for this plugin with very active blog sites, and blog networks in particular -- and new features will likely be in this area. Here are a few ideas that may be worth adding if customers are interested:

  • more sophisticated "hot" list algorithms - making this more sophisticated and customizable, so you can fine tune everything to make sure that the popularity filter is promoting those items that help build community and create buzz
  • score summary for authors and commenters - look at which authors have the highest and lowesst rated entries (maybe offer prizes or compensation based on ratings), also look at summarized raters for each commenter, possibly triggering automatic or manual review when commenters have continually poor ratings (troll meter)
  • displaying rating and vote information on the MT admin screens
  • notification thresholds that will flag comments below thresholds, or even rules that automatically unpublish them pending review.

As always, comments, feedback, suggestions are welcome. Please reply to this entry.

Update 2/11/2007: Also see these new articles on Ajax Rating:

Rate this entry:

  • Currently 4/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4/5 (170 votes cast). Powered by the Ajax Rating plugin.

TrackBack

TrackBack URL for this entry:

Listed below are links to weblogs that reference Ajax Rating Plugin to Rate Entries and More:

» Introducing Media Manager 2.0 Beta 1 from majordojo
Media Manager has been a hobby of mine ever since I first started working for SIx Apart; from my first release of BookQueueToo, which was an expanded version of BookQueue, to a nearly completely rewritten Media Manager for Movable Type... [Read More]

» Improving technology in schools is from 95 operating system window
He said he was shocked to learn that most of the system's 5000 computers are 10 years old and still [Read More]

Comments (81)

roderick [TypeKey Profile Page]:

Hi Mark,

Awesome plugin - I was actually one of the people to contact wizbang for the code.

Do you have a pricing schedule for the "pro" version for say, one blog? I'd love the pro functionality, but I don't have the "pro" funds. Thanks.

Hello Mark!

It worked fine with the 30px stars, but with the smaller (16px) it didnt.. and I changed the plugin settings to 16..

Mark --

Forget my last comment :roll:

Hi Grace,

I guess you have figured it out already, but I will soon be posting some details on how to switch star icons and sizes. To switch to the provided 16x16 starrating.gif stars, rename it to starrating.gif and change the the Star Width setting to 16. Then rebuild the styles and javascript templates, then rebuild your pages. To use your own graphic, create an image that has 3 stars, one on top of the other like the ones below. If your image is 16 pixels, it should be 3 times as high (48px):

30 x 90 pixels: 16 x 48 pixels:

Then name it starrating.gif and upload to the mt-static/plugins/AjaxRating/images/ directory. Then enter the width of your star image into the settings, then rebuild javascript, styles, and all pages.

It should be noted that:

cannot be used to show entries in an index without a precedeing MTEntries tag. This may not produce the desired results, as:


Produces a page of repeated entries when there are only three entries that have ratings.

MTAjaxRatingEntries will work without the MTEntries tag and will produce a listing of just the three rated entries.

It should be noted that:

MTAjaxRatingList type="entry"

cannot be used to show entries in an index without a precedeing MTEntries tag. This may not produce the desired results, as:

MTEntries lastn="15"
MTAjaxRatingList type="entry" sort_by="average"

Produces a page of repeated entries when there are only three entries that have ratings.

MTAjaxRatingEntries will work without the MTEntries tag and will produce a listing of just the three rated entries.

m-sh:

the vote did not add to the database ...
the database is empty :-(

Note, my two previous comments were in error.

m-sh, what is the site address you're testing on?

m-sh:

database created ...
but it is empty

Sven:

I have problems installing this plugin. It hangs up or runs and runs and runs while trying to upgrade. When I try to use the SQL used fpr 3.2 there is a 1094 timestamp error.

So, wich database version is needed? I am running 4.0.24.

Sven, what version of MT are you using?

That version of mySQL should be fine.

anu:

Hi,

Does this work with MT4 yet ?

I'm getting this error when I try and install the ratings templates from the blog|plugin configuration.

"Unknown action ajaxrating_install_templates"


Lee W.:

I can't get this to work on my blog. I did all the install steps word for word. I can get the rater to show up on the entry page and the hover and click all work. The problem is when you go away from the page and come back the rating is back at zero. I have it set to "Rebuild Entry Only" on the setting page.

Also when I try to use a custom starrating image it's giving me problems. I can get the width right but the height always seems to be 30. My custom image is 11x33 which should be the right dimensions. What am I doing wrong? Help!

anu,

None of the MT Hacks plugins have been tested with MT4 yet. As MT4 is in beta, I will wait until the final release (or close to it), before testing and updating plugins. MT4 is very new and much has changed, and will continue to change. Generally speaking if you are using any "mission-critical" plugins, I wouldn't recommend upgrading to MT4 until it comes out of beta.

Mark Carey [TypeKey Profile Page]:

Lee, can you provide a link to your blog with a rater with your custom image?

Lee W. [TypeKey Profile Page]:

It's not actually live for anyone to see. I'm developing on a private server.

One thing I just read on your advanced features page is this - "Save your settings and then rebuild the Ajax Rating javascript and styles index templates." How do you rebuild those files?

Mark Carey [TypeKey Profile Page]:

Hi Lee,

Good point, that is probably what you need to do to fix this issue. Go to templates and few the list of Index templates. You should see templates for Ajax Rating Javascript and Styles. Open each template and choose "save and rebuild".

Lee W.:

Thanks for clearing that up. Now my custom star images are displaying correctly.

However, the ratings are still not being recorded. When I revisit the entry post it still says "Rating: 0/5 (0 votes cast)". Is it not updating the database somehow?

Mark Carey [TypeKey Profile Page]:

Lee, I know that you said you chose the "rebuild entry only" option, but just as a test, can you rebuild all your individual archives (or re-save the entry in question) via the MT admin interface and then check the rater in question -- does the vote show after that?

Lee W.:

Yeah I've tried practically eveything I can think of. I've tried every option under "Rebuild After a Vote". I've tried editing and rebuilding all three of my test entries. It's just acting really weird. When you click o vote it updates the star image and the "Rating: 2/5 (1 votes cast)" line as well but it just doesn't save any votes. Is there a database I need to install or anyhting like that?

Lee W.:

I didn't do this step in the installation because I didn't know how to. Can you tell me if that's the problem and if so how can I do it.

5. Change the permissions on the mt-vote.cgi...

Lee W.:

Yep that permissions thing was the problem. I have it working now. Thanks for your help.

Sean F. [TypeKey Profile Page]:

I can't get this plugin to work on Safari or Firefox. ANy help?

Sean F,

You will have to be more specific - what happens when you try?

The plugin definitely works on FireFox, though I don't have Safari to test...

Sean F [TypeKey Profile Page]:

It's actually on an internal server so you can't view it.

I'm guessing it might be because the plugin is nested within a div in our template. Perhaps taking it out and reformating the mt template with no div's would work.

Basically, the problem is the star icons do not display in the correct locatin in Firfox and Safari. They are pushed from their intended location of beneath the article to a right side-bar on the site.

Dave:

This looks like something I'd want to use on a project I'm working on.

One question though... would there be a way to take the average rating of entries in a category and possibly place them in a separate entry?

That might be a lot to ask, but it would be really useful.

Dave, I am not sure if I fully understand what you are asking, but I am pretty sure the answer is no -- at least for the current version of the plugin.

Currently the plugin can display average ratings for a single object (entry, comment, category, etc), but not for a group of objects. I like your idea though, it would be nice to average entry ratings by category. Not just by category, but also by author (so you can tell which author has the highest rated entries, on average).

The part I don't understand is what you mean by "and possibly place them in a separate entry".

Based on the above comment, does this mean you can't create a list of rated items in the category archive context?

Bummer, because that is exactly what I was trying to do.

Brian, no, it does not mean that at all. You can certainly create a list of rated items in a category archive context. That said, I am not sure exactly what you want to list (what type of "item").

What I was saying is that rating averages are calculated "per-item" only. Meaning, that you can display the average rating on any single entry, comment, category, etc. But the plugin does not aggregate votes across groups of items -- meaning that it does not do "show the average rating for *all* entries in this blog or in this category". As you can see, this doesn't relate at all to creating lists of rated items.

ali:

Hi Mark,

How can I have a fresh re-install? I have been renaming the plugin directory, it forces it to upgrade, but doesn't start from scratch.

Carlo [TypeKey Profile Page]:

Hey, I tried installing this plugin.. but I have two issues.
1. this appears when I try installing the templates:
You tried to set inexistent column orig_name to value Ajax Rating Javascript on MT::Template at /home/23753/domains/MYSITE.com/html/plugins/AjaxRating/lib/AjaxRating.pm line 299

2. I added the code to my templates and it only shows the numbers.. I don't see any stars :s

ali, simply remove all the plugin files and directory, then load MT, then upload the plugin again. Its not clear to me why you want to do a "fresh re-install" -- what is your goal in doing so?

Carlo, what version of MT are you using? Based on the first error, it sounds like you might be running MT4. Note that the current version of Ajax rating does not fully support MT4. A new version will be released very soon with MT4 support.

Su [TypeKey Profile Page]:

Mark, is it possible(or buildable...) to attach multiple ratings widgets to a single object(in my case, entries)? You can ref my just-posted Pronet message for a bit more detail.

Su, I replied on ProNet. Here is the response, for others who may be interested:

Strictly speaking, you can only have one rating per object. However, AjaxRating is very flexible in that you can also rate "non-objects". By this, I mean that you can create raters to rate things that are not MT objects: movies, books, etc. The example cited above is an example of this: the download counters on MT Hacks. A single click on the download links adds a vote, much like you describe. But that vote is not attributed to the entry itself, but to a user-defined object type (such as "fastsearchdownloads" or "ajaxratingdownloads", etc.) and object id (you define this two, just make sure it is unique for the defined object type. So essentially on MT Hacks you will see that there are two raters for most entries, one for the entry (5 star rater) and one for the download.

I would suggest approaching this my defining an "object type" of "entry2" (or better yet, something that makes more sense for your purposes) and use the entry_id as the object id for the rater. This way, you effectively can create multiple raters per entry.

Also see the "Rating Non-MT Objects" section of this article.

Kevin:

Do you know when we can expect the AjaxRating be available to support MT4? Will this include the Pro version?

Thanks!

wolf [TypeKey Profile Page]:

Ouch. Version 1.1 of AjaxRating Basic on MT4 installs fine, but when I get to step 8 where I have to let AjaxRating install the templates, the script fails, indicating that:

(!) Unknown action install_blog_templates

and displays two "Close" buttons. Doing a quick grep on AjaxBasic indicates that there's no such function as install_blog_templates. Could you double-check that you didn't accidentally omit a vital file from the archive or something?

Thanks for pointing this out, wolf. I forgot to add the "requirement" -- the Template Installer plugin is now required for installing Ajax Rating on MT4. Template Installer handles the installation of the templates. I will fix this ASAP.

wolf [TypeKey Profile Page]:

I got the impression that AjaxRating for MT4 would install the database tables automatically, but I couldn't get AjaxRating to work until I had queried "ajaxrating.sql" on my MySQL database manually. Is this a bug, or did I misread the documentation?

wolf, the tables should be installed automatically.

Is your MT4 install a "fresh" one, or did you upgrade from a 3.3x version of MT? If it is an upgraded install, did you have Ajax rating installed before upgrading to MT4?

Any other details about your install would help (version of MT, perl, mysql, etc.)

wolf, thanks for the report. It was a bug. It sounds like you are okay now since you have installed the tables, but I have just released a new version that should install the tables automatically.

wolf [TypeKey Profile Page]:

Mark, it looks like you figured something out on your own, but just for good measure, it was a fresh install. However, since I didn't originally have the Template Installer installed, some errors might have occurred because of that. Let me know if you still need details on tool versions.

amir [TypeKey Profile Page]:

hi. my problem is same that Lee W.
but i am sure that plugin installed successfully.
I did all the install steps word for word. I can get the rater to show up on the entry page and the hover and click all work. The problem is when you go away from the page and come back the rating is back at zero. I have it set to "Rebuild Entry Only" on the setting page. and i have test other options.
i have rebuild all templates manually but my problem is same!!
my mt-vote.cgi permission is 755 and i had reinstalled plugin but i have same problem yet!!
sorry for my bad english language.
my site address and post Permalink :
http://ppcadvert.net/2007/10/test.php

amir [TypeKey Profile Page]:

attention : my mt version is 4.01 .
thanks

amir, can you confirm that the tables for Ajax Rating have been created in your database? With MT4, there have been some cases where the tables are not getting created automatically. If this is the problem, you can manually create the tables using the SQL code included in the download file.

I am working on a workaround to this issue, and will release that once it is ready.

amir [TypeKey Profile Page]:

hi Mark Carey .thank you of your answer and best plugins.
my problem was solved with manualley create the tables.
thank you
Best Regards

Su [TypeKey Profile Page]:

I've also got an MT4.01 system(fresh) where templates didn't get installed. This is done during the upgrade process, right? Should the progress window show an item for it? If so, mine didn't at all; just went straight to the confirmation of installation. I'm adding the tables manually, but let me know if there's any information that might help.

Su [TypeKey Profile Page]:

That's with 1.11, by the way, since you said the bug was resolved.

Su, as you can from the Installation instructions above, the template are not installed automatically during the upgrade process (hint: see step 9). ;)

One of the reasons that the templates are not installed during the upgrade process is that the plugin would have to do so for every blog on the system, which would be overkill for sites with many blogs, but who only want to use the plugin on one or two of them.

SomeGuy:

Is it possible to set up Ajax rating so that ONLY the blog administrator can post a rating - similar to what individuals are permitted to do when they rate a book on Amazon.com?

Thanks.