Content Ratings

Content Ratings [Paid] 2.7.4

No permission to buy ($35.00)
1/ If I use font awesome classes, the classes are added, but the icon font-family is not changed to FontAwesome. I am currently adding this via CSS. Am I missing a setting somewhere? The font-style is also set to italic, again should I be looking for a setting for this? It's obviously easy for me to override in CSS, but thinking I've actually missed something.
On the rating type page there is a "css class" option using arbitrary css icons

2/ I can't see the users rating in the post bit either as numbers, or as shown here:

postbit-bar-ratings-png.166680


I have set this option to true:

messages-image-2276741547-png.176028



Is there anything else I need to change to get the post bit numbers/bar to show up?
Under Style Properties => Messages =>"Message user info elements" make sure "Rating counts" is checked.
 
On the rating type page there is a "css class" option using arbitrary css icons


Under Style Properties => Messages =>"Message user info elements" make sure "Rating counts" is checked.

Is it possible to show the bar and rating counts at the same time? If so I did not know this. Please let me know as that would be a great feature to have.
 
I'd really like a stat to show positive (or negative) rating as a percentage of a users total posts. This would be agreat way to show perceived posting quailty.
 
Is it possible to show the bar and rating counts at the same time? If so I did not know this. Please let me know as that would be a great feature to have.
This currently isn't possible, but wouldn't too hard with some template edits.

You would need to disable the template modifications for "message_macros" which inject the rating bar in various locations, and make the template edits yourself.

What is CSS to show bar as that image?
The rating bar is fairly complex, have a look at the template sv_contentratings_macros and the macro rating_count_bar

I'd really like a stat to show positive (or negative) rating as a percentage of a users total posts. This would be agreat way to show perceived posting quailty.
That is kinda what the "display message user info rating counts as a bar" is for.
 
@Xon I managed to do it but I only have positive ratings so the bar can't move anywhere. I'm very interested in learning how I can get the bar to increase as positive ratings come in. To start small and increase as users get positive ratings. Instead of a balancing scale which I don't see the point of very much. THANK YOU
 
If only I knew how to do that!

Go to message_macros in template modifications. The one for the rating bar, disable it. Also disable the rating bar option in style properties so counts show up.

Then go to message_macros template and place this code under the closing <xen:if> tag of the area you want it to be. For example, if you want it to be below trophy points you would find that area and below it you would put this code. It's edited to work perfectly on a site that has the numerical values enabled. It will work no matter what. I just only have positive ratings so I'm wondering what my options are here.

But yes place this code in the desired area after disabling both of those:

HTML:
<xf:if is="$extras.like_count">
    <xf:include template="sv_contentratings_message_macros_user_info_bar" />
    </xf:if>
 
Last edited:
@Xon I managed to do it but I only have positive ratings so the bar can't move anywhere. I'm very interested in learning how I can get the bar to increase as positive ratings come in. To start small and increase as users get positive ratings. Instead of a balancing scale which I don't see the point of very much. THANK YOU

^^ Any ideas @Xon how I can get the bar to start small and increase as positive ratings come in? Like I said currently it's a balancing scale with the 3 types. I just want it to be like a reputation bar for ratings. There are ways I am able to use images for the "like_count" variable like in Xenforo 1 I had this setup but maybe there's a way with the bar. It may even be default already I just don't know it? Is there something I'm not seeing or does it not work with only 1 rating type? If not, is there a way I can set this up to be like a rating bar? Any ideas are highly valued and I really appreciate your help.
 
Sorry for jumping in :)

But what would the horizontal scale be? How much would you know to render? if you had 1000 likes how much of the available space would be green?

On xenforo 1 I followed a tutorial by @AzzidReign for trophy points scaling onto images and simply changed the variable for the trophies to "like_count". You can do the same on Xenforo 2 but I haven't tried yet or found the exact method of doing it. I'll need to look into that. You would just set a reputation bar or rep images per a certain amount of likes or ratings. The concept for Xenforo 2 should be similar.

@Xon let me know if you have any ideas on this I'm very interested in setting this up soon. Since I've been able to figure out how to use the bar and rating counts at the same time and shared with everyone how. Possibly you may provide some ideas for us.

- Brad
 
I'd really like a stat to show positive (or negative) rating as a percentage of a users total posts. This would be agreat way to show perceived posting quailty.
It can do that as a visual bar;
postbit-bar-ratings-png.166680


Under style properties "Messages" ensure "Rating count" is ticked, and then under style properties "Content Ratings" ensure "Display message user info rating counts as a bar"

Or did you want an actual percentage value?

^^ Any ideas @Xon how I can get the bar to start small and increase as positive ratings come in? Like I said currently it's a balancing scale with the 3 types. I just want it to be like a reputation bar for ratings. There are ways I am able to use images for the "like_count" variable like in Xenforo 1 I had this setup but maybe there's a way with the bar. It may even be default already I just don't know it? Is there something I'm not seeing or does it not work with only 1 rating type? If not, is there a way I can set this up to be like a rating bar? Any ideas are highly valued and I really appreciate your help.
This will require custom template work in the template sv_contentratings_message_macros_user_info_bar and similar. as @Patagonian notes you need a custom definition of what each "step" is.

Additionally this add-on is fairly generic with categories, there is no explicit "positive" or "negative" category as far as the code base is concerned. These are just text labels and such for a category.
 
This will require custom template work in the template sv_contentratings_message_macros_user_info_bar and similar. as @Patagonian notes you need a custom definition of what each "step" is.

Additionally this add-on is fairly generic with categories, there is no explicit "positive" or "negative" category as far as the code base is concerned. These are just text labels and such for a category.

@Xon what would be the way to do this for Xenforo 2 but for like_count or in your case the rating count definition which I still don't know?

https://xenforo.com/community/resources/user-ranks-based-on-trophy-points.3354/

On Xenforo 1 I followed this tutorial and replaced the trophy point reference with "like_count" and it worked.

I can manage the custom work fine, I just don't know what the equivalent is for Xenforo 2. I will figure out the rest but please share an example if you have a moment. If not I suppose I can post a thread about it and ask others. Thank you @Xon I appreciate your advice.
 
Or did you want an actual percentage value?

Ideally a percentage value but thinking about it I like the bar, but would need to have an explanation

e.g Percentage (or ratio) of positive ratings.

Thinking about it, my preference for this would be if it was in the member view, not necesssarily the message info

e.g.

pos.webp
 
Last edited:
@Xon what would be the way to do this for Xenforo 2 but for like_count or in your case the rating count definition which I still don't know?

https://xenforo.com/community/resources/user-ranks-based-on-trophy-points.3354/

On Xenforo 1 I followed this tutorial and replaced the trophy point reference with "like_count" and it worked.

I can manage the custom work fine, I just don't know what the equivalent is for Xenforo 2. I will figure out the rest but please share an example if you have a moment. If not I suppose I can post a thread about it and ask others. Thank you @Xon I appreciate your advice.
In the sv_contentratings_macros template, you need to edit rating_count_bar

XML:
<xf:macro name="rating_count_bar"
    arg-ratingTypeCategories="!"
    arg-ratingCounts="!"
    arg-ratingCountPercentages="!"
    arg-link="0">
...
</xf:macro>

If the positive category has the ID of 1, then you would use the variable {$ratingCountPercentages.1}

I'ld recommend using {{ dump($ratingTypeCategories) }} to explore what categories ids you have.
 
In the sv_contentratings_macros template, you need to edit rating_count_bar

XML:
<xf:macro name="rating_count_bar"
    arg-ratingTypeCategories="!"
    arg-ratingCounts="!"
    arg-ratingCountPercentages="!"
    arg-link="0">
...
</xf:macro>

If the positive category has the ID of 1, then you would use the variable {$ratingCountPercentages.1}

I'ld recommend using {{ dump($ratingTypeCategories) }} to explore what categories ids you have.

Thank you for your excellent advice. I'm sure this will be searched in google at some point or someone else will need this later on. I will see what I can do and if I am able to figure it out I will post the resulting code in this thread for anyone else. Seems less complicated than @AzzidReign Xenforo 1 method.

I think this won't be a problem to setup. Appreciate the help once again. I hope you get rich off your add-ons. You deserve it as hard as you work to help the community. Your a big help
 
  • Like
Reactions: Xon
I'm reasonably confident that if @Xon rendered each category out as as span with some additional attributes in the span, for example value:350, then use of flex and calc should take care of how it appeared in browser. Thinking both @Brad Padgett 's and @Mr Lucky 's rendering requirements could be taken care of this way... Well, 85% sure at this stage - without further experimentation. ;)

User could simply then add CSS and bar would be custom rendered - 1 cat, 2 cats etc, without having to change server code other than the change to accommodate the above.
 
I'm reasonably confident that if @Xon rendered each category out as as span with some additional attributes in the span, for example value:350, then use of flex and calc should take care of how it appeared in browser. Thinking both @Brad Padgett 's and @Mr Lucky 's rendering requirements could be taken care of this way... Well, 85% sure at this stage - without further experimentation. ;)

User could simply then add CSS and bar would be custom rendered - 1 cat, 2 cats etc, without having to change server code other than the change to accommodate the above.

Your probably right but I'm pretty stubborn when it comes to getting things right. I like it to work on the back-end too. Interesting idea with calc though. That's quite interesting. I didn't think about it like that. :unsure:
 
Top Bottom