Purchased ....where do you download the file.. still awaiting email or confirmation
Thank you very muchYou could swap the behaviour of that option by editing library/dark/postrating/model.php
Find:
$post['position'] != 0
Replace with:
$post['position'] == 0
I have a problem with Post Ratings. I get this now at the top of each page and the rating icons are now gone.
Never had this before today. Any thoughts? Thanks.
- Illegal string offset 'like_count' in /home/xxxxx/public_html/library/Dark/PostRating/EventListener.php, line 264
- Illegal string offset 'like_count' in /home/xxxxx/public_html/library/Dark/PostRating/EventListener.php, line 264
I'll need to check my host.Did you recently upgrade PHP?
$db->query('
insert into dark_postrating set post_id = ?, user_id = ?, rating = ?, rated_user_id = ?, date = ?
on duplicate key update rating = ?, date = ?
', array($post['post_id'], $user_id, $rating, $postUser ? $postUser['user_id'] : null, XenForo_Application::$time, $rating, XenForo_Application::$time));
@Luke F
In Dark_PostRating_Model::ratePost, is there any reason you aren't using XenForo_Application::$time when inserting a record into dark_postrating ? It makes it impossible to accurately track the alert event which would have generated the dark_postrating entry since $time is seeded at the start of the request and UNIX_TIMESTAMP() uses the MySQL database time at the insert time.
My fix is;
Code:$db->query(' insert into dark_postrating set post_id = ?, user_id = ?, rating = ?, rated_user_id = ?, date = ? on duplicate key update rating = ?, date = ? ', array($post['post_id'], $user_id, $rating, $postUser ? $postUser['user_id'] : null, XenForo_Application::$time, $rating, XenForo_Application::$time));
So to clarify please. I can do this to make as many ratings as I wish to be counted as likes also, simultaneously?Convert ratings to likes: (irreversible; for permanent uninstallations)
- Select a rating you would like to convert to XF Likes in Options > Post Ratings > Like rating
- Run Recount Ratings
- Click cancel once it starts building the rating cache
- Repeat steps 1-3 for all ratings you would like to convert to likes
We use essential cookies to make this site work, and optional cookies to enhance your experience.