• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Content Ratings for XF2 [Paid] 0.11.6 Alpha

No permission to buy ($35.00)

Xon

Well-known member
#1
Xon submitted a new resource:

Content Ratings for XF2 - Allows users to rate content more expressively

Inspired by the XF1 add-on "Post Ratings", and the prevalence of "Reactions" as an alternative to the single dimensional Likes.

This add-on is a work in progress, major features not yet implemented;
  • Rating Categories
    • For example; positive/negative/neutral categories
    • If a category shows on the profile/memberbit/postbit & how stats are presented.
    • Automatic actions when a category hits some threshold ;
      • Report content
      • Moderate content
      • Soft-delete...
Read more about this resource...
 

Xon

Well-known member
#2
Note; It is possible to extend this add-on to cover additional content types; but I plan to revise this to make it more straight forward and to actually document it.

So far, this has been stable and works well in testing. I fully expect this add-on to hit 1.0.0 before XF2.0 is out of beta.
 

RobParker

Well-known member
#6
Not sure I quite get this bit

If a content's table is "too large" to extend (ie when adding a rating type) without downtime, that content has the rating type disabled for it and the required manual SQL for the administrator to run provided.


How often would you expect that to happen? Is it just went adding a new rating or could it be a fairly common occurance?
 

Xon

Well-known member
#9
I've already done most of the data-conversion work for writing a Post Rating importer, but it needs to be cleaned up so it is executed in a restartable, interruptable and reliable way. And some trials with a copy of my site's 11 million post ratings table.

I'll post firm estimates and advice once I've done some test conversions in my dev environment. Love VM Snapshots.

Not sure I quite get this bit

If a content's table is "too large" to extend (ie when adding a rating type) without downtime, that content has the rating type disabled for it and the required manual SQL for the administrator to run provided.


How often would you expect that to happen? Is it just went adding a new rating or could it be a fairly common occurance?
This would only happen if you add a new rating/reaction type. It should only be 1-2 minutes to apply the schema change with tens of millions of rows as the rating tables are quite compact.

It would be feasible that ratings (but not likes) are disabled and then the change applies in the background while nothing accesses that table. But this wouldn't help if you are using galera clustering tho.

Please keep in mind this does need to once-off add a column to xf_liked_content, which took ~20 seconds to a minute with ~5 million rows.



Not sure how you feel about it but being able to import ratings from the Post Ratings addon that already exists would be pretty huge...
I was waiting till I could get my hands on XF2 Beta 1 so I could actually do the XF1 -> XF2 upgrade process before finishing building the importer.
 

RobParker

Well-known member
#10
We used the Post Rating addon extensively but (at least in old versions) the performance was an issue when we got very busy. Very impressed with the attention you've paid to performance. Would just like to see it in action but we'll likely be purchasing it shortly :)
 

Xon

Well-known member
#11
We used the Post Rating addon extensively but (at least in old versions) the performance was an issue when we got very busy. Very impressed with the attention you've paid to performance. Would just like to see it in action but we'll likely be purchasing it shortly :)
Thanks!

It is definitely a major consideration as we also had performance issues, specifically the ratings give/received pages could virtually take out the site due to the performance impact.

I'm also open to UI feedback in the admincp (I'm working on a 'simple' mode which allows all the XF shipped smiles to be used as ratings) and for the rating dropdown itself (needed to wait to the beta to get my hands on the revised menu code to make it pop-up)
 

Xon

Well-known member
#13
I assume you support fontawesome icons and the icon packs that the Post Ratings addon supported? (e.g.
http://p.yusukekamiyamane.com/)
Yup. You can specify a css icon (or just add arbitrary css to the rating), and/or set a sprite image. (I thought I had a screenshot somewhere)

The existing installer will migrate display configuration (but not first-post-only or group/forum whitelisting configuration), so it should automatically pickup any configuration.

Also, can ratings be used in the member stats pages? So rather than "Most Liked", can it be "Most Funny", "Most Angry", etc?
Definitely planned! The idea is to use widgets for this to support this so you can put them where ever.

There will need to be some caching and consideration to ensure this stays performant.
 

RobParker

Well-known member
#14
Sounds good. Some widget support for ratings would be very cool.

For example, a widget that can be placed at the top of a thread to show/link to all the posts in the thread that meet a certain condition (say 100+ Funny ratings).

Not sure if that's possible but a lot of potential there for stuff like that.
 

Xon

Well-known member
#15
The information is designed to be easily queried for, but shouldn't be too bad going from 'thread -> post -> rating data', per forum likely would need caching and careful consideration.

What this means for a widget UI is something that would need to be given some consideration.

However, the primary goal is getting the current planned out feature done without hopefully being too distracted by shiny ideas :unsure:
 

Steve F

Well-known member
#16
Getting this during install, had to view page source to see it..
Code:
An unexpected database error occurred. Please try again later.
<!-- MySQL statement prepare error [1146]: Table '*****_xf2dev.xf_sv_rating_cache_User' doesn't exist -->
 

arms

Active member
#17
@Xon Hopefully you are open to additional features.
  1. Something I've been asking about in Post ratings was to make all positive ratings updating the like count by 1 rather than unioning the likes and the ratings. If I like something because its funny, i use the funny rating. It's still a positive like. This allows the like count to increment on the thread to sort.
  2. Allow different ratings on first post and replies.
  3. Ranking Algorithm for thread list, using the positive and negative ratings. and score the thread.
 
Last edited:

RobParker

Well-known member
#18
Just purchased but when installing I get the error that

Content Ratings requires PHP 5.6.0+

I take it that I need to update and there's no way around it?
 

Alfa1

Well-known member
#19
I would not run anything below PHP 5.6 as its no longer updated. You should really consider to update if you can. PHP7.2 is almost here.