Post rating variables?

Tsugaga

Member
Not that great with(php?) variables. When a user posts you can see their likes. I want this to be replaced with their positive rating count. What do I replace "$user.like_count" with?
 

Tsugaga

Member
I'm not licenced. I am super admin on a forum and do a bunch of work on it, the owner is greatman(he has a black penguin avy atm) and he is licensed. Obviously I cant log onto his account and post, and he is too busy to be bothered to post my questions here for me. I would really like my question to be answered. I can just go to random xf help sites but I posted it here because you seem to know everything about it(you answered almost every question I have searched for on other topics). Please just help me out. You can ask a mod or someone to verify greatman? If it's really that big of a deal.
 

oman

Well-known member
I'm not licenced. I am super admin on a forum and do a bunch of work on it, the owner is greatman(he has a black penguin avy atm) and he is licensed. Obviously I cant log onto his account and post, and he is too busy to be bothered to post my questions here for me. I would really like my question to be answered. I can just go to random xf help sites but I posted it here because you seem to know everything about it(you answered almost every question I have searched for on other topics). Please just help me out. You can ask a mod or someone to verify greatman? If it's really that big of a deal.

If greatman is licensed, you can get him to associate your username with his license. To be able to get support, you must have or be associated with a license.
 

Tsugaga

Member
Eh he said he has to renew his licence. The question I am asking is about the rating system, which is an add-on, and he could have only downloaded it if he was premium so...
 

Tsugaga

Member
No it says he needs an active licence.

XenForo - Error
You must have at least one up-to-date license to access this page.


Edit: He renewed his licence and associated me with his account. The link provided by Jake doesn't work though because I haven't purchased the licence. How do I verify that I am associated with his account?
 

Tsugaga

Member
I use the post rating add-on. The ratings are created and each one is set as positive, negative, or neutral.

This is a bit from the message_user_info template

Code:
    <xen:if is="@messageShowTotalLikes">
<dl class="pairsInline">
<dt>{xen:phrase likes_received}:</dt>
<dd>{xen:number $user.like_count}</dd>
</dl>

This makes it so when a user posts in a topic, it shows their likes in the area under their avatar. I want it to show total positive ratings instead of just likes. To do this I have to replace "$user.like_count" with something.

This is used to display a users positive, neutral, and negative ratings in the visitor panel:

Code:
<xen:require css="dark_postrating.css" />
<dl class="pairsJustified">
<dt>{xen:phrase dark_ratings}:</dt> 
<dd><xen:if is="{$postrating_enabled_ratings.positive}"><span class="dark_postrating_positive">{$postrating_ratings_total.positive}</span><xen:if is="{$postrating_enabled_ratings.neutral} || {$postrating_enabled_ratings.negative}">/</xen:if></xen:if><xen:if is="{$postrating_enabled_ratings.neutral}"><span class="dark_postrating_neutral">{$postrating_ratings_total.neutral}</span><xen:if is="{$postrating_enabled_ratings.negative}">/</xen:if></xen:if><xen:if is="{$postrating_enabled_ratings.negative}"><span class="dark_postrating_negative">{$postrating_ratings_total.negative}</span></xen:if></dd></dl>

I tried replacing "$user.like_count" with "$user.postrating_ratings_total.positive", "$postrating_ratings_total.positive", and similar things but it doesn't work.
 

Luke F

Well-known member
Oh cool, thanks! Any way to set where I want it? It is automatically put under all the other things defined in the message_user_info template bit i'd like to put it in the spot that I want.

Move the closing </xen:hook> of message_user_info_extra in template message_user_info up to where you want the post ratings bit inserted, and pray another addon doesn't rely on the correct position
 
Top