Post Ratings - taking likes to the next level [Deleted]

I had to add a LIMIT to get that second statement to run, but I eventually got all the ids added. Unfortunately, when I ran the recount in the admin panel, it seemed to work at first, but after a few minutes gave me this error:


An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/forum/public_html/library/Zend/Db/Statement/Mysqli.php on line 77

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
  5. XenForo_Model->fetchAllKeyed() in XenForo/Model/RoutePrefix.php at line 41
  6. XenForo_Model_RoutePrefix->getPrefixesByRouteType() in XenForo/Model/RoutePrefix.php at line 54
  7. XenForo_Model_RoutePrefix->getPrefixesForRouteCache() in XenForo/Link.php at line 487
  8. XenForo_Link::_loadHandlerInfoForGroup() in XenForo/Link.php at line 404
  9. XenForo_Link::_getPrefixHandler() in XenForo/Link.php at line 370
  10. XenForo_Link::_buildLink() in XenForo/Link.php at line 97
  11. XenForo_Link::buildPublicLink() in XenForo/Dependencies/Admin.php at line 197
  12. XenForo_Dependencies_Admin->getEffectiveContainerParams() in XenForo/FrontController.php at line 635
  13. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  14. XenForo_FrontController->run() in /home/forum/public_html/admin.php at line 13
I did take a backup before running it, but if I have to restore and do it over again how do I prevent this from happening again?

(It did seem to partially work; some of my members are now showing some Likes (well, on my forum, Thanks) in their profile totals. It does seem to be only a fraction of the actual number of Thanks they received before the forum change, so I guess it stopped part way through.)

If your server cannot handle recount, you can reduce its speed by dropping the PER_PAGE number at the top of each file in library/Dark/PostRating/Deferred. To begin with I would reduce them to 25% of their current values
 
I just did as you advised, but it failed again. (And this time sooner than the first time I tried it.) Oh well, I needed some sleep anyway. :)
 
Bad news… I tried a couple more times, first cutting everything down to 50 per page, then five, and it still eventually timed out with that error. It does seem to have partially done the job; that is, my user profile now shows probably about a third of the Thanks from the old site. So, how does this recount script work? Is the effect cumulative, so I can just keep trying the script again and again and eventually it will finish? Or is it starting from the beginning each time, and if I keep running it, I'll end up with way more converted Thanks than there were to begin with? Is there any way to do this manually, like with a LIMIT, so I can make sure it finishes?

So close!
 
Bad news… I tried a couple more times, first cutting everything down to 50 per page, then five, and it still eventually timed out with that error. It does seem to have partially done the job; that is, my user profile now shows probably about a third of the Thanks from the old site. So, how does this recount script work? Is the effect cumulative, so I can just keep trying the script again and again and eventually it will finish? Or is it starting from the beginning each time, and if I keep running it, I'll end up with way more converted Thanks than there were to begin with? Is there any way to do this manually, like with a LIMIT, so I can make sure it finishes?

So close!

Do you have control over the mysql server, ie is it a VPS/dedi? Just upping the timeouts in my.cnf temporarily should do the trick
 
@Luke F The template dark_postrating_member_card has hardcoded colors vs using a CSS class + style properties.

The offending bit:
Code:
<dt>{xen:phrase dark_ratings_received}:</dt>
<dd><xen:if is="{$postrating_enabled_ratings.positive}"><span style="color:#C6FF8C">+{xen:number $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}">{xen:number $postrating_ratings_total.neutral}
  <xen:if is="{$postrating_enabled_ratings.negative}"> / </xen:if>
</xen:if>
<xen:if is="{$postrating_enabled_ratings.negative}"><span style="color:#FF9D8C">-{xen:number $postrating_ratings_total.negative}</span></xen:if>
</dd>

Using CSS like class="dark_postrating_positive" instead of style="color:#C6FF8C" would be better.
 
@Luke F The template dark_postrating_member_card has hardcoded colors vs using a CSS class + style properties.

The offending bit:
Code:
<dt>{xen:phrase dark_ratings_received}:</dt>
<dd><xen:if is="{$postrating_enabled_ratings.positive}"><span style="color:#C6FF8C">+{xen:number $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}">{xen:number $postrating_ratings_total.neutral}
  <xen:if is="{$postrating_enabled_ratings.negative}"> / </xen:if>
</xen:if>
<xen:if is="{$postrating_enabled_ratings.negative}"><span style="color:#FF9D8C">-{xen:number $postrating_ratings_total.negative}</span></xen:if>
</dd>

Using CSS like class="dark_postrating_positive" instead of style="color:#C6FF8C" would be better.

I think the reasoning behind that was to avoid an extra css request when loading the member card, but on second thoughts probably redundant, will fix
 
  • Like
Reactions: Xon
For anyone using Post Ratings along with new versions of Tapatalk plug-in (3.0.x) there's a slight change needed to be made in library/Dark/PostRating/Model/Post.php file. I have attached the patch file and the modified file itself.
 

Attachments

That's still in Beta, isn't it? I won't be upgrading that until the full release, and then probably will want a month until they work all the bugs out of that.
 
It is in beta, but according to their forum it will go "gold" if there's no more errors. So maybe more Release Candidate...
 
Some of my users report that sometimes they liked some posts, and after some time when they look at that posts, they see that posts are unliked, like they did not give like for that post at all.

I don't know where to look to resolve that error.
Any help?
 
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
Is it possible to show ratings received there instead of likes received?
 
Good evening,

I want to know how to translate the phrases associated with icons, like on the screenshot.

QYB6Ykf.png



Thank you in advance for your help.
 
I'm fairly certain you only need to change the Title in Applications -> Ratings. You can also add new ratings and call them whatever you like.
 
- Sort of. If you disable news feed integration, alerts integration and disallow the permission to see detailed rating lists, then there's no way to tell who rated who.

I'm not sure if I'm missing something

I have everything disabled but it still shows up in sidebar

Ratings showing up in side bar
upload_2016-5-2_7-35-42.webp

disabled features

upload_2016-5-2_7-33-22.webp
upload_2016-5-2_7-33-43.webp
 
Top Bottom