New reply 17 Sep, 2025, 2:33 pm
Stream |
![]() New reply 17 Sep, 2025, 2:33 pm ![]() New reply 31 Jul, 2025, 12:23 am ![]() New thread 31 Jul, 2025, 12:22 am ![]() New reply 19 Jul, 2025, 2:37 pm ![]() New thread 19 Jul, 2025, 2:29 pm ![]() New reply 15 Jul, 2025, 7:50 am ![]() New reply 15 Jul, 2025, 2:46 am ![]() New thread 13 Jul, 2025, 12:28 am ![]() New reply 3 Jul, 2025, 3:12 am ![]() New thread 3 Jul, 2025, 2:55 am |
Files | You do not have permission to download files. |
headerinclude
template and add the following at the end:<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/rating.min.js" integrity="sha256-jprk9qns6QqU1UWGtHMwug9A/ls7tVMV8p2mueJlj74=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/rating.min.css" integrity="sha256-rvfNRXAaYgOVCEbNgSflI9FdWFSre18sLFjJKkiuV6w=" crossorigin="anonymous" />
showthread_ratethread
template and replace its entire content with the following:<div style="margin-top: 6px; padding-right: 10px;" class="float_right">
<div class="ui star rating" data-rating="{$thread['averagerating']}" data-max-rating="5" id="rating_thread_{$thread['tid']}"></div>
<script>
$('#rating_thread_{$thread['tid']}').rating({
initialRating: {$thread['averagerating']},
maxRating: 5,
clearable: false,
interactive: <if (int)$mybb->user['uid'] && (int)$mybb->user['uid'] === (int)$thread['uid'] then>false<else>true</if>,
onRate: function (rating) {
$.ajax(
{
url: '{$mybb->settings['bburl']}/ratethread.php?ajax=1&my_post_key='+my_post_key+'&tid={$thread['tid']}&rating='+rating,
async: true,
method: 'post',
dataType: 'json',
complete: function (request)
{
var json = JSON.parse(request.responseText);
if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, error)
{
$.jGrowl(lang.ratings_update_error + ' ' + error, {theme:'jgrowl_error'});
});
}
else if(json.hasOwnProperty("success"))
{
return true;
}
}
});
return false;
}
});
</script>
</div>
forumdisplay_threadlist_rating
template and replace its entire content with the following (we are only removing the core JavaScript: <td class="tcat" align="center" width="80">
<span class="smalltext"><strong><a href="{$sorturl}&sortby=rating&order=desc">{$lang->rating}</a> {$orderarrow['rating']}</strong></span>
</td>
forumdisplay_thread_rating
template and replace its entire content with the following:<td align="center" class="{$bgcolor}{$thread_type_class}">
<div class="ui star rating" data-rating="{$thread['averagerating']}" data-max-rating="5" id="rating_thread_{$thread['tid']}"></div>
<script>
$('#rating_thread_{$thread['tid']}').rating({
initialRating: {$thread['averagerating']},
maxRating: 5,
interactive: <if (int)$mybb->user['uid'] && (int)$mybb->user['uid'] === (int)$thread['uid'] then>false<else>true</if>,
onRate: function (rating) {
$.ajax(
{
url: '{$mybb->settings['bburl']}/ratethread.php?ajax=1&my_post_key='+my_post_key+'&tid={$thread['tid']}&rating='+rating,
async: true,
method: 'post',
dataType: 'json',
complete: function (request)
{
var json = JSON.parse(request.responseText);
if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, error)
{
$.jGrowl(lang.ratings_update_error + ' ' + error, {theme:'jgrowl_error'});
});
}
else if(json.hasOwnProperty("success"))
{
return true;
}
}
});
return false;
}
});
</script>
</td>
ui star rating
for ui heart rating
in the two occurrences in the steps above.