A simple yii extension to keep like dislike functionality
DEPENDENCIES
-
yii-user module
-
jquery.js
-
url without index.php and urlmanager enabled in config/main.php
INSTALLATION
-
Unzip
-
Copy the likedislike folder to protected/modules/
-
under config/main/
'modules'=>array(
'likedislike',
),
-
Import protected/modules/data/tbl_likedislike.sql
-
You are ready to go
USAGE
To display blog feeds
widget('likedislike.widgets.LikeDislikeButton',array('field_id'=>your filed/blog/post id*)) ?>*your filed/blog/post id : it should be the id of the item you want to be liked or disliked
eg: if you are showing all your post contents then:
title.$row->post; $this->widget('likedislike.widgets.LikeDislikeButton',array('field_id'=>$row->id)); } ?>