2015-08-22, 09:00 AM
In 2.0, we've added the ability to "like" content. This like system provides a very simplistic implementation allowing only the liking of content, not the "disliking". However, the system is extremely easy to extend and to implement on custom content types. This feature has been often requested throughout MyBB 1.x's lifetime and there have been a large number of third party plugins implemented to perform this. As a core feature of 2.0, we will be looking at providing upgrade paths for common third party plugins to import old likes into 2.0. We haven't yet finalised a list of which plugins will be supported, but will be deciding this nearer release and providing an easy way to hook in for other plugins that aren't supported.
Above is a screenshot of a post that has received several likes.
It's also extremely easy for developers to add support for likes to their content types, requiring only the implementing of a Trait upon their models:
Please feel free to provide any feedback regarding the way that likes are styled or presented. We do not wish to extend the functionality past a basic "like" for a post, so we will not be implementing things such as "dislike" in the core.
Above is a screenshot of a post that has received several likes.
It's also extremely easy for developers to add support for likes to their content types, requiring only the implementing of a Trait upon their models:
<?php
namespace MyBB\Core\Database\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use MyBB\Core\Likes\Traits\LikeableTrait;
class Post extends Model implements HasPresenter
{
use SoftDeletes;
use LikeableTrait;
// The rest of your database model implementation code goes here...
}
Providing feedbackPlease feel free to provide any feedback regarding the way that likes are styled or presented. We do not wish to extend the functionality past a basic "like" for a post, so we will not be implementing things such as "dislike" in the core.