Ajax Voting System: Create Ajax Rating/Voting system in Dzone and Digg Style. Part 2
In my previous tutorial i explain how to create simple ajax rating using Ajax, PHP and CSS3. In this part i am going to create Digg.com and Dzone.com voting style.
CREATE TABLE `digg_rating` ( `id` int(11) NOT NULL auto_increment, `rating` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE `dzone_rated_ip` ( `id` int(11) NOT NULL auto_increment, `user_ip` varchar(200) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE `dzone_rating` ( `id` int(11) NOT NULL auto_increment, `up_rated` varchar(200) NOT NULL, `down_rated` varchar(200) NOT NULL, PRIMARY KEY (`id`) )
This voting system is similar to previous rating system in back end scripting i mean same ajax style but different in behavior. Check demo and download code to make it more simple and use it. Also don’t forget to give your feed back your suggestions and hot topics to share.
Related Posts :
16 to “Ajax Voting System: Create Ajax Rating/Voting system in Dzone and Digg Style. Part 2”
Post comment
Who Am I

Zeeshan Rasool
Software Engineer - PHP
Lahore - Pakistan
Skype: zeeshan-rasool
gTalk: zishan.rasool85
Categories
- AJAX (24)
- Codeigniter (16)
- CSS (7)
- Facebook (8)
- Joomla (1)
- JQuery (34)
- Miscellaneous (3)
- Mootools (1)
- MySQL (4)
- PHP (43)
- SEO (2)
- Technology (6)
- Twitter (1)
- Web Development (58)
Archives
- August 2010 (7)
- July 2010 (9)
- June 2010 (9)
- May 2010 (8)
- April 2010 (17)
- March 2010 (13)
- February 2010 (3)
Tags
99points
adobe
AJAX
ajax pagination
ajax rating
ajax tutorial
captcha
Codeigniter
codeigniter 2.0
codeigniter recaptcha
CSS
css tutorials
curl
dreamweaver cs5
Facebook
Facebook. PHP. JQuery
facebox
farmville
ffmpeg
flv
google api
hacking
image gallery
Joomla
JQuery
jQuery Sliding
Jquery tutorial
mafia war
Mootools
MySQL
Payment
PHP
php curl
Poll System
recaptcha
RSS Feed
SEO
simplepie
socail networking
ssl
Tutorials
Twitter
Web
XSS
youtube
Comments
- Super Ajax Polling/Voting System using JQuery, Ajax, PHP and MySQL | Bodeezy Bux on Ajax Rating System: Create Simple Ajax Rating System using jQuery AJAX and PHP.
- Adam on Create Animated Tabs using JQuery and CSS.
- ZeeShaN on Reloaded: Facebook Style Wall Posting and Comments System using jQuery PHP and Ajax.
- Marco on Reloaded: Facebook Style Wall Posting and Comments System using jQuery PHP and Ajax.
- Facebook Style Wall Posting and Comments System using jQuery PHP and Ajax | Programmer Heaven on Facebook Style TextArea with Wall Posting Script using jQuery PHP and Ajax.
ZeeShaN






[...] This post was mentioned on Twitter by Pablo Lara H, Pablo Lara H, 99_Points, 99_Points, 99_Points and others. 99_Points said: Dzone and Digg Style. Ajax Voting System: Create Ajax Rating/Voting system Part 2 http://bit.ly/9SCoWu [...]
[...] Dzone and Digg Style Ajax Voting System: Create Ajax Rating/Voting system in PHP AJAX. Fresh Demo [...]
Dzone and Digg Style Ajax Voting System: Create Ajax Rating/Voting system in PHP AJAX. Fresh Demo…
How to create simple ajax rating using Ajax, PHP and CSS3. In this part i am going to create Digg.com and Dzone.com voting style….
[...] Visit Source. [...]
[...] Dzone and Digg Style Ajax Voting System: Create Ajax Rating/Voting system in PHP AJAX. Fresh Demo [...]
[...] Dzone and Digg Style Ajax Voting System: Create Ajax Rating/Voting system in PHP AJAX. Fresh Demo [...]
Thanks for tutorial ZeeShaN.
But not .sql file in zip…
@ Ahmed
Thanks for pointing dear, I have updated this above now.
Thanks again.
Hi Zeeshan,
Thanks for this script! I have tried to install it but when I click the Digg button it doesn’t update or do anything.. I think it may be that the link is empty, e.g. href=”#”
Not sure.. why its not working, any suggestions? Have you tested this script recently…?
@Andrew, thanks Andrew, I just replaced href=”#” to href=”javascript: void(0)” So that the page would never fluctuate again but its ok with functionality and its increasing the voting counter. If you have firebug installed check that is it sending ajax request or not at your installation?
Keep me inform !
I tried once again but no luck.. nothing is being called, the counter for the digg isnt moving up when click.. this is the script in the index:
JAVASCRIPT—
//
CSS/HTML—
diggs
diggs
diggs
diggs
Ajax Voting System: Create Ajax Voting system in Digg Style.
In my previous tutorial i explain how to create simple ajax rating using ajax, php and css3. In this part i am going to create Digg.com and Dzone.com voting style.
Hello,
I’m curious how to set this up to have multiple items that people can vote on. Currently, the way I have it set up, I have a mysql query that displays some posts, and each of these have a voting up and down function attached to them.
The script gets the initial information correct from the mysql database for each post. But if i click up or down on any post it starts to update all the voting functions. However, once I reload the page the correct information is displayed. For instance:
<> <><><>
Post 1 [5][10]: Hello this is post 1
Post 2 [2][7]:Hello this is post 2
If i click yes votes for post 2 5 times the information displayed will be:
Post 1 [7][10]: Hello this is post 1
Post 2 [7][7]:Hello this is post 2
However, when i reload the page this will be displayed:
Post 1 [5][10]: Hello this is post 1
Post 2 [7][7]:Hello this is post 2
The same behavior happens with down vote. Can anyone shed any light on this please? Im sorry if its hard to understand, i’ve tried to explain it the best i could!
Thanks!
Hi, Actually this demo is created keeping one post in mind and you can do this just attach current post id with actions.
I mean when you are calling ajax request
$.post(“rating.php?value=”+a, {
Then attach current post id wih this
$.post(“rating.php?value=”+a+”&id=”+current_post_id, {
To get current post id in jquery function, attach post id with following links so that you can get post id and perform your action,
div id=”vwidget-419919″ class=”vwidget”>
a class=”upcount” href=”javascript: void(0)” id=”1″>1919
Now in jquery code:
$(‘.vwidget’).children(‘a’).click(function(){
var a = $(this).attr(“id”);// this will as before
var post_id = $(this).parent().attr(‘id’);// add this to get post id
if(a == 1)
var container = ‘upcount’;
else
var container = ‘downcount’;
$.post(“rating.php?value=”+a+”&post_id=”+post_id, {
}, function(response){
//$(‘.upcount’).fadeOut();
$(‘#’+post_id).children(‘.’+container).html(unescape(response));
$(‘#’+post_id).children(‘.’+container).fadeIn();
});
});
I tried to draw whole code please remove if there are bugs. Hope you will do it now.
Also you can use this post id in backend to save vote for that posting.
good
[...] but useful scripts which makes their effort succeeded. So after some voting system tutorials like Digg style Voting now I have come to simple ajax based polling system. This is another series of Jquery. Hope You [...]