[OzzModz] Reaction to Vote

[OzzModz] Reaction to Vote 2.0.0 Patch 2

No permission to buy ($10.00)
Compatible XF 2.x versions
  1. 2.2
Additional requirements
PHP 7
License
Single Use License (may be used on one website)
Updates duration
Lifetime for Xenforo versions listed above
Visible branding
No
Automatic upvote/downvote for suggestions & answers to questions on given or taken reaction (depending on reaction type - positive = upvote, negative = downvote)
With AJAX vote block updating.

ONLY FOR XF 2.2!




1605008336035.png



You can easily add support for your votable content by implementing PB\ReactionToVote\Entity\ReactionToVoteInterface

PHP:
/**
* Represents Votable entity for current reacted content
* return $this if your votable content is the same to reacted entity or return parent relation with ContentVote if not
*
* Eg: reacted Post entity has a ContentVoteTrait implementation that relates to Thread on suggestion forum types
* @return \XF\Mvc\Entity\Entity
*/
public function getReactionToVoteContent();

/**
* Returns true if reaction to vote action is supported
* @return bool
*/
public function isReactionToVoteSupported(): bool;


Config options can be extended in PB\ReactionControl\Repository\Repo::getSupportedContentTypes()

Eg:

PHP:
public function getSupportedContentTypes()
{
   $contentTypes = parent::getSupportedContentTypes();

   $contentTypes['My/AwesomeAddon'] => [
         'my_content_type1' => ['title' => XF::phrase('my_content_type1')],
         'my_content_type2' => ['title' => XF::phrase('my_content_type2')]
      ]
   ];
   return $contentTypes;
}
Author
Ozzy47
Views
818
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Ozzy47

Latest updates

  1. 2.0.0 Patch 2

    Use minified JS on production
  2. 2.0.0 Patch 1

    Log correct error if js handler is null Properly get actual vote_count from votable entity for...
  3. 2.0.0

    AJAX updating vote counters & actions block on giving or taking back reaction Total refactor to...
Top