Jump to content

Sonya*

Clients
  • Posts

    3,946
  • Joined

  • Days Won

    34

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Projects

Release Notes v5

Forums

Events

Store

Gallery

Posts posted by Sonya*

  1. On 9/28/2021 at 5:55 PM, Randy Calvert said:

    I would personally recommend setting your server to just default all new table creations to use InnoDB.

    I have set InnoDB as default-storage-engine. This app forces MyISAM somehow. See another example where one table is MyISAM while all others are InnoDB.

  2. 1 minute ago, kyriazhs1975 said:

    Does this plugin support Persian language?

    It works for any language. You enter every Persian character you would like to replace with their Latin equivalent (see Plugin settings). E. g. 

    ب=b
    پ=p
    ت=t
    ...

    One by one for every character you would like to replace. 

  3. @Matt, there is also a mismatch with sorting by Most Reviewed in applications/cms/modules/front/database/category.php

    if ( !$database->options['reviews'] and !$category->allow_rating )
    			{
    				unset ( $table->sortOptions['num_reviews'] );
    				unset( $table->sortOptions['rating'] );
    			}

    While options['reviews'] is about reviews, allow_rating is about star rating. This way I have Most Reviewed option even if I only allow star ratings. This option sorts by record_reviews. The column is always 0, if only star rating is enabled. So, the option does not make sense if reviews are disabled. Or it should sort by rating_hits instead.

  4. 7 minutes ago, opentype said:

    Yeah, the title and body field are “special fields”. You can’t edit them this way. Just like changing the order in the ACP doesn’t do anything. 

    I can understand, that they do not want special formatting anywhere else. So that one cannot break activity stream, notifications, blocks or any other area where title and content is used. But I do not understand why they suppress formatting even in database templates. I mean, we can format every other field via format options without touching template. However, for title and content, we have to do it in template. Ridiculous. 

    strange beck bennett GIF by Saturday Night Live

  5. 5 hours ago, TDBF said:

    My suggestion would be to edit the templates and add your prefix and suffix to the Title there?

    I do. But this works only for display and listing. It is not system-wide. Notifications and activity stream use title as is. This is not critical, but I wonder why title and content cannot use format options. Even in templates. The options are there, but they are just ignored.

  6. 11 minutes ago, Nathan Explosion said:

    All apps will create tables based on your own SQL server's configuration

    Other apps create InnoDB tables, IPS install as well. This is the only app that creates MyISAM. This is not about the server configuration. It is inside this app.

  7. 39 minutes ago, Marc Stridgen said:

    I would suggest however, also adding that to suggestions if you wish to see something like that as standard in the future

    I am not certain if this is a feature or a bug. Sorting by Highest rated without considering the number of votes does not look correct. At least for me 😉 And I am sure for the most users, that wonder why a record with only one 5 stars rating is higher as the record with ten 5 stars rating.

  8. 58 minutes ago, Jimi Wikman said:

    How does that sound?

    This sound reasonable, but we do not have a number of single votes of X stars saved in the database. The values we have: average rating, total rating and number of reviews/votes.

    Without touching a database, there could be at least two solutions:

    Solution #1 can be to use both columns record_average AND num_reviews or rating_hits. This would result in more accurate rating like:

    1. 3x5 stars (average 5 with 3 votes) 
    2. 2x5 stars (average 5 with 2 votes)
    3. 5x4+6x5 (average 4 with 11 votes)
    4. 10x4 stars (average 4 with 10 votes)
    5. 1x4+2x5 (average 4 with 3 votes)
    6. 1x4 stars (average 4 with 1 vote)

    Edit: if average rating would be saved as float and not integer, the results would be more accurate, but this requires changes in database.  There is already unused column called rating_real. If we change the column to float and sort by the column AND number of votes/reviews, then we get this:

    1. 3x5 stars (average 5.0 with 3 votes) 
    2. 2x5 stars (average 5.0 with 2 votes) 
    3. 1x4+2x5 (average 4.6 with 3 votes)
    4. 5x4+6x5 (average 4.54 with 11 votes) 
    5. 10x4 stars (average 4.0 with 10 votes)
    6. 1x4 stars (average 4.0 with 1 vote)

    Solution #2 can be to calculate ratings based on total stars and votes https://calculator.academy/average-rating-calculator-star-rating/ IPS already calculates the total rating by star ratings in rating_value. Just do the same for reviews. Then divide the total number of stars by 5 or 10 (depending on how the rating system is configured in AdminCP). Save the result in rating_real (the unused column) and sort by it. The example from above would be different.

    1. 5x4+6x5 (50/5) = 10
    2. 10x4 stars (40/5) = 8
    3. 3x5 stars (15/5) = 3 
    4. 1x4+2x5 (14/5) = 2,8
    5. 2x5 stars (10/5) = 2
    6. 1x4 stars (4/5) = 0,8

    Scientific solution would be to use true Bayesian estimate.

    Quote

    The formula for calculating the top tated records with true Bayesian estimate:

    rating = (R * v + C * m) / (v + m);

    where:

    • R = average for the record (mean)
    • v = number of votes for the record
    • m = minimum votes required to be listed (tunable)
    • C = the mean vote across the whole report (average R of every single item in the database)

    But this would be an overhead, as we would need to recalculate the whole database every time the vote/review is given, changed or deleted. 😉

     

  9. There is a bit of mess with ratings and reviews in databases and sorting by Highest rated.

    We have 5 fields in tables cms_custom_database_X related to reviews and rating:

    • rating_real
    • rating_hits
    • rating_value
    • rating_reviews
    • record_rating

    Depending on what we allow on database, they are filled or not.

    Case 1: Database allows stars rating (no reviews)

    • rating_real -> not used
    • rating_hits -> number of votes
    • rating_value -> total stars (e. g. 1x4+2x5 = 14)
    • rating_reviews -> not used
    • record_rating -> average number of stars

    Case 2: Database allows reviews (no star rating)

    • rating_real -> not used
    • rating_hits -> not used
    • rating_value  -> not used
    • rating_reviews -> number of reviews
    • record_rating -> average number of stars

    This is a database column mapping from applications/cms/Application.php:

    'rating' => 'record_rating',
    'rating_hits' => 'rating_hits',
    'rating_average' => 'record_rating',
    'rating_total' => 'rating_value',
    'num_reviews' => 'record_reviews',

    It seems you use the value mapped into rating_average to sort for Highest Rating, that's why you have odd results like this. Rating_average does not consider the number of votes/reviews.

    Possible solutions

    Solution #1 can be to use both columns record_average AND num_reviews or rating_hits. This would result in more accurate rating like:

    1. 3x5 stars (average 5 with 3 votes) 
    2. 2x5 stars (average 5 with 2 votes)
    3. 5x4+6x5 (average 4 with 11 votes)
    4. 10x4 stars (average 4 with 10 votes)
    5. 1x4+2x5 (average 4 with 3 votes)
    6. 1x4 stars (average 4 with 1 vote)

    Solution #2 can be to calculate ratings based on total stars and votes https://calculator.academy/average-rating-calculator-star-rating/ You already calculate the total rating by star ratings in rating_value. Just do the same for reviews. Then divide the total number of stars by 5 or 10 (depending on how the rating system is configured in AdminCP). Save the result in rating_real (the unused column) and sort by it. The example from above would be different.

    1. 5x4+6x5 (50/5) = 10
    2. 10x4 stars (40/5) = 8
    3. 3x5 stars (15/5) = 3 
    4. 1x4+2x5 (14/5) = 2,8
    5. 2x5 stars (10/5) = 2
    6. 1x4 stars (4/5) = 0,8

    Can you please look into it? It would really help to have a more sophisticated logic in sorting by rating. 

    Thank you!

  10. I am trying to sort database records by rating.

    If I choose Highest Rated, then the number of votes is not considered. See below, the record #1 with only one vote is above the record #3 with 3 votes. Both have only 5-Star votes.

    screenshot-2021_09.27-21_59_15.thumb.png.9aaa1b3b0bcc92ad784a4de07c00ff65.png

    If I choose to sort by Most reviewed, then I have this order (I assume by publish date)

    screenshot-2021_09.27-22_01_40.thumb.png.646d7829072290f823a0619c15e7a07d.png

    This does not make sense. I have set Allow reviews for database to No. There should not be a sorting option Most reviewed for the databases where reviews are disabled.

    Additionally, if I choose Custom and enter this data

    screenshot-2021_09.27-22_10_08.png.0ad93386e2dd05c54f65dba9291f1db8.png

    After clicking on the Search I have the order like Highest Rated (false, number of votes is still not considered) but also another not translated (translatable) string in the Sort by menu. See below. Both are selected. Bug?

    screenshot-2021_09.27-22_11_03.png.deef564c39ec4f6e2fe23aa2da1b7555.png

     

    Back to the rating: How can I consider not only 5 stars, but also the number of votes? 

    Thanks.

     

×
×
  • Create New...