WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: johnp on October 19, 2008, 05:16:46 PM

Title: Ajax Star Rating Version 2.7 Improved
Post by: johnp on October 19, 2008, 05:16:46 PM
Ajax Star Rating Version 2.7 Improved

Completely reworked ]Ajax Star Rating Version 2.6 Improved with some new added
features As before when I reworked this module their seemed to be some issues within
the code an MYSQL database structure along with some issues of security which have
been addressed and implemented within this issue.

Originally ported over for website baker on July 09, 2008 by WB user SourDough.
renamed and Repacked by me (johnp) on July 10, 2008

Release Date: October 20, 2008

Change log

* Version  2.0.7 modified (10-20-2008) by John Parker
          o Fixed: corrected a install issue


 Version  2.0.6 modified (10-20-2008) by John Parker
          o Upgraded: AJAX Star Rating from 1.0.0 to version 2.0.6
          o Upgraded: Added some new features to the code structure of AJAX Star Rating module
          o Vulnerabilities Patch: Addressed the vulnerabilities within the AJAX Star Rating module and applied fixes
          o Added: WYSIWYG EDITOR to Question within this module.
          o Added: The help file with new features to the AJAX Star Rating  module
          o FIX: Cleaned up some code.
          o Added: AJAX Star Rating Disclaimer to module



This module is based off a version created by
http://boedesign.com/2008/02/18/ajax-star-rating/ (http://boedesign.com/2008/02/18/ajax-star-rating/)

Which is based off a version created by
http://www.komodomedia.com/blog/2007/01/css-star-rating-redux/ (http://www.komodomedia.com/blog/2007/01/css-star-rating-redux/)


Just remember that you need to add the following
within your header of the template index.php your using or it won't work...
Code: [Select]
   <?php 
    
// automatically include optional WB module files (frontend.css, frontend.js)
    
if (function_exists(&#39;register_frontend_modfiles&#39;)) {
        
register_frontend_modfiles(&#39;css&#39;);
        
register_frontend_modfiles(&#39;js&#39;);
    
?>



Example on how it should look in your template

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php 
        
echo defined(&#39;DEFAULT_CHARSET&#39;) ? DEFAULT_CHARSET : &#39;utf-8&#39;; ?>
" />
    <meta name="description" content="<?php page_description(); ?>" />
    <meta name="keywords" content="<?php page_keywords(); ?>" />
    <?php 
    
// automatically include optional WB module files (frontend.css, frontend.js)
    
if (function_exists(&#39;register_frontend_modfiles&#39;)) {
        
register_frontend_modfiles(&#39;css&#39;);
        
register_frontend_modfiles(&#39;js&#39;);
    
?>

    <link rel="stylesheet" type="text/css" href="<?php 
    
echo TEMPLATE_DIR?>
/template.css" media="screen,projection" />
    <link rel="stylesheet" type="text/css" href="<?php 
    
echo TEMPLATE_DIR?>
/print.css" media="print" />
    <title><?php page_title(&#39;&#39;, &#39;[WEBSITE_TITLE]&#39;); ?></title>
</head>

Tested Ajax Star Rating Version 2.7 Improved
using
Internet Explorer 7
Firefox 2.0.0.15
Firefox 2.0.0.16
Firefox 2.0.0.17
Firefox 3.0
Firefox 3.0.1
Firefox 3.0.2
Firefox 3.0.3


Hope You Enjoy!!

JP

[gelöscht durch Administrator]
Title: Re: Ajax Star Rating Version 2.6 Improved
Post by: erpe0812 on October 19, 2008, 06:09:29 PM
Hi John,

have you forgotten to add the zip-file?

rgds

erpe
Title: Re: Ajax Star Rating Version 2.6 Improved
Post by: johnp on October 19, 2008, 06:16:37 PM
no wrapping it up now!! Should be ready shortly

JP
Title: Re: Ajax Star Rating Version 2.6 Improved
Post by: johnp on October 19, 2008, 06:22:43 PM
Added Ajax Star Rating Version 2.6 Improved at first post

Enjoy...

JP
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: johnp on October 20, 2008, 02:41:43 PM
updated Ajax Star Rating to Version 2.7 Improved

Had a install issue

Thank you erpe for the bug report...

Added Ajax Star Rating Version 2.7 Improved at first post

JP
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: jackielein on April 15, 2009, 03:07:42 PM
great work !
can i somehow let people rate the posts of a (news)page separately, instead of only a bunch of questions at the end of the page ? i tried creating a whole bunch of different sections (News - Ajax - news - ajax - news - ajax) but the second Ajax rating doesnt show - plus, the News sections after the not showing ajax sections don't show either :/
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 16, 2009, 08:23:55 AM
Hi. Can I still find the zip from somewhere?
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: doc on December 16, 2009, 08:56:19 AM
Hi,

donĀ“t know if this is the latest version, but maybe you give it a try.
http://www.websitebakers.com/pages/code-snippets/listings/ajax-star-display.php

Doc
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 16, 2009, 01:35:42 PM
Ok, i'll try that.

Another thing: I was thinking to add rating for news items, kind of like jackielein posted in this thread.

I want to have both commenting and rating of news items on my site. Any suggestions?
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: chio on December 16, 2009, 02:08:34 PM
There a plans to integrate a rating function into the topics-module.
But: Topics is still beta and is not that easy to use like "news". And still mostly german.
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 22, 2009, 09:13:37 PM
Any other ideas? I would like to use News module with rating system
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: maverik on December 22, 2009, 09:57:31 PM
i have made a rating snippet which you can call with a droplet in all modules. have a look to my german site

http://www.WebsiteBaker.net/pages/labor/colorrating.php

i think its to night ready for download, stay tuned  :-D
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: maverik on December 23, 2009, 04:41:45 AM
download and tutorial online on my site

http://www.WebsiteBaker.net/pages/topics/colorrating-als-modul.php

englsih is not my language but i will try to explane a little bit

download the modul
install from backend
add the droplet code

call the droplet with

Code: [Select]
[[ColorRating?table=your own unique tablename]]
enjoy  :-D
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 23, 2009, 07:27:09 AM
Oh my! Thanks! I installed it, and it seems to be working. I'll play around with it and post comments if something comes up.
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 23, 2009, 08:19:45 AM
I was planning to make "Top rated"-page, where visitors could see posts in order depending on the average rating.

Something to do in the future maybe?

Another thing: When adding news, I always need to put unique table name? So in the first post I inserted
Code: [Select]
[[ColorRating?table=rate1]] and second:
Code: [Select]
[[ColorRating?table=rate2]] Is this the right way?

Would it be possible to add Rating Droplet in News settings-page, so that table name would increase by one for every post? This way rating would always come automatically to every post.
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on December 30, 2009, 01:49:44 PM
Quote
Would it be possible to add Rating Droplet in News settings-page, so that table name would increase by one for every post? This way rating would always come automatically to every post.

Could this be somehow done with post_id? But how to call the post_id?

Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on January 07, 2010, 09:47:52 AM
Another thing: When opening new rating, would it be better/possible to add new row to table instead of making new table?
Title: Re: Ajax Star Rating Version 2.7 Improved
Post by: Turskis on July 02, 2010, 12:19:06 PM
I'm back again with this project. Any ideas for making a top-rated-list? Also, I would love to show average value for every rating.

If anyone is interested, I'm calling this droplet in the news settings (Post Header:) like these:
Code: [Select]
[[ColorRating?table= [PUBLISHED_DATE]_[PUBLISHED_TIME]]]