Tutorials

Article Content:dynamic bootstrap star rating with codeigniter

dynamic bootstrap star rating with codeigniter

dynamic bootstrap star rating with codeigniter.

UPDATED !!: From many days ago I decided to update all my tutorials with demos and full download link projects , I found this is really helpful ,also found that making this tutorials more descriptive will help to understanding code well so if you see this tutorial be sure that you see the latest updated version of bootstrap star rating with CodeIgniter tutorial.

 

Note: bootstrap star rating is a part of krajee plugins if you want to read the full documentation or Bootstrap Star Rating Plugin Examples you can show it from here

 

Installation:

  

1- Download the project from the bottom link page and extract it in localhost

2- Create new database, name it as (demo)

3- Import tables from application/tables

4- Go to the URL  http://localhost/bootstrap_star_rating_codeigniter/

 

 

Project structure:

 In this app we have

 

1- Rating controller

In this controller we have two methods Index to show news table with rating and create_rate to insert new rate and Clear_user_rating to delete user rates

2- Rating model

We have : 
get_one() This function To select our news by news_id and 

get_rate_numbers() This function check if user has rated specfic item or not 

get_item_rate()  This function get ratings related to specfic item id 

insert_rate()   This function insert ratings with news_id and user id 

update_rate()   This function update ratings with news_id and user id 

delete_user_rating() This function delete ratings of new from all tables by news_id and user_id

5- Global folder
 

Contains assets file like bootstrap 3 main framework and starter theme with JavaScript , HTML ,  CSS  files also contains /rating directory which has all bootstrap rating files

6- Views folder

Which contains views file for our layout templates with header and footer and content

 

Why I use bootstrap star rating because it was  easy to customize and compatible with bootstrap the most popular design framework and it has wonderful documentation to do everything

Also, it was very light ,it uses  glyph-icon.

TRY Demo   Download

 



  • Tapfuma Manhanga
    The download did not contain the css and js files
    September 15, 2015
    Reply
    • admin
      webeaystep@gmail.com
      hi Tapfuma yes, because you can download it from their website,just click on the the link in the first line in the article
      September 17, 2015
      Reply
  • Andres
    thanks for your help'm doing a web-based codeigniter and could use this rating - htt://anonyfile.space
    March 5, 2016
    Reply
  • Tapfuma Manhanga
    Thank you admin!
    June 11, 2016
    Reply
  • Hassan
    Hi, i can't seem to access the localhost URL to download the file. Can i download the project file through other means?
    August 11, 2016
    Reply
    • admin
      info@webeasystep.com
      Hi , Hassan download link is at end of tutorial,you can download full code example
      August 11, 2016
      Reply
  • pink
    hey..i want to setup this file in to my existing project, ya i have done it but its showing me error like this (Unable to load the requested language file: language/english/rating_lang.php) please please tell me how to fix this.
    September 28, 2016
    Reply
    • admin
      info@webeasystep.com
      Hey pink,you are welcome your error is very easy to fix ,this error because you forgot to copy language file from my project so to fix this go to this path language/english/rating_lang.php and copy this file to language path into your project,after this be sure that you call this lang file with correct path like i do on my controller thanks
      September 28, 2016
      Reply
  • pink
    Thanks a lot Admin..its working Thanks again.
    September 28, 2016
    Reply
  • Rushi Purohit
    How can i do rating for javascript validation
    August 18, 2017
    Reply
  • amr
    i have an erroe rror Number: 1055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'demo.ci_news_rating.nrt_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by SELECT * FROM ci_news LEFT JOIN ci_news_rating ON ci_news.ne_id = ci_news_rating.nrt_item_id WHERE ne_id='38' GROUP BY ne_id Filename: models/Rating_model.php Line Number: 21
    August 22, 2017
    Reply
    • admin
      info@webeasystep.com
      it is about your server configuration,try to fix this by your server admin
      August 23, 2017
      Reply
  • Manu
    Hi, I downloaded your code and I would like to know how I can reverse the rating stars selection ? Thks a lot and good tutorial
    April 3, 2018
    Reply

Leave a Reply

Your email address will not be published.


Notify me of followup comments via e-mail.
You can also Subscribe without commenting.